mirror of
https://github.com/amix/vimrc
synced 2025-06-24 07:44:59 +08:00
Updated plugins. Removed the tabstop merge that 010c2940ce
introduced
This commit is contained in:
@ -19,12 +19,20 @@ if has('reltime')
|
||||
lockvar! g:syntastic_start
|
||||
endif
|
||||
|
||||
let g:syntastic_version = '3.5.0-37'
|
||||
let g:syntastic_version = '3.5.0-65'
|
||||
lockvar g:syntastic_version
|
||||
|
||||
" Sanity checks {{{1
|
||||
|
||||
for s:feature in ['autocmd', 'eval', 'modify_fname', 'quickfix', 'reltime', 'user_commands']
|
||||
for s:feature in [
|
||||
\ 'autocmd',
|
||||
\ 'eval',
|
||||
\ 'file_in_path',
|
||||
\ 'modify_fname',
|
||||
\ 'quickfix',
|
||||
\ 'reltime',
|
||||
\ 'user_commands'
|
||||
\ ]
|
||||
if !has(s:feature)
|
||||
call syntastic#log#error("need Vim compiled with feature " . s:feature)
|
||||
finish
|
||||
@ -38,7 +46,7 @@ if !s:running_windows && executable('uname')
|
||||
try
|
||||
let s:uname = system('uname')
|
||||
catch /\m^Vim\%((\a\+)\)\=:E484/
|
||||
call syntastic#log#error("your shell " . &shell . " doesn't use traditional UNIX syntax for redirections")
|
||||
call syntastic#log#error("your shell " . &shell . " can't handle traditional UNIX syntax for redirections")
|
||||
finish
|
||||
endtry
|
||||
lockvar s:uname
|
||||
@ -53,7 +61,7 @@ let g:syntastic_defaults = {
|
||||
\ 'always_populate_loc_list': 0,
|
||||
\ 'auto_jump': 0,
|
||||
\ 'auto_loc_list': 2,
|
||||
\ 'bash_hack': 1,
|
||||
\ 'bash_hack': 0,
|
||||
\ 'check_on_open': 0,
|
||||
\ 'check_on_wq': 1,
|
||||
\ 'cursor_columns': 1,
|
||||
@ -82,7 +90,7 @@ lockvar! g:syntastic_defaults
|
||||
|
||||
for s:key in keys(g:syntastic_defaults)
|
||||
if !exists('g:syntastic_' . s:key)
|
||||
let g:syntastic_{s:key} = g:syntastic_defaults[s:key]
|
||||
let g:syntastic_{s:key} = copy(g:syntastic_defaults[s:key])
|
||||
endif
|
||||
endfor
|
||||
|
||||
@ -128,6 +136,8 @@ let g:SyntasticDebugAutocommands = 8
|
||||
lockvar g:SyntasticDebugAutocommands
|
||||
let g:SyntasticDebugVariables = 16
|
||||
lockvar g:SyntasticDebugVariables
|
||||
let g:SyntasticDebugCheckers = 32
|
||||
lockvar g:SyntasticDebugCheckers
|
||||
|
||||
" }}}1
|
||||
|
||||
@ -389,7 +399,7 @@ endfunction " }}}2
|
||||
function! s:ToggleMode() " {{{2
|
||||
call s:modemap.toggleMode()
|
||||
call s:ClearCache()
|
||||
call s:UpdateErrors(1)
|
||||
call s:notifiers.refresh(g:SyntasticLoclist.New([]))
|
||||
call s:modemap.echoMode()
|
||||
endfunction " }}}2
|
||||
|
||||
@ -421,7 +431,6 @@ function! SyntasticMake(options) " {{{2
|
||||
call syntastic#log#debug(g:SyntasticDebugTrace, 'SyntasticMake: called with options:', a:options)
|
||||
|
||||
" save options and locale env variables {{{3
|
||||
let old_shell = &shell
|
||||
let old_shellredir = &shellredir
|
||||
let old_local_errorformat = &l:errorformat
|
||||
let old_errorformat = &errorformat
|
||||
@ -497,7 +506,6 @@ function! SyntasticMake(options) " {{{2
|
||||
let &errorformat = old_errorformat
|
||||
let &l:errorformat = old_local_errorformat
|
||||
let &shellredir = old_shellredir
|
||||
let &shell = old_shell
|
||||
" }}}3
|
||||
|
||||
if !s:running_windows && (s:uname() =~ "FreeBSD" || s:uname() =~ "OpenBSD")
|
||||
@ -587,22 +595,21 @@ function! s:addToErrors(errors, options) " {{{2
|
||||
return a:errors
|
||||
endfunction " }}}2
|
||||
|
||||
" The script changes &shellredir and &shell to stop the screen flicking when
|
||||
" shelling out to syntax checkers. Not all OSs support the hacks though.
|
||||
" XXX: Is this still needed?
|
||||
" The script changes &shellredir to stop the screen
|
||||
" flicking when shelling out to syntax checkers.
|
||||
function! s:bashHack() " {{{2
|
||||
if !exists('s:bash')
|
||||
if !s:running_windows && (s:uname() !~# "FreeBSD") && (s:uname() !~# "OpenBSD")
|
||||
let s:bash =
|
||||
\ executable('/usr/local/bin/bash') ? '/usr/local/bin/bash' :
|
||||
\ executable('/bin/bash') ? '/bin/bash' : ''
|
||||
else
|
||||
let s:bash = ''
|
||||
if g:syntastic_bash_hack
|
||||
if !exists('s:shell_is_bash')
|
||||
let s:shell_is_bash =
|
||||
\ !s:running_windows &&
|
||||
\ (s:uname() !~# "FreeBSD") && (s:uname() !~# "OpenBSD") &&
|
||||
\ &shell =~# '\m\<bash$'
|
||||
endif
|
||||
endif
|
||||
|
||||
if g:syntastic_bash_hack && s:bash != ''
|
||||
let &shell = s:bash
|
||||
let &shellredir = '&>'
|
||||
if s:shell_is_bash
|
||||
let &shellredir = '&>'
|
||||
endif
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
|
@ -82,6 +82,15 @@ function! g:SyntasticChecker.setWantSort(val) " {{{2
|
||||
let self._sort = a:val
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticChecker.log(msg, ...) " {{{2
|
||||
let leader = self._filetype . '/' . self._name . ': '
|
||||
if a:0 > 0
|
||||
call syntastic#log#debug(g:SyntasticDebugCheckers, leader . a:msg, a:1)
|
||||
else
|
||||
call syntastic#log#debug(g:SyntasticDebugCheckers, leader . a:msg)
|
||||
endif
|
||||
endfunction " }}}2
|
||||
|
||||
function! g:SyntasticChecker.makeprgBuild(opts) " {{{2
|
||||
let basename = self._filetype . '_' . self._name . '_'
|
||||
|
||||
|
@ -51,6 +51,7 @@ let s:defaultCheckers = {
|
||||
\ 'lisp': ['clisp'],
|
||||
\ 'llvm': ['llvm'],
|
||||
\ 'lua': ['luac'],
|
||||
\ 'markdown': ['mdl'],
|
||||
\ 'matlab': ['mlint'],
|
||||
\ 'nasm': ['nasm'],
|
||||
\ 'nroff': ['mandoc'],
|
||||
@ -65,6 +66,7 @@ let s:defaultCheckers = {
|
||||
\ 'python': ['python', 'flake8', 'pylint'],
|
||||
\ 'r': [],
|
||||
\ 'racket': ['racket'],
|
||||
\ 'rnc': ['rnv'],
|
||||
\ 'rst': ['rst2pseudoxml'],
|
||||
\ 'ruby': ['mri'],
|
||||
\ 'sass': ['sass'],
|
||||
@ -96,9 +98,13 @@ lockvar! s:defaultCheckers
|
||||
|
||||
let s:defaultFiletypeMap = {
|
||||
\ 'gentoo-metadata': 'xml',
|
||||
\ 'groff': 'nroff',
|
||||
\ 'lhaskell': 'haskell',
|
||||
\ 'litcoffee': 'coffee',
|
||||
\ 'mail': 'text'
|
||||
\ 'mail': 'text',
|
||||
\ 'mkd': 'markdown',
|
||||
\ 'sgml': 'docbk',
|
||||
\ 'sgmllnx': 'docbk',
|
||||
\ }
|
||||
lockvar! s:defaultFiletypeMap
|
||||
|
||||
|
Reference in New Issue
Block a user