feat(neovim): update config
This commit is contained in:
parent
5e0b72ca74
commit
0a772c90b0
10 changed files with 251 additions and 215 deletions
22
home/editors/neovim/vim-surround-fix.vim
Normal file
22
home/editors/neovim/vim-surround-fix.vim
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue