summaryrefslogtreecommitdiff
path: root/.zsh/zshrc
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2011-03-07 14:46:59 +0100
committerTobias Klauser <tklauser@distanz.ch>2011-03-07 14:47:17 +0100
commit3f636502682414764bf08292fc4ab6c5516305f6 (patch)
treea42c4200449f31771c2a734c42cc06ec5a576ed4 /.zsh/zshrc
parent62c0f21542f06c00839bb8be506511ef215fe2ec (diff)
Add key bindings
Diffstat (limited to '.zsh/zshrc')
-rw-r--r--.zsh/zshrc/80_bindkeys29
1 files changed, 29 insertions, 0 deletions
diff --git a/.zsh/zshrc/80_bindkeys b/.zsh/zshrc/80_bindkeys
new file mode 100644
index 0000000..ba9afb3
--- /dev/null
+++ b/.zsh/zshrc/80_bindkeys
@@ -0,0 +1,29 @@
+# zshrc/80_bindkeys
+#
+# defines key bindings (taken from grml zshrc)
+#
+# Copyright © 2011 Tobias Klauser <tklauser@distanz.ch>
+# Released under the terms of the Artistic Licence 2.0
+#
+# Source repository: git://git.distanz.ch/dotfiles/zsh.git
+
+# use emacs keybindings by default (strange, I know)
+bindkey -e
+# use vi keybindings
+# bindkey -v
+
+# see man zshzle for more information on zsh command line editor
+
+bindkey '\e[1~' beginning-of-line # home
+bindkey '\e[4~' end-of-line # end
+bindkey '\e[A' up-line-or-search # cursor up
+bindkey '\e[B' down-line-or-search # cursor down
+
+# if terminal type is set to 'rxvt':
+bindkey '\e[7~' beginning-of-line # home
+bindkey '\e[8~' end-of-line # end
+
+# allow for better ad-hoc multiline editing
+bindkey '\eq' push-line-or-edit
+
+# vim:ft=zsh