What's the most elegant way of commenting / uncommenting blocks of ruby code in Vim?

前端 未结 10 700
悲哀的现实
悲哀的现实 2021-01-30 13:23

In VIM, at the moment when I need to comment out a section of Ruby code:

  • I navigate to the first column in the row I want to comment out
  • I press CTRL-v t
10条回答
  •  爱一瞬间的悲伤
    2021-01-30 14:01

    After visually selecting, in block mode, the text you want to comment out, hit I (that is a capital i), type # and finally hit the escape key. It's basically the same procedure you are using currently, but using insert instead of replace.

提交回复
热议问题