|
@@ -65,6 +65,32 @@ alias emacs='emacs -nw'
|
|
# alias for getting latest file in a folder
|
|
# alias for getting latest file in a folder
|
|
alias latest='ls -t | head -n 1'
|
|
alias latest='ls -t | head -n 1'
|
|
|
|
|
|
|
|
+# vi bindings
|
|
|
|
+bindkey -v
|
|
|
|
+export KEYTIMEOUT=1
|
|
|
|
+
|
|
|
|
+bindkey '^P' up-history
|
|
|
|
+bindkey '^N' down-history
|
|
|
|
+bindkey '^?' backward-delete-char
|
|
|
|
+bindkey '^h' backward-delete-char
|
|
|
|
+bindkey '^w' backward-kill-word
|
|
|
|
+bindkey '^r' history-incremental-search-backward
|
|
|
|
+
|
|
|
|
+function zle-line-init zle-keymap-select {
|
|
|
|
+ VIM_PROMPT="%{$fg_bold[yellow]%} [% NORMAL]% %{$reset_color%}"
|
|
|
|
+ RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $EPS1"
|
|
|
|
+ zle reset-prompt
|
|
|
|
+}
|
|
|
|
+function zle-line-finish {
|
|
|
|
+ VIM_PROMPT=""
|
|
|
|
+ RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $EPS1"
|
|
|
|
+ zle reset-prompt
|
|
|
|
+}
|
|
|
|
+RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $EPS1"
|
|
|
|
+
|
|
|
|
+zle -N zle-line-init
|
|
|
|
+zle -N zle-keymap-select
|
|
|
|
+
|
|
# grml
|
|
# grml
|
|
if [ ! $ZSH_CUSTOM ]
|
|
if [ ! $ZSH_CUSTOM ]
|
|
then
|
|
then
|