Vim Surround 在单词周围插入额外的空间

当我选择这个单词并使用 S的环绕插件:

foobar

它变成了

( foobar )

如何删除多余的空格,使其变成

(foobar)

我应该在设置中放置什么?

8385 次浏览

If you type S(, it will be surrounded by spaces. However if you use the closing ) instead S) it will not be surrounded by spaces.

This applies of course to all bracket pair surroundings, <> [] {} (), not merely to (), although the behavior of S< is such that it expects a tag enclosure so only S> is able to surround as <>.

When you use the surround plugin you can use:

cs) instead of cs( to surround without space :).