mirror of
https://github.com/amix/vimrc
synced 2025-06-24 15:54:59 +08:00
Updated plugins
This commit is contained in:
@ -29,13 +29,14 @@ function! SyntaxCheckers_yaml_yamlxs_IsAvailable() dict
|
||||
|
||||
" don't call executable() here, to allow things like
|
||||
" let g:syntastic_perl_interpreter='/usr/bin/env perl'
|
||||
silent! call syntastic#util#system(self.getExecEscaped() . ' ' . s:Modules() . ' -e ' . syntastic#util#shescape('exit(0)'))
|
||||
silent! call syntastic#util#system(self.getExecEscaped() . ' ' . s:Modules(bufnr('')) . ' -e ' . syntastic#util#shescape('exit(0)'))
|
||||
return v:shell_error == 0
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_yaml_yamlxs_GetLocList() dict
|
||||
let buf = bufnr('')
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args_before': s:Modules() . ' -e ' . syntastic#util#shescape('YAML::XS::LoadFile($ARGV[0])') })
|
||||
\ 'args_before': s:Modules(buf) . ' -e ' . syntastic#util#shescape('YAML::XS::LoadFile($ARGV[0])') })
|
||||
|
||||
let errorformat =
|
||||
\ '%EYAML::XS::Load Error: The problem:,' .
|
||||
@ -51,12 +52,13 @@ function! SyntaxCheckers_yaml_yamlxs_GetLocList() dict
|
||||
\ 'defaults': {'bufnr': bufnr('')} })
|
||||
endfunction
|
||||
|
||||
function s:Modules()
|
||||
if type(g:syntastic_perl_lib_path) == type('')
|
||||
call syntastic#log#oneTimeWarn('variable g:syntastic_perl_lib_path should be a list')
|
||||
let includes = split(g:syntastic_perl_lib_path, ',')
|
||||
function s:Modules(buf)
|
||||
let lib_path = syntastic#util#bufVar(a:buf, 'perl_lib_path')
|
||||
if type(lib_path) == type('')
|
||||
call syntastic#log#oneTimeWarn('variable syntastic_perl_lib_path should be a list')
|
||||
let includes = split(lib_path, ',')
|
||||
else
|
||||
let includes = copy(syntastic#util#var('perl_lib_path'))
|
||||
let includes = copy(lib_path)
|
||||
endif
|
||||
return join(map(includes, '"-I" . v:val') + ['-MYAML::XS'])
|
||||
endfunction
|
||||
|
Reference in New Issue
Block a user