How to format JSON in Vim

Vim is amazing. Well, Python is doing all the work, but I still like Vim.

1

Paste your ugly JSON in Vim

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

2

Use Python to format the JSON

In normal mode type:

:%!python -m json.tool

Beautiful.