Format JSON in vim using Python’s json.tool module

Posted on
Life

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

That is all.