Merge branch 'bbqtd-standard-js'

This commit is contained in:
Chiel ten Brinke 2016-11-02 10:20:12 +01:00
commit 15ee797ad3
2 changed files with 13 additions and 1 deletions

View File

@ -153,6 +153,10 @@ Here is a list of formatprograms that are supported by default, and thus will be
* `JSCS` for __Javascript__. http://jscs.info/ * `JSCS` for __Javascript__. http://jscs.info/
* `standard` for __Javascript__.
It can be installed by running `npm install -g standard` (`nodejs` is required). No more configuration needed.
More information about the style guide can be found here: http://standardjs.com/.
* `html-beautify` for __HTML__. * `html-beautify` for __HTML__.
It is shipped with `js-beautify`, which can be installed by running `npm install -g js-beautify`. It is shipped with `js-beautify`, which can be installed by running `npm install -g js-beautify`.
Note that `nodejs` is needed for this to work. Note that `nodejs` is needed for this to work.
@ -303,6 +307,9 @@ contact me by creating an issue in this repository.
## Change log ## Change log
### October 2016
* Add `standard` formatter for JavaScript.
### April 2016 ### April 2016
* Add `yapf` as a secondary Python formatter. * Add `yapf` as a secondary Python formatter.

View File

@ -152,11 +152,16 @@ if !exists('g:formatdef_jscs')
let g:formatdef_jscs = '"jscs -x"' let g:formatdef_jscs = '"jscs -x"'
endif endif
if !exists('g:formatdef_standard_javascript')
let g:formatdef_standard_javascript = '"standard --fix --stdin"'
endif
if !exists('g:formatters_javascript') if !exists('g:formatters_javascript')
let g:formatters_javascript = [ let g:formatters_javascript = [
\ 'jsbeautify_javascript', \ 'jsbeautify_javascript',
\ 'pyjsbeautify_javascript', \ 'pyjsbeautify_javascript',
\ 'jscs' \ 'jscs',
\ 'standard_javascript'
\ ] \ ]
endif endif