News for hackers. Stuff that matters.
Re:Vim 8.0 is coming by aidos on Wednesday April 13, 2016 @06:13AM (#11486985)
If I want to put parens around a word I do, ciw()<ESC>P (change word pulls it into the default register, insert the parens and then paste from the register back between the parens).

You can use the same pattern for any selection you have visually highlighted, such is the wonderful power of vim.

Re:Vim 8.0 is coming by thomasahle on Wednesday April 13, 2016 @06:27AM (#11487034)
Nice use of the buffer. Is there a nice hack to remove the parentheses around a word as well?
Re:Vim 8.0 is coming by aidos on Wednesday April 13, 2016 @06:36AM (#11487064)
I guess you could do a similar thing: ci(<backspace><delete><esc>p
Re:Vim 8.0 is coming by ksmithbaylor on Wednesday April 13, 2016 @07:53AM (#11487369)
ca( would work for this as well.
Re:Vim 8.0 is coming by saltycraig on Wednesday April 13, 2016 @09:04AM (#11487758)
If you have the cursor just before the area you could do: 'dt)' meaning delete to next ), or 'ct)' to delete until next ) and the drop into insert mode. Learning word objects in Vim for me is one of the killer features, and one thing I miss in Emacs.
Re:Vim 8.0 is coming by mkehrt on Wednesday April 13, 2016 @03:08PM (#11491229)
Take a look at vim-surround, which adds mappings for a lot of things like this.
Re:Vim 8.0 is coming by sillysaurus3 on Wednesday April 13, 2016 @06:18AM (#11487003)
Handy trick. Thanks!