Reputation:
I saw a screencast where someone had highlighted a set of parenthesis and instantly converted them to curly braces. Is this a macro or a Vim thing?
Upvotes: 1
Views: 54
Reputation: 1854
They use vim surround plugin.
Quoting their Hello World.
It's easiest to explain with examples. Press
cs"'
inside"Hello world!"
to change it to
'Hello world!'
Upvotes: 2
Reputation: 195029
you can do it with surround.vim plugin. https://github.com/tpope/vim-surround
e.g.
when your cursor (*
) at : ( fo*o)
, press cs({
will change your text into { fo*o}
Upvotes: 4