" fix for timeout issue with vim-surround in neovim " but it also breaks yss " https://github.com/tpope/vim-surround/issues/272 let g:surround_no_mappings = 1 function! SurroundOp(char) if v:operator ==# 'd' return "\D" . a:char . "urround" elseif v:operator ==# 'c' return "\C" . a:char . "urround" elseif v:operator ==# 'y' return "\Y" . a:char . "urround" endif return '' endfunction omap s ''.SurroundOp('s') omap S ''.SurroundOp('S') imap Isurround imap s Isurround imap S ISurround