Skip to content

Commit

Permalink
added support for xml & xhtml with tidy + tidy support for html
Browse files Browse the repository at this point in the history
  • Loading branch information
sbdchd committed Mar 22, 2016
1 parent ff6e461 commit 7413a8a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,7 @@ let g:neoformat_basic_format_trim = 1
- [tsfmt](https://github.com/vvakame/typescript-formatter)
- VALA
- [uncrustify](http://uncrustify.sourceforge.net)
- XHTML
- [tidy](http://www.html-tidy.org)
- XML
- [tidy](http://www.html-tidy.org)
1 change: 0 additions & 1 deletion autoload/neoformat.vim
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ function! g:neoformat#NeoformatRun(cmd) abort
let l:job.id = l:id

let s:jobs[l:id] = l:job
return l:id
endfunction


Expand Down
25 changes: 24 additions & 1 deletion plugin/defaults.vim
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ let g:neoformat#enabled#json = ['jsbeautify']
let g:neoformat#html#htmlbeautify = {
\ 'exe': 'html-beautify'
\ }
let g:neoformat#html#tidy = {
\ 'exe': 'tidy',
\ 'flags': ['-quiet', '--indent auto', '--indent-spaces 4',
\ '--vertical-space yes', '--tidy-mark no']
\ }

let g:neoformat#enabled#html = ['htmlbeautify']
let g:neoformat#enabled#html = ['htmlbeautify', 'tidy']

" CSS
let g:neoformat#css#cssbeautify = {
Expand Down Expand Up @@ -202,3 +207,21 @@ let g:neoformat#jade#pugbeautifier = {
\ }

let g:neoformat#enabled#jade = ['pugbeautifier']

" XML
let g:neoformat#xml#tidy = {
\ 'exe': 'tidy',
\ 'flags': ['-quiet', '-xml', '--indent auto', '--indent-spaces 4',
\ '--vertical-space yes', '--tidy-mark no']
\ }

let g:neoformat#enabled#xml = ['tidy']

" XHTML
let g:neoformat#xhtml#tidy = {
\ 'exe': 'tidy',
\ 'flags': ['-quiet', '-asxhtml', '--indent auto', '--indent-spaces 4',
\ '--vertical-space yes', '--tidy-mark no']
\ }

let g:neoformat#enabled#xhtml = ['tidy']

0 comments on commit 7413a8a

Please sign in to comment.