summaryrefslogtreecommitdiff
path: root/user:hugues
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-12-23 15:37:33 +0100
committerHugues Hiegel <hugues@hiegel.fr>2009-12-23 15:37:33 +0100
commit33839d4be01f53ad0ed36fef241c67b8bcfc0347 (patch)
treec53f2a00284c7f798a3d958b9b3a576544e4b766 /user:hugues
parent2f92a29bbd173ae025b6689df012826c160cdd16 (diff)
[Keys] cleanup
Diffstat (limited to 'user:hugues')
-rw-r--r--user:hugues/KeyBindings.zsh37
1 files changed, 21 insertions, 16 deletions
diff --git a/user:hugues/KeyBindings.zsh b/user:hugues/KeyBindings.zsh
index b786567..bc077ff 100644
--- a/user:hugues/KeyBindings.zsh
+++ b/user:hugues/KeyBindings.zsh
@@ -202,7 +202,7 @@ do
bindkey -M $keymap -s 'R' 'Q reset\n'
bindkey -M $keymap -s 't' 'Q todo\n'
- #bindkey -M $keymap -s 'T' 'Q todo all -c\n'
+ bindkey -M $keymap -s 'T' 'Q todo all -c\n'
bindkey -M $keymap -s 'é' ' 2>/dev/null '
bindkey -M $keymap -s '2' ' 2>&1 '
@@ -226,30 +226,30 @@ do
bindkey -M $keymap -s 'OC' 'forward-word'
bindkey -M $keymap -s 'OD' 'backward-word'
- bindkey -M $keymap "q" push-line
- bindkey -M $keymap "Q" push-line
+ bindkey -M $keymap 'q' push-line
+ bindkey -M $keymap 'Q' push-line
done
# redefines push-line for vicmd
-bindkey -M vicmd -s "q" "iq"
-bindkey -M vicmd -s "Q" "iQ"
+bindkey -M vicmd -s 'q' 'iq'
+bindkey -M vicmd -s 'Q' 'iQ'
# Sets vicmd-mode vim-compliant
-bindkey -M vicmd "u" "undo"
-bindkey -M vicmd "" "redo"
-bindkey -M vicmd "j" "history-search-forward"
-bindkey -M viins "j" "history-search-forward"
-bindkey -M vicmd "k" "history-search-backward"
-bindkey -M viins "k" "history-search-backward"
+bindkey -M vicmd 'u' 'undo'
+bindkey -M vicmd '' 'redo'
+bindkey -M vicmd 'j' 'history-search-forward'
+bindkey -M viins 'j' 'history-search-forward'
+bindkey -M vicmd 'k' 'history-search-backward'
+bindkey -M viins 'k' 'history-search-backward'
menuselect_vi-mode()
{
# Sets menuselect vim-compliant
- bindkey -M menuselect "j" "down-line-or-history"
- bindkey -M menuselect "k" "up-line-or-history"
- bindkey -M menuselect "h" "backward-char"
- bindkey -M menuselect "l" "forward-char"
+ bindkey -M menuselect 'j' 'down-line-or-history'
+ bindkey -M menuselect 'k' 'up-line-or-history'
+ bindkey -M menuselect 'h' 'backward-char'
+ bindkey -M menuselect 'l' 'forward-char'
}
# Enters vi-cmd mode at each prompt
@@ -259,7 +259,12 @@ menuselect_vi-mode()
# Show the current keymap used
zle-keymap-select()
{
- [ "$KEYMAP" != "main" ] && term_title " [$KEYMAP]" || term_title
+ if [ "$KEYMAP" != "main" ]
+ then
+ term_title " [$KEYMAP]"
+ else
+ term_title
+ fi
}
zle -N zle-keymap-select
#zle -N zle-line-init zle-keymap-select ## CRASHES UPON MULTILINE COMMAND...