10 years ago
When you press =j, the current buffer is auto-formatted using python's json library.
" Somewhere in .vimrc nnoremap =j :%!python -m json.tool<CR>
yang-ling 10 years ago
I suggest a vim plugin vim-jsbeautify: https://github.com/maksimr/vim-jsbeautify.
Just set json filetype to javascript and execute :call JsBeautify()
garnerh42 10 years ago
Wish there was a way to change the indent. But still useful!