]> git.donarmstrong.com Git - zsh.git/blob - .zsh/zshrc/79_bindkeys
Merge remote-tracking branch 'madduck/master'
[zsh.git] / .zsh / zshrc / 79_bindkeys
1 # -*- mode: sh -*-
2 # zshrc/80_bindkeys
3 #
4 # Defines key bindings
5 #
6 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
7 # Released under the terms of the Artistic Licence 2.0
8 #
9 # Source repository: git://git.madduck.net/etc/zsh.git
10 #
11
12 # use emacs keybindings by default
13 bindkey -e
14
15 # history expansion on pressing space
16 #bindkey ' ' magic-space
17
18 # repeat the previous shell-word ($WORDCHARS)
19 bindkey '\e=' copy-prev-shell-word
20
21 # allow for better ad-hoc multiline editing
22 bindkey '\eq' push-line-or-edit
23
24 # fixup ctrl-arrow stuff since it's all mucked up since zsh doesn't use readline
25 bindkey "\e[1~" beginning-of-line
26 bindkey "\e[4~" end-of-line
27 bindkey "\e[5~" history-beginning-search-backward
28 bindkey "\e[6~" history-beginning-search-forward
29 bindkey "\e[3~" delete-char
30 bindkey "\e[2~" quoted-insert
31 bindkey "\e[5C" forward-word
32 bindkey "\e[5D" backward-word
33 bindkey "\e[1;5C" forward-word
34 bindkey "\e[1;5D" backward-word
35
36 # for rxvt
37 bindkey "\e[8~" end-of-line
38 bindkey "\eOc" forward-word
39 bindkey "\eOd" backward-word
40 # fix home/end keys (for mosh)
41 bindkey "\e[7~" beginning-of-line
42 bindkey "\e[8~" end-of-line
43
44 # vim:ft=zsh