Correct indentation
I had a HTML file with correct indentation. I deleted the <html>
tags and <head>...</head>
. My file is now indented too in the right and I'd like to shift everything to the left (about four spaces).
I tried the gg=G
command without success
I tried it in visual mode by pressing V
, selecting everyline, pressing I
, deleting four spaces and pressing ESC
- without success.
Is there some trick that can shift the indentation to the l开发者_C百科eft?
thank you
Try <G
in the command mode.
Select the lines, then press:
<
For more info:
:help shift-left-right
You could also use CTRL-V
to enter block mode select, then delete the columns you don't want. You can also use CTRL-V
to select a column then use <
or >
to indent/unindent only text to the right of that column (that can be very handy).
I'm not sure I follow. Is it still an html file? If not, then just give the filename a different extension (e.g., '.txt') and reopen it. Then you can adjust indents however you want without the automatic html indenting being a problem.
精彩评论