I have an HTML file that doesn't have any line breaks. Practically a huge portion of it is in a single line. I was trying to tidy that in Vim; I tried gg=G
, which just tried to intend the first four lines that were on separate lines.
I tried that after the following commands:
:filetype indent on
:set filetype=html
:set smartindent
note:
- I tried in Sublime and it beautifully did it.
- I tested with this: http://pastebin.com/TgXnq2ef
You can probably do it without plugin :)
Test this
to split lines then remove spaces with
finally
Hope it works :)