diff --git a/.vim/vimrc b/.vim/vimrc index 8367a64..e988c8d 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -874,6 +874,15 @@ nmap tl :TestLast nmap g :TestVisit +""" formatingt with jq as per https://davidisaksson.dev/posts/format-json-in-vim/ +" Whole buffer +nnoremap fj %!jq +nnoremap fcj %!jq --compact-output +" Visual selection +vnoremap fj :'<,'>!jq +vnoremap fcj :'<,'>!jq --compact-output + + " partially superseded by jasonccox/vim-wayland-clipboard (for "+) " still keeping the "* mappings " it however breaks