4 ms·
Is there a good way by default to wrap a visual selection in braces/parens/brackets?
by cma 6y ago
Is there a good way by default to wrap a visual selection in braces/parens/brackets?
- ludsan 6y agoI use vim-surround. https://github.com/tpope/vim-surround https://github.com/tpope/vim-surround
- caymanjim 6y agoGreat plugin. Everything Tim Pope produces is gold. All Vim users should check out his whole collection on GitHub.
- SpaceNugget 6y agoA fairly easy way to do it is either c()^[P or c(^r") The first leaves you in normal mode the second in insert mode. I recommend vim-surround by tpope though.
- thanato0s 6y agoI used vim-surround for a long time, but I prefer vim-sandwich now: https://github.com/machakann/vim-sandwich https://github.com/machakann/vim-sandwich