add CSS formatting (using css-beautify) to defaults

This commit is contained in:
Curtis Harvey 2014-05-30 13:42:30 -07:00
parent a5ef8d6caa
commit 46a36c8e3a
2 changed files with 13 additions and 0 deletions

View File

@ -77,6 +77,11 @@ It is shipped with `js-beautify`, which can be installed by running `npm install
Note that `nodejs` is needed for this to work. Note that `nodejs` is needed for this to work.
Here is the link to the repository: https://github.com/einars/js-beautify. Here is the link to the repository: https://github.com/einars/js-beautify.
* `css-beautify` for __CSS__.
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.
Here is the link to the repository: https://github.com/einars/js-beautify.
* `tidy` for __XHTML__ and __XML__. * `tidy` for __XHTML__ and __XML__.
It's probably in your distro's repository, so you can download it as a regular package. It's probably in your distro's repository, so you can download it as a regular package.
For Ubuntu type `sudo apt-get install tidy` in a terminal. For Ubuntu type `sudo apt-get install tidy` in a terminal.
@ -124,6 +129,9 @@ If you have any suggestions on this plugin or on this readme, if you have some n
Change log Change log
---------- ----------
### May 30 2014
* Added `css-beautify` to the defaults for formatting CSS files
### December 20 2013 ### December 20 2013
* `html-beautify` is now the default for HTML since it seems to be better maintained, and seems to handle inline javascript neatly. * `html-beautify` is now the default for HTML since it seems to be better maintained, and seems to handle inline javascript neatly.
* The `formatters/` folder is no longer supported anymore, because it is unnecessary. * The `formatters/` folder is no longer supported anymore, because it is unnecessary.

View File

@ -33,6 +33,11 @@ if !exists("g:formatprg_args_expr_xhtml") && !exists("g:formatprg_args_xhtml")
let g:formatprg_args_expr_xhtml = '"-q --show-errors 0 --show-warnings 0 --force-output --indent auto --indent-spaces ".&shiftwidth." --vertical-space yes --tidy-mark no -asxhtml -wrap ".&textwidth' let g:formatprg_args_expr_xhtml = '"-q --show-errors 0 --show-warnings 0 --force-output --indent auto --indent-spaces ".&shiftwidth." --vertical-space yes --tidy-mark no -asxhtml -wrap ".&textwidth'
endif endif
if !exists("g:formatprg_css") | let g:formatprg_css = "css-beautify" | endif
if !exists("g:formatprg_args_expr_css") && !exists("g:formatprg_args_css")
let g:formatprg_args_expr_css = '"-f - -s ".&shiftwidth'
endif
if !exists("g:formatprg_html") | let g:formatprg_html = "html-beautify" | endif if !exists("g:formatprg_html") | let g:formatprg_html = "html-beautify" | endif
if !exists("g:formatprg_args_expr_html") && !exists("g:formatprg_args_html") if !exists("g:formatprg_args_expr_html") && !exists("g:formatprg_args_html")
let g:formatprg_args_expr_html = '"-f - -s ".&shiftwidth' let g:formatprg_args_expr_html = '"-f - -s ".&shiftwidth'