From 72fb185c77f30dd65dc545f558d4d2082f4dffff Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Thu, 25 Feb 2016 11:33:02 -0500 Subject: [PATCH] updated js-beautify for json to use config file --- plugin/defaults.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/defaults.vim b/plugin/defaults.vim index 01ba6d1..6fcbdc0 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -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')