max-damage
New Member
Is there an easy way within \[code\]vi\[/code\] to make your XML text "pretty"?For example:I want this..\[code\] <person> <name>Nick</name> <age>26</age> <gender>male</gender><occupation>doctor<occupation> </person>\[/code\]to be this (including the spaces)...\[code\]<person> <name>Nick</name> <age>26</age> <gender>male</gender> <occupation>doctor<occupation></person>\[/code\]I've tried using these commands within \[code\]vi\[/code\]:\[code\]:set filetype=xml:filetype indent ongg=G\[/code\]But it just removes all of my indentation I had. So now, everything look like this:\[code\]<person><name>Nick</name><age>26</age><gender>male</gender><occupation>doctor<occupation></person>\[/code\]