4 ms·
Surround is a plugin which adds more text objects: https://github.com/tpope/vim-surround https://github.com/tpope/vim-surround cs"': change surrounding quotes,
by tomn 4y ago
Surround is a plugin which adds more text objects: https://github.com/tpope/vim-surround https://github.com/tpope/vim-surround
cs"': change surrounding quotes, e.g. "foo" -> 'foo'
cs([: change surrounding brackets, e.g. (foo) -> [ foo ]
( cs]) would omit the spaces)
ci": change in quotes, e.g. "foo" -> "" (in insert mode between the quotes)
ca": change around quotes, e.g. x"foo"y -> xy (in insert mode between x and y
viWS<tag>: add tag around current word using visual mode, e.g. foo -> <tag>foo</tag>
dst: delete surrounding tag, e.g. <tag>foo</tag> -> foo
It's really good. I'm not familiar with argument.