aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Sabaté <mikisabate@gmail.com>2014-05-02 14:39:56 +0200
committerMiquel Sabaté <mikisabate@gmail.com>2014-05-02 14:39:56 +0200
commite80cb0080aa7487b74415e7aa6320a387568b866 (patch)
treecd20f6e32e1fc0d8f969b639a9def2d39d1617f9
parent61c00c0dc79b8dc903cd694d044614a96c344d51 (diff)
downloaddotfiles-e80cb0080aa7487b74415e7aa6320a387568b866.tar.gz
dotfiles-e80cb0080aa7487b74415e7aa6320a387568b866.zip
input: added the .inputrc file.
-rw-r--r--inputrc34
-rwxr-xr-xinstall.sh1
2 files changed, 35 insertions, 0 deletions
diff --git a/inputrc b/inputrc
new file mode 100644
index 0000000..a70a20c
--- /dev/null
+++ b/inputrc
@@ -0,0 +1,34 @@
+
+##
+# Let's initialize a couple of things.
+
+# Include this file so we avoid weird things.
+$include /etc/inputrc
+
+# Use Vi, not Emacs, style editing
+set editing-mode vi
+
+# Don't echo ^C when pressing Ctrl-c (the same goes for other control chars).
+set echo-control-characters off
+
+##
+# Keymaps in Normal mode.
+
+set keymap vi-command
+
+# Insert the arguments from the last command.
+"p": "i !!*\r"
+
+# When hitting q, cycle through the previous commands that start with the
+# prefix we've entered, rather than just cycling the last entered commands.
+"q": history-search-backward
+
+##
+# Keymaps in Insert mode.
+
+set keymap vi-insert
+
+# Needed because binding 'p' in command mode above wipes its insert mode
+# function, too. This fixes that, and will insert 'p' when you type 'p'.
+"p": self-insert
+
diff --git a/install.sh b/install.sh
index 2111595..ab837fe 100755
--- a/install.sh
+++ b/install.sh
@@ -12,6 +12,7 @@ git submodule update
cp bashrc $HOME/.bashrc
cp bash_profile $HOME/.bash_profile
cp psqlrc $HOME/.psqlrc
+cp inputrc $HOME/.inputrc
cp irbrc $HOME/.irbrc
cp gemrc $HOME/.gemrc
cp gitcompletion.sh $HOME/.gitcompletion.sh