summaryrefslogtreecommitdiffstats
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/vimrc2
1 files changed, 2 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 4920e0e..9905035 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -192,6 +192,8 @@ vmap gt :s/\<\(\w\)\(\w*\)\>/\u\1\L\2/g<CR><C-L>
" Autoformat JSON jumbled data. (Selects the whole file as range to pass as
" standard input to `jq .` which pretty prints JSON. Then replace range with
" output.)
+" Thankyou: https://stackoverflow.com/questions/26214156/how-to-auto-format-json-on-save-in-vim
+nnoremap gJ :%!python3 -m json.tool<CR>
" :%!jq .
" NERDTree plugin