summaryrefslogtreecommitdiff
path: root/40_KeyBindings.zsh
diff options
context:
space:
mode:
authorhugues <hugues@a0e5b806-a6f9-0310-978d-cbce73f8a913>2006-06-14 22:04:51 +0000
committerHugues Hiegel <hugues@hiegel.fr>2008-03-07 14:15:07 +0100
commitfb8e6a413979695cf315b259d84f77abc5c629db (patch)
tree63508cf94e26931fe261713d7f258e019fdfa534 /40_KeyBindings.zsh
parent3dcbc2edb014013cc5af208c1a01c3d5f06bd0fb (diff)
Zsh power !!
git-svn-id: svn+ssh://hugues@maison/opt/svn/private/hugues@245 a0e5b806-a6f9-0310-978d-cbce73f8a913
Diffstat (limited to '40_KeyBindings.zsh')
-rw-r--r--40_KeyBindings.zsh98
1 files changed, 98 insertions, 0 deletions
diff --git a/40_KeyBindings.zsh b/40_KeyBindings.zsh
new file mode 100644
index 0000000..f793a4c
--- /dev/null
+++ b/40_KeyBindings.zsh
@@ -0,0 +1,98 @@
+#!/bin/zsh
+
+## Key bindings
+#
+# Lancez un chtit bindkey dans votre zsh pour voir...
+#
+
+bindkey "\e[3~" delete-char # delete
+bindkey "\e[2~" overwrite-mode # insert
+bindkey "\e[A" up-line-or-history # up
+bindkey "\e[B" down-line-or-history # down
+bindkey "" history-search-backward # META-up
+bindkey "" history-search-forward # META-down
+bindkey "\e\e[C" forward-word # ESC right
+bindkey "\e\e[D" backward-word # ESC left
+bindkey "\e\e[3~" kill-region # ESC del
+
+# Pratique pour rehasher rapidement
+bindkey -s "r" "rehash\n"
+bindkey -s "R" "rehash\n"
+
+test $TERM = "rxvt" -o $TERM = "xterm" -o $TERM = "aterm" &&
+{
+ bindkey "\e[1~" beginning-of-line # home
+ bindkey "\e[4~" end-of-line # end-of-line
+ bindkey "\eOc" forward-word # CTRL right
+ bindkey "\eOd" backward-word # CTRL left
+ bindkey "\e[3$" vi-set-buffer # SHIFT del
+ bindkey "\eOa" history-search-backward # CTRL UP
+ bindkey "\eOb" history-search-forward # CTRL DOWN
+}
+# (gnome-terminal)
+test $TERM = "xterm" &&
+{
+ bindkey "\eOH" beginning-of-line # home
+ bindkey "\eOF" end-of-line # end-of-line
+}
+#bindkey "\C-t" gosmacs-transpose-chars # J, ca c'est un truc pour toi
+# ne pas oublier de s'en servir :
+# vi-match-bracket est sur ^X^B par defaut
+# npo : quote-region est sur ESC-" par defaut
+# npo : which-command est sur ESC-? par defaut
+# Lancez ``bindkey'' pour en savoir plus !!
+"^A"-"^C" self-insert
+"^D" list-choices
+"^E"-"^F" self-insert
+"^G" list-expand
+"^H" vi-backward-delete-char
+"^I" expand-or-complete
+"^J" accept-line
+"^K" self-insert
+"^L" clear-screen
+"^M" accept-line
+"^N"-"^P" self-insert
+"^Q" vi-quoted-insert
+"^R" redisplay
+"^S"-"^T" self-insert
+"^U" vi-kill-line
+"^V" vi-quoted-insert
+"^W" vi-backward-kill-word
+"^X" self-insert
+"^X^R" _read_comp
+"^X?" _complete_debug
+"^XC" _correct_filename
+"^Xa" _expand_alias
+"^Xc" _correct_word
+"^Xd" _list_expansions
+"^Xe" _expand_word
+"^Xh" _complete_help
+"^Xm" _most_recent_file
+"^Xn" _next_tags
+"^Xt" _complete_tag
+"^X~" _bash_list-choices
+"^Y"-"^Z" self-insert
+"^[" vi-cmd-mode
+"^[^[[3~" kill-region
+"^[^[[A" history-search-backward
+"^[^[[B" history-search-forward
+"^[^[[C" forward-word
+"^[^[[D" backward-word
+"^[," _history-complete-newer
+"^[/" _history-complete-older
+"^[OA" vi-up-line-or-history
+"^[OB" vi-down-line-or-history
+"^[OC" vi-forward-char
+"^[OD" vi-backward-char
+"^[R" "rehash^J"
+"^[[2~" overwrite-mode
+"^[[3~" delete-char
+"^[[A" up-line-or-history
+"^[[B" down-line-or-history
+"^[[C" vi-forward-char
+"^[[D" vi-backward-char
+"^[r" "rehash^J"
+"^[~" _bash_complete-word
+"^\\\\"-"~" self-insert
+"^?" vi-backward-delete-char
+"\M-^@"-"\M-^?" self-insert