1
0
mirror of https://github.com/gryf/.vim.git synced 2025-12-18 03:50:30 +01:00

Update of CtrlP, Syntastic, Tagbar, Taglisttoo, and Mark plugins

This commit is contained in:
2012-09-20 18:57:57 +02:00
parent 71a1d914e0
commit b033e2bb39
44 changed files with 1987 additions and 994 deletions

View File

@@ -31,22 +31,29 @@ function! s:GetShell()
return b:shell
endfunction
function! SyntaxCheckers_sh_GetLocList()
if len(s:GetShell()) == 0 || !executable(s:GetShell())
function! s:ForwardToZshChecker()
if SyntasticCheckable('zsh')
return SyntaxCheckers_zsh_GetLocList()
else
return []
endif
let output = split(system(s:GetShell().' -n '.shellescape(expand('%'))), '\n')
if v:shell_error != 0
let result = []
for err_line in output
let line = substitute(err_line, '^[^:]*:\D\{-}\(\d\+\):.*', '\1', '')
let msg = substitute(err_line, '^[^:]*:\D\{-}\d\+: \(.*\)', '\1', '')
call add(result, {'lnum' : line,
\ 'text' : msg,
\ 'bufnr': bufnr(''),
\ 'type': 'E' })
endfor
return result
endif
return []
endfunction
function! s:IsShellValid()
return len(s:GetShell()) > 0 && executable(s:GetShell())
endfunction
function! SyntaxCheckers_sh_GetLocList()
if s:GetShell() == 'zsh'
return s:ForwardToZshChecker()
endif
if !s:IsShellValid()
return []
endif
let makeprg = s:GetShell() . ' -n ' . shellescape(expand('%'))
let errorformat = '%f: line %l: %m'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat})
endfunction