Based on this blogpost, use this Vim command to format the contents of a JSON file: ` :%!python -m json.tool `

That is all.