fix vi mode escape issue in zsh

This commit is contained in:
Thomas Ruoff
2015-09-27 23:18:54 +02:00
committed by Thomas Ruoff
parent cc6d308a13
commit 372eec7381
2 changed files with 7 additions and 3 deletions

3
vimrc
View File

@@ -208,9 +208,6 @@ nmap <leader>r :%s#\<<C-r>=expand("<cword>")<CR>\>#
"" strip all trailing whitespace in the current file "" strip all trailing whitespace in the current file
nnoremap <leader>W :%s/\s\+$//e<cr>:let @/=''<CR> nnoremap <leader>W :%s/\s\+$//e<cr>:let @/=''<CR>
"" insert path of current file into a command
cmap <C-P> <C-R>=expand("%:p:h") . "/" <CR>
"" fast editing of the .vimrc "" fast editing of the .vimrc
nmap <silent> <leader>ev :e $MYVIMRC<cr> nmap <silent> <leader>ev :e $MYVIMRC<cr>
nmap <silent> <leader>sv :so $MYVIMRC<cr> nmap <silent> <leader>sv :so $MYVIMRC<cr>

7
zshrc
View File

@@ -47,6 +47,13 @@ alias ls='ls --color=tty'
# keybindings # keybindings
bindkey -v bindkey -v
export KEYTIMEOUT=1
# prevent 2*ESC-i insert-mode switch failure
noop () { }
zle -N noop
bindkey -M vicmd '\e' noop
bindkey '^P' up-history bindkey '^P' up-history
bindkey '^N' down-history bindkey '^N' down-history