1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
amix
2016-04-12 09:31:09 +01:00
parent ad875b0e0a
commit 5f6aa8fe09
54 changed files with 1236 additions and 291 deletions

View File

@ -61,7 +61,7 @@ function! snipmate#legacy#process_snippet(snip) abort
endw
if &et " Expand tabs to spaces if 'expandtab' is set.
return substitute(snippet, '\t', repeat(' ', (&sts > 0) ? &sts : &sw), 'g')
return substitute(snippet, '\t', repeat(' ', snipmate#util#tabwidth()), 'g')
endif
return snippet
endfunction

View File

@ -187,7 +187,7 @@ call extend(s:parser_proto, snipmate#util#add_methods(s:sfile(), 'parser',
function! s:indent(count) abort
if &expandtab
let shift = repeat(' ', (&sts > 0) ? &sts : &sw)
let shift = repeat(' ', snipmate#util#tabwidth())
else
let shift = "\t"
endif

View File

@ -20,3 +20,11 @@ function! snipmate#util#eval(arg)
endtry
return type(ret) == type('') ? ret : string(ret)
endfunction
function! snipmate#util#tabwidth()
if &sts > 0
return &sts
else
return exists('*shiftwidth') ? shiftwidth() : &sw
endif
endfunction