VimPlugin: surround

From wikinotes
Revision as of 14:53, 8 July 2023 by Will (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Add/Change/Remove markers/tags around text-objects (ex. quotes, html elements, parentheses, ..)

Documentation

repo https://github.com/tpope/vim-surround

Usage

ys${TEXTOBJ}${MARK}  " add mark (ex. '(' ) around ${TEXTOBJ} (ex. 'iw' innerword)
yss${MARK}           " add mark (ex. '(' ) around entire line

cs${OLD}${NEW}       " change surrounding mark $OLD to $NEW
ds${OLD}             " delete surrounding mark $OLD