Skip to content

Instantly share code, notes, and snippets.

@9bic
Created April 22, 2015 10:59
Show Gist options
  • Save 9bic/32954d4cc8f947bb39d6 to your computer and use it in GitHub Desktop.
Save 9bic/32954d4cc8f947bb39d6 to your computer and use it in GitHub Desktop.
jqコマンドでjsonをフォーマットする関数 in vim
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