I added to my “.vimrc” file:
map <F2> <Esc>:1,$!xmllint --format -<CR>
Now I can press “F2″ button, and vim indents the text.
通过在.vimrc文件中添加一行映射命令,可以实现按下F2键后,Vim会自动使用xmllint工具对当前XML文档进行格式化处理。
I added to my “.vimrc” file:
map <F2> <Esc>:1,$!xmllint --format -<CR>
Now I can press “F2″ button, and vim indents the text.
521

被折叠的 条评论
为什么被折叠?