Last Updated: September 30, 2021
·
1.16K
· johnmurray

Format JSON within vim

If you work a lot with web services, like myself, the you will find this infinitely helpful when working with unformatted json. Just open your JSON file (unformatted) and run the command:

:%!python -mjson.tool

voilà!