User Tools

Site Tools


comment_lines_with_vim

Comment lines with VIM

  1. First, go to the first line you want to comment, press Ctrl-V. This will put the editor in the VISUAL BLOCK mode.
  2. Then using the arrow key select until the last line
  3. Press Shift-I, which will put the editor in INSERT mode and then press #. This will add a hash to the first line.
  4. Press Esc (give it a second), and it will insert a # character on all other selected lines.

source: https://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim

comment_lines_with_vim.txt · Last modified: 2023/04/22 22:27 by wikiadmin