only do emacs like C-k if on vim w/ eval

This commit is contained in:
David Majnemer 2010-06-19 12:58:00 -07:00
parent a43c50281e
commit ee21ffe0b2

22
vimrc
View file

@ -284,14 +284,16 @@ endif
nmap K K<cr> nmap K K<cr>
" stolen from auctex.vim " stolen from auctex.vim
fun! EmacsKill() if has('eval')
if col(".") == strlen(getline(line(".")))+1 fun! EmacsKill()
let @" = "\<CR>" if col(".") == strlen(getline(line(".")))+1
return "\<Del>" let @" = "\<CR>"
else return "\<Del>"
return "\<C-O>D" else
endif return "\<C-O>D"
endfun endif
endfun
endif
" some emacs-isms are OK " some emacs-isms are OK
map! <C-a> <Home> map! <C-a> <Home>
@ -299,7 +301,9 @@ map <C-a> <Home>
map! <C-e> <End> map! <C-e> <End>
map <C-e> <End> map <C-e> <End>
map <C-k> d$ map <C-k> d$
inoremap <buffer> <C-K> <C-R>=EmacsKill()<CR> if has('eval')
inoremap <buffer> <C-K> <C-R>=EmacsKill()<CR>
endif
" Disable q and Q " Disable q and Q
map q <Nop> map q <Nop>