//Formatting XML & HTML with HTML Tidy
  1. Get the tidy program from http://www.w3.org/People/Raggett/tidy/
  2. Unzip and run it from the command line, or, place it in your VIM runtime directory, add the following lines to your .vimrc, and when you visually select some text and type ,x on the command line, the selected text will be indented.

“—–
” select xml text to format and hit ,x
vmap ,x :!tidy -q -i –newline LF -xml<CR>
“—

 

By |2008-07-31T12:00:48+00:00July 31st, 2008|Articles|0 Comments

About the Author: