I am having a very long line file, I have to break the line into number of small lines.
Example:
< this>is a testing< /this>< next>testing< /next>< tested>successfully< /tested>
I have to break it into as of below
< this>is a testing< / this>
< next>testing< / next>
< tested>successfully< /tested>
for this I am trying to search for <
and add new line, but this results in:
< this>is a testing
< /this>
< next>testing
< /next>
< tested>successfully
< /tested>
What would be the correct command to fix this?
equalprg
to use these tools directly within vim (see:h 'equalprg'
)%s#<\(/\w\+>\|\w\+/>\)\zs#\r#g
, which will add a linebreak after each closing tag.