Last Updated: February 25, 2016
·
1.443K
· vaskas

Shortcuts to format XML and JSON in place in Vim

Using these, I can have my XML and JSON files pretty-formatted in place:

map <leader>pj :%!python -m json.tool<CR>
map <leader>px :%!xmllint % --format<CR>