Merge py cli and js cli js-beautify definitions.
This commit is contained in:
parent
31c2de2398
commit
889665717c
@ -140,14 +140,10 @@ if !exists('g:formatdef_jsbeautify_javascript')
|
|||||||
elseif filereadable(expand('~/.jsbeautifyrc'))
|
elseif filereadable(expand('~/.jsbeautifyrc'))
|
||||||
let g:formatdef_jsbeautify_javascript = '"js-beautify"'
|
let g:formatdef_jsbeautify_javascript = '"js-beautify"'
|
||||||
else
|
else
|
||||||
let g:formatdef_jsbeautify_javascript = '"js-beautify -X -f - -".(&expandtab ? "s ".shiftwidth() : "t").(&textwidth ? " -w ".&textwidth : "")'
|
let g:formatdef_jsbeautify_javascript = '"js-beautify -X -".(&expandtab ? "s ".shiftwidth() : "t").(&textwidth ? " -w ".&textwidth : "")'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists('g:formatdef_pyjsbeautify_javascript')
|
|
||||||
let g:formatdef_pyjsbeautify_javascript = '"js-beautify -X -".(&expandtab ? "s ".shiftwidth() : "t").(&textwidth ? " -w ".&textwidth : "")." -"'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:formatdef_jscs')
|
if !exists('g:formatdef_jscs')
|
||||||
let g:formatdef_jscs = '"jscs -x"'
|
let g:formatdef_jscs = '"jscs -x"'
|
||||||
endif
|
endif
|
||||||
@ -207,7 +203,6 @@ if !exists('g:formatters_javascript')
|
|||||||
let g:formatters_javascript = [
|
let g:formatters_javascript = [
|
||||||
\ 'eslint_local',
|
\ 'eslint_local',
|
||||||
\ 'jsbeautify_javascript',
|
\ 'jsbeautify_javascript',
|
||||||
\ 'pyjsbeautify_javascript',
|
|
||||||
\ 'jscs',
|
\ 'jscs',
|
||||||
\ 'standard_javascript',
|
\ 'standard_javascript',
|
||||||
\ 'xo_javascript'
|
\ 'xo_javascript'
|
||||||
@ -221,18 +216,14 @@ if !exists('g:formatdef_jsbeautify_json')
|
|||||||
elseif filereadable(expand('~/.jsbeautifyrc'))
|
elseif filereadable(expand('~/.jsbeautifyrc'))
|
||||||
let g:formatdef_jsbeautify_json = '"js-beautify"'
|
let g:formatdef_jsbeautify_json = '"js-beautify"'
|
||||||
else
|
else
|
||||||
let g:formatdef_jsbeautify_json = '"js-beautify -f - -".(&expandtab ? "s ".shiftwidth() : "t")'
|
let g:formatdef_jsbeautify_json = '"js-beautify -".(&expandtab ? "s ".shiftwidth() : "t")'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists('g:formatdef_pyjsbeautify_json')
|
|
||||||
let g:formatdef_pyjsbeautify_json = '"js-beautify -".(&expandtab ? "s ".shiftwidth() : "t")." -"'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:formatters_json')
|
if !exists('g:formatters_json')
|
||||||
let g:formatters_json = [
|
let g:formatters_json = [
|
||||||
\ 'jsbeautify_json',
|
\ 'jsbeautify_json',
|
||||||
\ 'pyjsbeautify_json',
|
|
||||||
\ ]
|
\ ]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
4
samples/test.json
Normal file
4
samples/test.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"test": "test",
|
||||||
|
"test": [1, 2, 3]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user