Created
April 22, 2015 10:59
-
-
Save 9bic/32954d4cc8f947bb39d6 to your computer and use it in GitHub Desktop.
jqコマンドでjsonをフォーマットする関数 in vim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if executable('jq') | |
function! FormatJson() | |
execute "%!jq '.'" | |
set filetype=json | |
endfunction | |
nmap <Leader>jf :call FormatJson()<CR> | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment