I merged a python file using vimdiff, and the result has something like this:
def code():
line 1
line 2
line 3
line 4
...
line n
In this state, the indentation is inconsistent. How could I remove all the spaces in front of the lines? I tried in Visual mode, but it's selecting the whole line. Does vim have a multiline edit? Notepad++ allows this with Alt-Shift.
Ctrl-V
to select blocks.
Or, to remove all white-space at the start of all lines in the file:
:%s/^\s\+
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With