vim-surround not working for me. s key deletes instead of surrounds

梦想与她 提交于 2020-01-01 01:12:08

问题


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.



来源:https://stackoverflow.com/questions/13497990/vim-surround-not-working-for-me-s-key-deletes-instead-of-surrounds

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!