The following shows how to replicate some of Surround's features if you don't happen to have it installed.
NOTE: We only dealt with the simplest cases, here, and the convoluted nature of some of these commands shows how well designed and useful that plugin is. And let's not talk about all the corner cases it handles.
Install it, it's worth it.
-
ys<motion><thing>Surround current word with parentheses
With surround:
ysiw)Native:
ciw(<C-r>")<Esc> -
vS<thing>Surround current visual selection with square brackets
With surround:
S]Native:
c[<C-r>"]<Esc>
-
ds',ds", andds`Delete surrounding single quotes
With surround:
ds'Native:
di'vhP -
ds<with<:>added to:help matchpairs,ds(,ds{, andds[Delete surrounding parentheses
With surround:
ds)Native:
di(v%P -
dstDelete surrounding *ML tag
With surround:
dstNative:
ditvatP
-
cs'<thing>,cs"<thing>, andcs`<thing>Change surrounding single quotes to double quotes
With surround:
cs'"Native:
di'vh"_c"<C-r>""<Esc> -
cs<<thing>with<:>added to:help matchpairs,cs(<thing>,cs{<thing>, andcs[<thing>Change surrounding parentheses to braces
With surround:
cs)}Native:
di("_c%{<C-r>"}<Esc> -
cst<new>Change surrounding *ML tag to
<new>…</new>With surround:
cst<new<CR>Native:
dit"_cat<new><C-r>"</new><Esc>
Good writing. Maybe too good so that now I'm more interested in those edge cases that really require a plugin / make the native-gang dumb.
To nitpick, I would say that apparently you must know
di(vhPwhen you wrotedi(v%P, and that made me laugh. (I hate typing the%symbol, personally)