Enclosing in parentheses with Vim

For one word, I’ve been using:

bcw()<Esc>P

That is, go to the start of the word, cut the word and go into insert mode, type the brackets and then exit insert mode and paste the word back in.

Keep in mind that this will overwrite your yank register.

You can, of course replace bcw with whatever movement and selection types you need, like

5cc{<Enter>}<Esc>P

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)