2013-03-16 06:16:53 -04:00
|
|
|
if !exists("g:formatprg_cs") | let g:formatprg_cs = "astyle" | endif
|
2013-03-16 07:21:55 -04:00
|
|
|
if !exists("g:formatprg_args_expr_cs")
|
|
|
|
let g:formatprg_args_expr_cs = '"--mode=cs --style=ansi -pcHs".&softtabstop'
|
|
|
|
endif
|
2013-03-09 05:52:11 -05:00
|
|
|
|
2013-03-09 13:52:12 -05:00
|
|
|
if !exists("g:formatprg_c") | let g:formatprg_c = "astyle" | endif
|
2013-03-16 07:21:55 -04:00
|
|
|
if !exists("g:formatprg_args_expr_c")
|
|
|
|
let g:formatprg_args_expr_c = '"--mode=c --style=ansi -pcHs".&softtabstop'
|
|
|
|
endif
|
2013-03-09 05:52:11 -05:00
|
|
|
|
2013-03-09 13:52:12 -05:00
|
|
|
if !exists("g:formatprg_cpp") | let g:formatprg_cpp = "astyle" | endif
|
2013-03-16 07:21:55 -04:00
|
|
|
if !exists("g:formatprg_args_expr_cpp")
|
|
|
|
let g:formatprg_args_expr_cpp = '"--mode=c --style=ansi -pcHs".&softtabstop'
|
|
|
|
endif
|
2013-03-09 05:52:11 -05:00
|
|
|
|
2013-03-09 13:52:12 -05:00
|
|
|
if !exists("g:formatprg_java") | let g:formatprg_java = "astyle" | endif
|
2013-03-16 07:21:55 -04:00
|
|
|
if !exists("g:formatprg_args_expr_java")
|
|
|
|
let g:formatprg_args_expr_java = '"--mode=java --style=ansi -pcHs".&softtabstop'
|
|
|
|
endif
|
2013-03-09 05:52:11 -05:00
|
|
|
|
2013-03-09 13:52:12 -05:00
|
|
|
if !exists("g:formatprg_python") | let g:formatprg_python = "autopep8" | endif
|
2013-03-16 07:21:55 -04:00
|
|
|
if !exists("g:formatprg_args_expr_python")
|
|
|
|
let g:formatprg_args_expr_python = '"/dev/stdin"'
|
|
|
|
endif
|
2013-03-09 05:52:11 -05:00
|
|
|
|
2013-03-09 13:52:12 -05:00
|
|
|
if !exists("g:formatprg_xml") | let g:formatprg_xml = "tidy" | endif
|
2013-03-16 07:21:55 -04:00
|
|
|
if !exists("g:formatprg_args_expr_xml")
|
|
|
|
let g:formatprg_args_expr_xml = '"-q -xml --show-errors 10 --show-warnings 10 --indent auto --indent-spaces ".&softtabstop." --vertical-space yes --tidy-mark no --wrap 68"'
|
|
|
|
endif
|
|
|
|
|
2013-03-09 13:52:12 -05:00
|
|
|
if !exists("g:formatprg_html") | let g:formatprg_html = "tidy" | endif
|
2013-03-16 07:21:55 -04:00
|
|
|
if !exists("g:formatprg_args_expr_html")
|
|
|
|
let g:formatprg_args_expr_html = '"-q --show-errors 0 --show-warnings 0 --indent auto --indent-spaces ".&softtabstop." --vertical-space yes --tidy-mark no --wrap 68"'
|
|
|
|
endif
|
|
|
|
|
2013-03-09 13:52:12 -05:00
|
|
|
if !exists("g:formatprg_xhtml") | let g:formatprg_xhtml = "tidy" | endif
|
2013-03-16 07:21:55 -04:00
|
|
|
if !exists("g:formatprg_args_expr_xhtml")
|
|
|
|
let g:formatprg_args_expr_xhtml = '"-q --show-errors 0 --show-warnings 0 --indent auto --indent-spaces ".&softtabstop." --vertical-space yes --tidy-mark no --wrap 68 -asxhtml"'
|
|
|
|
endif
|
2013-03-09 05:52:11 -05:00
|
|
|
|
|
|
|
if !exists("g:formatprg_javascript")
|
|
|
|
let g:formatprg_javascript = "js-beautify"
|
|
|
|
|
|
|
|
"We allow an alternative path for js-beautify
|
|
|
|
"If js-beautify is installed as a bundle, we still want to detect it
|
|
|
|
let s:bundleDir = fnamemodify(expand("<sfile>"), ":h:h:h")
|
|
|
|
let s:jsbeautify_alternative = s:bundleDir."/js-beautify/python/".g:formatprg_javascript
|
|
|
|
if executable(s:jsbeautify_alternative)
|
|
|
|
let g:formatprg_javascript = s:jsbeautify_alternative
|
|
|
|
endif
|
|
|
|
endif
|
2013-03-16 07:21:55 -04:00
|
|
|
if !exists("g:formatprg_args_expr_javascript")
|
2013-03-16 06:16:53 -04:00
|
|
|
let g:formatprg_args_expr_javascript = '"-i -s".&softtabstop'
|
2013-03-09 05:52:11 -05:00
|
|
|
endif
|