Thursday, September 29, 2016

How to format xml inside Vi using external commando like xmllint

Open a xml file
vi input.xml

and execute command
:%!xmllint --format -


%! (pipe current buffer to xmllint command)
xmllint --formart - ( the "-" use the piped data as input )

No comments:

Blog Archive