diff --git a/.vimrc b/.vimrc index b0c691a..167db32 100644 --- a/.vimrc +++ b/.vimrc @@ -338,5 +338,7 @@ endif " source $VIMRUNTIME/vimrc_example.vim " source $VIMRUNTIME/mswin.vim - - +" +" use FormatXML or `=` to format xml need python3 installed +com! FormatXML :%!python3 -c "import xml.dom.minidom, sys; print(xml.dom.minidom.parse(sys.stdin).toprettyxml())" +nnoremap = :FormatXML