Use &shiftwidth only when &expandtab option set

This commit is contained in:
veelenga 2014-12-11 08:50:27 +02:00
parent ca5e8f9791
commit bde27cd815

View File

@ -60,5 +60,5 @@ endif
if !exists("g:formatprg_ruby") | let g:formatprg_ruby = "rbeautify" | endif
if !exists("g:formatprg_args_expr_ruby") && !exists("g:formatprg_args_ruby")
let g:formatprg_args_expr_ruby = '(&expandtab ? "-s" : "-t").(&shiftwidth ? " -c ".&shiftwidth : "")'
let g:formatprg_args_expr_ruby = '(&expandtab ? "-s -c ".&shiftwidth : "-t")'
endif