updated js-beautify formatter to use config file

This commit is contained in:
Steve Dignam 2016-02-22 14:55:23 -05:00
parent e637f7862d
commit 896998c368

View File

@ -84,8 +84,14 @@ endif
" Javascript " Javascript
if !exists('g:formatdef_jsbeautify_javascript') if !exists('g:formatdef_jsbeautify_javascript')
if filereadable('.jsbeautifyrc')
let g:formatdef_jsbeautify_javascript = '"js-beautify"'
elseif filereadable(expand('~/.jsbeautifyrc'))
let g:formatdef_jsbeautify_javascript = '"js-beautify"'
else
let g:formatdef_jsbeautify_javascript = '"js-beautify -f - -".(&expandtab ? "s ".shiftwidth() : "t").(&textwidth ? " -w ".&textwidth : "")' let g:formatdef_jsbeautify_javascript = '"js-beautify -f - -".(&expandtab ? "s ".shiftwidth() : "t").(&textwidth ? " -w ".&textwidth : "")'
endif endif
endif
if !exists('g:formatdef_pyjsbeautify_javascript') if !exists('g:formatdef_pyjsbeautify_javascript')
let g:formatdef_pyjsbeautify_javascript = '"js-beautify -".(&expandtab ? "s ".shiftwidth() : "t").(&textwidth ? " -w ".&textwidth : "")." -"' let g:formatdef_pyjsbeautify_javascript = '"js-beautify -".(&expandtab ? "s ".shiftwidth() : "t").(&textwidth ? " -w ".&textwidth : "")." -"'