2013-03-16 06:16:53 -04:00
|
|
|
if !exists("g:formatprg_cs") | let g:formatprg_cs = "astyle" | endif
|
2013-12-20 14:34:38 -05:00
|
|
|
if !exists("g:formatprg_args_expr_cs") && !exists("g:formatprg_args_cs")
|
|
|
|
let g:formatprg_args_expr_cs = '"--mode=cs --style=ansi --indent-namespaces -pcH".(&expandtab ? "s".&shiftwidth : "t")'
|
2013-03-16 07:21:55 -04:00
|
|
|
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-22 13:33:43 -04:00
|
|
|
if !exists("g:formatprg_args_expr_c") && !exists("g:formatprg_args_c")
|
2013-03-16 08:36:08 -04:00
|
|
|
let g:formatprg_args_expr_c = '"--mode=c --style=ansi -pcH".(&expandtab ? "s".&shiftwidth : "t")'
|
2013-03-16 07:21:55 -04:00
|
|
|
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-12-20 14:34:38 -05:00
|
|
|
if !exists("g:formatprg_args_expr_cpp") && !exists("g:formatprg_args_cpp")
|
2013-03-16 08:36:08 -04:00
|
|
|
let g:formatprg_args_expr_cpp = '"--mode=c --style=ansi -pcH".(&expandtab ? "s".&shiftwidth : "t")'
|
2013-03-16 07:21:55 -04:00
|
|
|
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-12-20 14:34:38 -05:00
|
|
|
if !exists("g:formatprg_args_expr_java") && !exists("g:formatprg_args_java")
|
2013-03-16 08:36:08 -04:00
|
|
|
let g:formatprg_args_expr_java = '"--mode=java --style=ansi -pcH".(&expandtab ? "s".&shiftwidth : "t")'
|
2013-03-16 07:21:55 -04:00
|
|
|
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-12-20 14:34:38 -05:00
|
|
|
if !exists("g:formatprg_args_expr_python") && !exists("g:formatprg_args_python")
|
2014-09-12 05:11:02 -04:00
|
|
|
let g:formatprg_args_expr_python = '"- ".(&textwidth ? "--max-line-length=".&textwidth : "")'
|
2013-03-16 07:21:55 -04:00
|
|
|
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-22 13:33:43 -04:00
|
|
|
if !exists("g:formatprg_args_expr_xml") && !exists("g:formatprg_args_xml")
|
2013-12-20 14:34:38 -05:00
|
|
|
let g:formatprg_args_expr_xml = '"-q -xml --show-errors 0 --show-warnings 0 --force-output --indent auto --indent-spaces ".&shiftwidth." --vertical-space yes --tidy-mark no -wrap ".&textwidth'
|
2013-03-16 07:21:55 -04:00
|
|
|
endif
|
|
|
|
|
2013-03-09 13:52:12 -05:00
|
|
|
if !exists("g:formatprg_xhtml") | let g:formatprg_xhtml = "tidy" | endif
|
2013-12-20 14:34:38 -05:00
|
|
|
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'
|
2013-03-16 07:21:55 -04:00
|
|
|
endif
|
2013-03-09 05:52:11 -05:00
|
|
|
|
2014-05-30 16:42:30 -04:00
|
|
|
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
|
|
|
|
|
2013-12-20 14:34:38 -05:00
|
|
|
if !exists("g:formatprg_html") | let g:formatprg_html = "html-beautify" | endif
|
|
|
|
if !exists("g:formatprg_args_expr_html") && !exists("g:formatprg_args_html")
|
2013-12-24 05:08:54 -05:00
|
|
|
let g:formatprg_args_expr_html = '"-f - -s ".&shiftwidth'
|
2013-03-09 05:52:11 -05:00
|
|
|
endif
|
2013-12-20 14:34:38 -05:00
|
|
|
|
|
|
|
if !exists("g:formatprg_javascript") | let g:formatprg_javascript = "js-beautify" | endif
|
2013-03-22 13:33:43 -04:00
|
|
|
if !exists("g:formatprg_args_expr_javascript") && !exists("g:formatprg_args_javascript")
|
2014-08-19 07:03:30 -04:00
|
|
|
let g:formatprg_args_expr_javascript = '"-f - -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")'
|
2013-03-09 05:52:11 -05:00
|
|
|
endif
|
2014-06-29 15:15:10 -04:00
|
|
|
|
|
|
|
if !exists("g:formatprg_json") | let g:formatprg_json = "js-beautify" | endif
|
|
|
|
if !exists("g:formatprg_args_expr_json") && !exists("g:formatprg_args_json")
|
|
|
|
let g:formatprg_args_expr_json = '"-f - -".(&expandtab ? "s ".&shiftwidth : "t")'
|
|
|
|
endif
|