Thursday, October 27, 2011

Shortcut to indent xml

Hi,

"full file indent
fun BenIndent()
let oldLine=line('.')
normal gg=G
execute ':' . oldLine
endfun
"map -- :call BenIndent()<Bar>normal zz<CR>
map -- :call BenIndent()<CR>

I use the above code to indent other file format. I see xml can be
indented in the following URL. However, I want to be able to indent
xml as well when I press '--'. Does anybody if there is a way to do
so?


http://vim.wikia.com/wiki/Format_your_xml_document_using_xmllint

--
Regards,
Peng

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: