updated js-beautify for json to use config file

This commit is contained in:
Steve Dignam 2016-02-25 11:33:02 -05:00
parent a2f9b88bcd
commit 72fb185c77

View File

@ -112,7 +112,13 @@ endif
" JSON
if !exists('g:formatdef_jsbeautify_json')
let g:formatdef_jsbeautify_json = '"js-beautify -f - -".(&expandtab ? "s ".shiftwidth() : "t")'
if filereadable('.jsbeautifyrc')
let g:formatdef_jsbeautify_json = '"js-beautify"'
elseif filereadable(expand('~/.jsbeautifyrc'))
let g:formatdef_jsbeautify_json = '"js-beautify"'
else
let g:formatdef_jsbeautify_json = '"js-beautify -f - -".(&expandtab ? "s ".shiftwidth() : "t")'
endif
endif
if !exists('g:formatdef_pyjsbeautify_json')