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>
Written by Vasily Mikhaylichenko
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#