mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-04-13 09:30:06 +00:00
only do emacs like C-k if on vim w/ eval
This commit is contained in:
parent
a43c50281e
commit
ee21ffe0b2
1 changed files with 13 additions and 9 deletions
22
vimrc
22
vimrc
|
@ -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>
|
||||||
|
|
Loading…
Add table
Reference in a new issue