vim: delete the first 2 spaces for multiple lines

Solution 1:

  1. Enter visual block mode with Ctrl-V (or Ctrl-Q if you use Ctrl-V for paste);
  2. Select the area to delete with the arrows;
  3. Then press d to delete the selected area.
  4. Press Esc

Solution 2:

Some more options. You can decided which is the "easiest way".

Remove the first 2 characters of every line:

:%normal 2x

Remove first 2 characters of every line, only if they're spaces:

:%s/^  /

Note that the last slash is optional, and is only here so that you can see the two spaces. Without the slash, it's only 7 characters, including the :.

Move indentation to left for every line:

:%normal <<