Add tidy definition for html

This commit is contained in:
Chiel92 2015-06-13 17:53:44 +02:00
parent 35eb03c3d3
commit 6eb339b641
2 changed files with 23 additions and 22 deletions

View File

@ -119,7 +119,7 @@ Here is the link to the repository: https://github.com/vvakame/typescript-format
It is shipped with `sass`, a CSS preprocessor written in Ruby, which can be installed by running `gem install sass`. It is shipped with `sass`, a CSS preprocessor written in Ruby, which can be installed by running `gem install sass`.
Here is the link to the SASS homepage: http://sass-lang.com/. Here is the link to the SASS homepage: http://sass-lang.com/.
* `tidy` for __XHTML__ and __XML__. * `tidy` for __HTML__, __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.

View File

@ -51,13 +51,6 @@ if !exists('g:formatters_java')
endif endif
" HTML
let g:formatdef_htmlbeautify = '"html-beautify -f - -s ".&shiftwidth'
if !exists('g:formatters_html')
let g:formatters_html = ['htmlbeautify']
endif
" Javascript " Javascript
let g:formatdef_jsbeautify_javascript = '"js-beautify -f - -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")' let g:formatdef_jsbeautify_javascript = '"js-beautify -f - -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")'
let g:formatdef_pyjsbeautify_javascript = '"js-beautify -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")." -"' let g:formatdef_pyjsbeautify_javascript = '"js-beautify -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")." -"'
@ -82,6 +75,28 @@ if !exists('g:formatters_json')
endif endif
" HTML
let g:formatdef_htmlbeautify = '"html-beautify -f - -s ".&shiftwidth'
let g:formatdef_tidy_html = '"tidy -q --show-errors 0 --show-warnings 0 --force-output --indent auto --indent-spaces ".&shiftwidth." --vertical-space yes --tidy-mark no -wrap ".&textwidth'
if !exists('g:formatters_html')
let g:formatters_html = ['htmlbeautify', 'tidy_html']
endif
" XML
let g:formatdef_tidy_xml = '"tidy -q -xml --show-errors 0 --show-warnings 0 --force-output --indent auto --indent-spaces ".&shiftwidth." --vertical-space yes --tidy-mark no -wrap ".&textwidth'
if !exists('g:formatters_xml')
let g:formatters_xml = ['tidy_xml']
endif
" XHTML
let g:formatdef_tidy_xhtml = '"tidy -q --show-errors 0 --show-warnings 0 --force-output --indent auto --indent-spaces ".&shiftwidth." --vertical-space yes --tidy-mark no -asxhtml -wrap ".&textwidth'
if !exists('g:formatters_xhtml')
let g:formatters_xhtml = ['tidy_xhtml']
endif
" Ruby " Ruby
let g:formatdef_rbeautify = '"rbeautify ".(&expandtab ? "-s -c ".&shiftwidth : "-t")' let g:formatdef_rbeautify = '"rbeautify ".(&expandtab ? "-s -c ".&shiftwidth : "-t")'
if !exists('g:formatters_ruby') if !exists('g:formatters_ruby')
@ -110,20 +125,6 @@ if !exists('g:formatters_typescript')
endif endif
" XML
let g:formatdef_tidy_xml = '"tidy -q -xml --show-errors 0 --show-warnings 0 --force-output --indent auto --indent-spaces ".&shiftwidth." --vertical-space yes --tidy-mark no -wrap ".&textwidth'
if !exists('g:formatters_xml')
let g:formatters_xml = ['tidy_xml']
endif
" XHTML
let g:formatdef_tidy_xhtml = '"tidy -q --show-errors 0 --show-warnings 0 --force-output --indent auto --indent-spaces ".&shiftwidth." --vertical-space yes --tidy-mark no -asxhtml -wrap ".&textwidth'
if !exists('g:formatters_xhtml')
let g:formatters_xhtml = ['tidy_xhtml']
endif
" Golang " Golang
let g:formatdef_gofmt_1 = '"gofmt -tabs=".(&expandtab ? "false" : "true")." -tabwidth=".&shiftwidth' let g:formatdef_gofmt_1 = '"gofmt -tabs=".(&expandtab ? "false" : "true")." -tabwidth=".&shiftwidth'
let g:formatdef_gofmt_2 = '"gofmt"' let g:formatdef_gofmt_2 = '"gofmt"'