Merge branch 'sbdchd-astyle'

This commit is contained in:
Chiel ten Brinke 2016-02-29 12:52:58 +01:00
commit 36282560c3

View File

@ -25,8 +25,14 @@ endif
" C#
if !exists('g:formatdef_astyle_cs')
if filereadable('.astylerc')
let g:formatdef_astyle_cs = '"astyle --mode=cs --options=.astyle"'
elseif filereadable(expand('~/.astylerc')) || exists('$ARTISTIC_STYLE_OPTIONS')
let g:formatdef_astyle_cs = '"astyle --mode=cs"'
else
let g:formatdef_astyle_cs = '"astyle --mode=cs --style=ansi --indent-namespaces -pcH".(&expandtab ? "s".shiftwidth() : "t")'
endif
endif
if !exists('g:formatters_cs')
let g:formatters_cs = ['astyle_cs']
@ -48,8 +54,14 @@ endfunction
" C
if !exists('g:formatdef_astyle_c')
if filereadable('.astylerc')
let g:formatdef_astyle_c = '"astyle --mode=c --options=.astyle"'
elseif filereadable(expand('~/.astylerc')) || exists('$ARTISTIC_STYLE_OPTIONS')
let g:formatdef_astyle_c = '"astyle --mode=c"'
else
let g:formatdef_astyle_c = '"astyle --mode=c --style=ansi -pcH".(&expandtab ? "s".shiftwidth() : "t")'
endif
endif
if !exists('g:formatters_c')
let g:formatters_c = ['clangformat', 'astyle_c']
@ -58,8 +70,14 @@ endif
" C++
if !exists('g:formatdef_astyle_cpp')
if filereadable('.astylerc')
let g:formatdef_astyle_cpp = '"astyle --mode=c --options=.astyle"'
elseif filereadable(expand('~/.astylerc')) || exists('$ARTISTIC_STYLE_OPTIONS')
let g:formatdef_astyle_cpp = '"astyle --mode=c"'
else
let g:formatdef_astyle_cpp = '"astyle --mode=c --style=ansi -pcH".(&expandtab ? "s".shiftwidth() : "t")'
endif
endif
if !exists('g:formatters_cpp')
let g:formatters_cpp = ['clangformat', 'astyle_cpp']
@ -74,8 +92,14 @@ endif
" Java
if !exists('g:formatdef_astyle_java')
if filereadable('.astylerc')
let g:formatdef_astyle_java = '"astyle --mode=java --options=.astyle"'
elseif filereadable(expand('~/.astylerc')) || exists('$ARTISTIC_STYLE_OPTIONS')
let g:formatdef_astyle_java = '"astyle --mode=java"'
else
let g:formatdef_astyle_java = '"astyle --mode=java --style=java -pcH".(&expandtab ? "s".shiftwidth() : "t")'
endif
endif
if !exists('g:formatters_java')
let g:formatters_java = ['astyle_java']