vim-surround not working for me. s key deletes ins

2019-03-17 10:35发布

问题:

Just installed the surround plugin.

New buffer, type Hello World. Say I want to surround that with quotes.

In normal mode, V to get into visual mode, s to get into surround

Except it doesn't, s deletes the entire line.

回答1:

The default visual mode mapping of surround.vim is Shift-S, not lowercase s.

You can check whether it's defined with :verbose vmap S. Do the other surround.vim mappings (ys, cs, ...) work? If not, check :scriptnames and :set runtimepath? for troubleshooting.



回答2:

This can also be a key binding collision with the yankstack plugin. To fix it, append call yankstack#setup() to your .vimrc file. For more info, see the discussion on GitHub.