Created
August 20, 2012 08:37
-
-
Save ptitfred/3402279 to your computer and use it in GitHub Desktop.
Pretty format your XML in VIM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! PrettyXML() | |
silent %!xmllint --format --encode UTF-8 --recover - 2>/dev/null | |
endfunction | |
command! Fxml call PrettyXML() | |
"-- format xml when trigger Ctrl-Shift-F (only if filetype=xml) | |
autocmd FileType xml map <C-S-F> :Fxml<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment