summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReiner Herrmann <reiner@reiner-h.de>2014-08-22 19:30:51 +0200
committerReiner Herrmann <reiner@reiner-h.de>2014-08-26 19:52:04 +0200
commite9757743bcb1a76f70d20c973ec5913e5cdda405 (patch)
treea67d5f16349c33825bb99be24d47c45a3a2d1143
parent1abd9d7ceff35ad1caaaf34df745ef0afa1947dd (diff)
bash: enabled vi-mode and added inputrc for important key bindings
-rw-r--r--bashrc4
-rw-r--r--inputrc4
2 files changed, 8 insertions, 0 deletions
diff --git a/bashrc b/bashrc
index c35c04f..2991c10 100644
--- a/bashrc
+++ b/bashrc
@@ -12,6 +12,10 @@
shopt -s histappend # append to history instead of overwriting
shopt -s checkwinsize # check/update window dimenstions
+# enable vi mode
+set -o vi
+bind -m vi-insert 'Control-l: clear-screen'
+
if [ "`id -u`" -eq 0 ]; then
# some aliases to avoid making mistakes:
alias rm='rm -i'
diff --git a/inputrc b/inputrc
new file mode 100644
index 0000000..573028a
--- /dev/null
+++ b/inputrc
@@ -0,0 +1,4 @@
+# history search with Page-Up/Down
+"\e[5~": history-search-backward
+"\e[6~": history-search-forward
+