1
0
mirror of https://github.com/amix/vimrc synced 2025-07-09 10:45:00 +08:00

Updated plugins

This commit is contained in:
amix
2014-02-16 17:46:49 +00:00
parent 31b9fa01a5
commit 8c9210dca4
32 changed files with 251 additions and 149 deletions

View File

@ -67,7 +67,8 @@ function! syntastic#c#GetLocList(filetype, subchecker, options)
return []
endtry
let makeprg = expand(g:syntastic_{a:filetype}_compiler) . ' ' . flags . ' ' . syntastic#util#shexpand('%')
let makeprg = syntastic#util#shexpand(g:syntastic_{a:filetype}_compiler) .
\ ' ' . flags . ' ' . syntastic#util#shexpand('%')
let errorformat = s:GetCheckerVar('g', a:filetype, a:subchecker, 'errorformat', a:options['errorformat'])

View File

@ -96,7 +96,7 @@ function! syntastic#log#debugShowOptions(level, names)
let vlist = type(a:names) == type("") ? [a:names] : a:names
if !empty(vlist)
call map(vlist, "'&' . v:val . ' = ' . strtrans(string(eval('&' . v:val)))")
call map(copy(vlist), "'&' . v:val . ' = ' . strtrans(string(eval('&' . v:val)))")
echomsg leader . join(vlist, ', ')
endif
call s:logRedirect(0)

View File

@ -52,6 +52,13 @@ function! syntastic#util#parseShebang()
return { 'exe': '', 'args': [] }
endfunction
" Get the value of a variable. Allow local variables to override global ones.
function! syntastic#util#var(name)
return
\ exists('b:syntastic_' . a:name) ? b:syntastic_{a:name} :
\ exists('g:syntastic_' . a:name) ? g:syntastic_{a:name} : ''
endfunction
" Parse a version string. Return an array of version components.
function! syntastic#util#parseVersion(version)
return split(matchstr( a:version, '\v^\D*\zs\d+(\.\d+)+\ze' ), '\m\.')
@ -214,11 +221,11 @@ endfunction
function! s:translateFilter(filters)
let conditions = []
for [k, v] in items(a:filters)
if type(v) == type([])
call extend(conditions, map(copy(v), 's:translateElement(k, v:val)'))
for k in keys(a:filters)
if type(a:filters[k]) == type([])
call extend(conditions, map(copy(a:filters[k]), 's:translateElement(k, v:val)'))
else
call add(conditions, s:translateElement(k, v))
call add(conditions, s:translateElement(k, a:filters[k]))
endif
endfor
return len(conditions) == 1 ? conditions[0] : join(map(conditions, '"(" . v:val . ")"'), ' && ')