How to quickly remove a pair of parentheses, brackets, or braces in Vim?

后端 未结 5 922
忘了有多久
忘了有多久 2020-12-12 18:53

In Vim, if I have code such as (in Ruby):

anArray << [anElement]

and my cursor is on the first [, I can hop to ]

5条回答
  •  被撕碎了的回忆
    2020-12-12 19:47

    Using the Surround plugin for Vim, you can eliminate surrounding delimiters with ds.

    To install it via Vundle plugin, add

    Plugin 'tpope/vim-surround' 
    

    to your .vimrc file and run :PluginInstall.

提交回复
热议问题