From 9a9314d351edd7c734b3367140bc203f5e9ca6de Mon Sep 17 00:00:00 2001 From: Michael Robinson Date: Thu, 21 May 2015 00:56:29 +1200 Subject: [PATCH 1/2] Added jscs definition for JavaScript --- plugin/defaults.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/defaults.vim b/plugin/defaults.vim index a06e623..74df2d9 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -63,8 +63,12 @@ endif " Javascript let g:formatdef_jsbeautify_javascript = '"js-beautify -f - -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")' +let g:formatdef_jscs_javascript = 'jscs' if !exists('g:formatters_javascript') - let g:formatters_javascript = ['jsbeautify_javascript'] + let g:formatters_javascript = [ + \ 'jsbeautify_javascript', + \ 'jscs' + \ ] endif From 57b34851c3dce8b99c0ede4f12b856d1bd78ee2e Mon Sep 17 00:00:00 2001 From: Michael Robinson Date: Thu, 21 May 2015 01:05:56 +1200 Subject: [PATCH 2/2] Updated jscs default --- plugin/defaults.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/defaults.vim b/plugin/defaults.vim index 74df2d9..12bbf11 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -63,7 +63,7 @@ endif " Javascript let g:formatdef_jsbeautify_javascript = '"js-beautify -f - -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")' -let g:formatdef_jscs_javascript = 'jscs' +let g:formatdef_jscs = '"jscs -x"' if !exists('g:formatters_javascript') let g:formatters_javascript = [ \ 'jsbeautify_javascript',