ys
(you surround)ys
takes a valid vim motion or text object as first argument
ysiw"
: surround inner word with "yss]
: surround current line with ]ys2aw*
: add * around 2 wordsvS
mappingvS"
: visually surround selected text with "yswt
: prompt & surround with a html tagIf a t or < is specified, Vim prompts for an HTML/XML tag to insert (also supports adding attributes)
yswf
: prompt & surround with a function callIf a f is specified, Vim prompts for an function name to insert (use F to add space around ())
cs
(change surround)Takes 2 arguments a target to replace & a replacement character
cs])
: change surrounding [] with ()cst<h3>
: change surrounding html tag with h3ds
(delete surround)ds"
: delete surrounding "dst
: delete surrounding tag (HTML):helpg surround
for more docs.