Quantcast
Channel: Tech Chorus - Micro How To
Viewing all articles
Browse latest Browse all 10

How To Comment Several Lines Quickly Using VIM

$
0
0

If you have to insert comment on several lines do you do manually insert the comment character in every line? Stop. Vim is a really good editor and has a nice feature to accomplish this quickly. Here are the steps:

  1. Enter visual blocking mode by pressing CTRL V (CTRL key and the lowercase v).
  2. Make your selection using motion keys(jklm, etc).
  3. Press I(uppercase I) to enter block insert mode.
  4. Press #, the comment character.
  5. Press Esc key. The comment character # will be inserted on each line the visual block selection.

Read more about visual blocking mode using the vim help topic visual-block. At the command line(:), type help visual-block.

Taxonomy upgrade extras: 

Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles



Latest Images