]> git.rmz.io Git - dotfiles.git/blob - zsh/lib/key-bindings.zsh
update zshrc
[dotfiles.git] / zsh / lib / key-bindings.zsh
1 # TODO: Explain what some of this does..
2
3 bindkey -e
4 bindkey '\ew' kill-region
5 bindkey -s '\el' "ls\n"
6 bindkey '^r' history-incremental-search-backward
7 bindkey "^[[5~" up-line-or-history
8 bindkey "^[[6~" down-line-or-history
9
10 # make search up and down work, so partially type and hit up/down to find relevant stuff
11 bindkey '^[[A' up-line-or-search
12 bindkey '^[[B' down-line-or-search
13
14 bindkey "^[[H" beginning-of-line
15 bindkey "^[[1~" beginning-of-line
16 bindkey "^[OH" beginning-of-line
17 bindkey "^[[F" end-of-line
18 bindkey "^[[4~" end-of-line
19 bindkey "^[OF" end-of-line
20 bindkey ' ' magic-space # also do history expansion on space
21
22 bindkey "^[[1;5C" forward-word
23 bindkey "^[[1;5D" backward-word
24
25 bindkey '^[[Z' reverse-menu-complete
26
27 # Make the delete key (or Fn + Delete on the Mac) work instead of outputting a ~
28 bindkey '^?' backward-delete-char
29 bindkey "^[[3~" delete-char
30 bindkey "^[3;5~" delete-char
31 bindkey "\e[3~" delete-char
32
33 # consider emacs keybindings:
34
35 #bindkey -e ## emacs key bindings
36 #
37 #bindkey '^[[A' up-line-or-search
38 #bindkey '^[[B' down-line-or-search
39 #bindkey '^[^[[C' emacs-forward-word
40 #bindkey '^[^[[D' emacs-backward-word
41 #
42 #bindkey -s '^X^Z' '%-^M'
43 #bindkey '^[e' expand-cmd-path
44 #bindkey '^[^I' reverse-menu-complete
45 #bindkey '^X^N' accept-and-infer-next-history
46 #bindkey '^W' kill-region
47 #bindkey '^I' complete-word
48 ## Fix weird sequence that rxvt produces
49 #bindkey -s '^[[Z' '\t'
50 #