Pretty format a json file in vim with jq
Viewing a minified or unformatted json in vim can be a headache. But luckily for us, that's an easy fix if you have jq
installed. The following command will pass the contents of your current buffer to the jq
external command for formatting:
:!% jq .
https://stedolan.github.io/jq/
Tweet