mirror of
https://github.com/amix/vimrc
synced 2025-06-24 07:44:59 +08:00
Updated plugins
This commit is contained in:
@ -19,7 +19,8 @@ function! SyntaxCheckers_python_flake8_GetHighlightRegex(item)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_python_flake8_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb') })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l: could not compile,%-Z%p^,' .
|
||||
|
@ -19,7 +19,9 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_python_frosted_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-vb' })
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb'),
|
||||
\ 'args_after': '-vb' })
|
||||
|
||||
let errorformat =
|
||||
\ '%f:%l:%c:%m,' .
|
||||
|
@ -5,7 +5,7 @@
|
||||
"
|
||||
" For details about pep257 see: https://github.com/GreenSteam/pep257
|
||||
|
||||
if exists("g:loaded_syntastic_python_pep257_checker")
|
||||
if exists('g:loaded_syntastic_python_pep257_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_python_pep257_checker = 1
|
||||
@ -14,12 +14,24 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_python_pep257_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
if !exists('s:pep257_new')
|
||||
let s:pep257_new = syntastic#util#versionIsAtLeast(syntastic#util#getVersion(
|
||||
\ self.getExecEscaped() . ' --version'), [0, 3])
|
||||
endif
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l:%c%\%.%\%.%\d%\+:%\d%\+: %m,' .
|
||||
\ '%E%f:%l:%c: %m,' .
|
||||
\ '%+C %m'
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb') })
|
||||
|
||||
if s:pep257_new
|
||||
let errorformat =
|
||||
\ '%E%f:%l %.%#:,' .
|
||||
\ '%+C %m'
|
||||
else
|
||||
let errorformat =
|
||||
\ '%E%f:%l:%c%\%.%\%.%\d%\+:%\d%\+: %m,' .
|
||||
\ '%E%f:%l:%c: %m,' .
|
||||
\ '%+C %m'
|
||||
endif
|
||||
|
||||
let loclist = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
@ -28,10 +40,12 @@ function! SyntaxCheckers_python_pep257_GetLocList() dict
|
||||
\ 'preprocess': 'killEmpty',
|
||||
\ 'postprocess': ['compressWhitespace'] })
|
||||
|
||||
" pep257 outputs byte offsets rather than column numbers
|
||||
for e in loclist
|
||||
let e['col'] = get(e, 'col', 0) + 1
|
||||
endfor
|
||||
if s:pep257_new == 0
|
||||
" byte offsets rather than column numbers
|
||||
for e in loclist
|
||||
let e['col'] = get(e, 'col', 0) + 1
|
||||
endfor
|
||||
endif
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
@ -21,7 +21,8 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_python_pep8_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb') })
|
||||
|
||||
let errorformat = '%f:%l:%c: %m'
|
||||
|
||||
|
@ -14,7 +14,8 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_python_py3kwarn_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb') })
|
||||
|
||||
let errorformat = '%W%f:%l:%c: %m'
|
||||
|
||||
|
@ -26,21 +26,22 @@ function! SyntaxCheckers_python_pyflakes_GetHighlightRegex(i)
|
||||
\ || stridx(a:i['text'], 'shadowed by loop variable') >= 0
|
||||
|
||||
" fun with Python's %r: try "..." first, then '...'
|
||||
let terms = split(a:i['text'], '"', 1)
|
||||
if len(terms) > 2
|
||||
return terms[1]
|
||||
let term = matchstr(a:i['text'], '\m^.\{-}"\zs.\{-1,}\ze"')
|
||||
if term != ''
|
||||
return '\V\<' . escape(term, '\') . '\>'
|
||||
endif
|
||||
|
||||
let terms = split(a:i['text'], "'", 1)
|
||||
if len(terms) > 2
|
||||
return terms[1]
|
||||
let term = matchstr(a:i['text'], '\m^.\{-}''\zs.\{-1,}\ze''')
|
||||
if term != ''
|
||||
return '\V\<' . escape(term, '\') . '\>'
|
||||
endif
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_python_pyflakes_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb') })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l: could not compile,'.
|
||||
|
@ -23,7 +23,9 @@ function! SyntaxCheckers_python_pylama_GetHighlightRegex(item)
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_python_pylama_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-f pep8' })
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb'),
|
||||
\ 'args_after': '-f pep8' })
|
||||
|
||||
" TODO: "WARNING:pylama:..." messages are probably a logging bug
|
||||
let errorformat =
|
||||
|
@ -23,6 +23,7 @@ endfunction
|
||||
|
||||
function! SyntaxCheckers_python_pylint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb'),
|
||||
\ 'args_after': (s:pylint_new ? '-f text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" -r n' : '-f parseable -r n -i y') })
|
||||
|
||||
let errorformat =
|
||||
|
@ -26,7 +26,9 @@ function! SyntaxCheckers_python_python_IsAvailable() dict
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_python_python_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'exe': [self.getExec(), s:compiler] })
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe_before': (syntastic#util#isRunningWindows() ? '' : 'TERM=dumb'),
|
||||
\ 'exe': [self.getExec(), s:compiler] })
|
||||
|
||||
let errorformat = '%E%f:%l:%c: %m'
|
||||
|
||||
|
Reference in New Issue
Block a user