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

4
vimrc
View file

@ -284,6 +284,7 @@ endif
nmap K K<cr> nmap K K<cr>
" stolen from auctex.vim " stolen from auctex.vim
if has('eval')
fun! EmacsKill() fun! EmacsKill()
if col(".") == strlen(getline(line(".")))+1 if col(".") == strlen(getline(line(".")))+1
let @" = "\<CR>" let @" = "\<CR>"
@ -292,6 +293,7 @@ fun! EmacsKill()
return "\<C-O>D" return "\<C-O>D"
endif endif
endfun 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$
if has('eval')
inoremap <buffer> <C-K> <C-R>=EmacsKill()<CR> inoremap <buffer> <C-K> <C-R>=EmacsKill()<CR>
endif
" Disable q and Q " Disable q and Q
map q <Nop> map q <Nop>