Editing Multiple Lines in Vim

· by Victor Mendonça · Read in about 1 min · (65 words) ·

A simple way of to edit (like commenting or uncommenting) a block of lines/code in Vim.

The example below explains how to comment multiple lines:

  • Place the cursor on the first line that you’d like to edit
  • Press Ctrl+v
  • User the arrow keys to go down until the last line
  • Press Shift+i to go into insert mode
  • Press #
  • Press Esc and wait a second

code with