Skip to content

Instantly share code, notes, and snippets.

@tralston
Created August 20, 2017 23:42
Show Gist options
  • Save tralston/e2bbd49e8d07fa2bc28d31319051ef3c to your computer and use it in GitHub Desktop.
Save tralston/e2bbd49e8d07fa2bc28d31319051ef3c to your computer and use it in GitHub Desktop.
[Clean up JSON from vim] #JSON #vim

Usage

:%!python -m json.tool

Requires python to be installed. This command can also be stored in a macro in .vimrc:

function! FormatJSON()
:%!python -m json.tool
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment