1
0
mirror of https://github.com/amix/vimrc synced 2025-06-24 07:44:59 +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

@ -21,48 +21,11 @@ if exists("g:loaded_syntastic_cpp_cppcheck_checker")
endif
let g:loaded_syntastic_cpp_cppcheck_checker = 1
if !exists('g:syntastic_cppcheck_config_file')
let g:syntastic_cppcheck_config_file = '.syntastic_cppcheck_config'
endif
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_cpp_cppcheck_GetLocList() dict
let makeprg = self.makeprgBuild({
\ 'args': syntastic#c#ReadConfig(g:syntastic_cppcheck_config_file),
\ 'args_after': '-q --enable=style' })
let errorformat =
\ '[%f:%l]: (%trror) %m,' .
\ '[%f:%l]: (%tarning) %m,' .
\ '[%f:%l]: (%ttyle) %m,' .
\ '[%f:%l]: (%terformance) %m,' .
\ '[%f:%l]: (%tortability) %m,' .
\ '[%f:%l]: (%tnformation) %m,' .
\ '[%f:%l]: (%tnconclusive) %m,' .
\ '%-G%.%#'
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'returns': [0] })
for e in loclist
if e['type'] =~? '\m^[SPI]'
let e['type'] = 'w'
let e['subtype'] = 'Style'
endif
endfor
return loclist
endfunction
runtime! syntax_checkers/c/*.vim
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'cpp',
\ 'name': 'cppcheck'})
let &cpo = s:save_cpo
unlet s:save_cpo
\ 'name': 'cppcheck',
\ 'redirect': 'c/cppcheck'})
" vim: set et sts=4 sw=4:

View File

@ -15,10 +15,6 @@ if exists('g:loaded_syntastic_cpp_gcc_checker')
endif
let g:loaded_syntastic_cpp_gcc_checker = 1
if !exists('g:syntastic_cpp_compiler')
let g:syntastic_cpp_compiler = executable('g++') ? 'g++' : 'clang++'
endif
if !exists('g:syntastic_cpp_compiler_options')
let g:syntastic_cpp_compiler_options = ''
endif
@ -27,6 +23,9 @@ let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_cpp_gcc_IsAvailable() dict
if !exists('g:syntastic_cpp_compiler')
let g:syntastic_cpp_compiler = executable(self.getExec()) ? self.getExec() : 'clang++'
endif
return executable(expand(g:syntastic_cpp_compiler))
endfunction
@ -47,7 +46,8 @@ endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'cpp',
\ 'name': 'gcc' })
\ 'name': 'gcc',
\ 'exec': 'g++' })
let &cpo = s:save_cpo
unlet s:save_cpo