dotfiles/vim/ftplugin/json.vim
2022-08-30 14:29:18 -04:00

5 lines
193 B
VimL

com! MinifyJSON :%!python3 -c 'import json, sys;json.dump(json.load(sys.stdin), sys.stdout)'
com! FormatJSON :%!python3 -m json.tool
map <buffer><leader>= :FormatJSON<cr>
set foldmethod=syntax