What’s the easiest way to delete the first 2 spaces for each line using VIM? Basically it’s repeating “2x” for each line.
Clarification: here the assumption is the first 2 characters are spaces. So the question is about doing indentation for multiple lines together.
Some more options. You can decided which is the “easiest way”.
Remove the first 2 characters of every line:
Remove first 2 characters of every line, only if they’re spaces:
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: