vim: delete the first 2 spaces for multiple lines
问题 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. 回答1: 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