feat(neovim): update config

This commit is contained in:
Felix Schröter 2020-09-26 23:54:07 +02:00
parent 5e0b72ca74
commit 0a772c90b0
No known key found for this signature in database
GPG key ID: 910ACB9F6BD26F58
10 changed files with 251 additions and 215 deletions

View file

@ -0,0 +1,22 @@
" fix for vim-surround in neovim
" https://github.com/tpope/vim-surround/issues/272
let g:surround_no_mappings = 1
function! SurroundOp(char)
if v:operator ==# 'd'
return "\<plug>D" . a:char . "urround"
elseif v:operator ==# 'c'
return "\<plug>C" . a:char . "urround"
elseif v:operator ==# 'y'
return "\<plug>Y" . a:char . "urround"
endif
return ''
endfunction
omap <expr> s '<esc>'.SurroundOp('s')
omap <expr> S '<esc>'.SurroundOp('S')
imap <C-S> <Plug>Isurround
imap <C-G>s <Plug>Isurround
imap <C-G>S <Plug>ISurround