How to Format JSON in Vim

Tyler Tyler (258)
0

Vim is amazing. Well, Python is doing all the work, but I still like Vim. Learn how to format JSON in Vim like a pro with this short guide!

Posted in these interests:

vim
PRIMARY
15 subscribers
python
86 subscribers
Paste your ugly JSON in Vim

Enter visual mode using 'v' and paste the ugly JSON.

Use Python to format the JSON

In normal mode type:

:%!python -m json.tool

Beautiful.