diff --git a/autoload/syntastic/c.vim b/autoload/syntastic/c.vim index ac54186f..0784a23b 100644 --- a/autoload/syntastic/c.vim +++ b/autoload/syntastic/c.vim @@ -277,7 +277,8 @@ endfunction function! syntastic#c#CheckRuby() if executable('ruby') if !has_key(s:cflags, 'ruby') - let s:cflags['ruby'] = system('ruby -r rbconfig -e ''puts Config::CONFIG["archdir"]''') + let s:cflags['ruby'] = system('ruby -r rbconfig -e ' . + \ '''puts RbConfig::CONFIG["rubyhdrdir"] || RbConfig::CONFIG["archdir"]''') let s:cflags['ruby'] = substitute(s:cflags['ruby'], "\n", '', '') let s:cflags['ruby'] = ' -I' . s:cflags['ruby'] endif diff --git a/doc/syntastic.txt b/doc/syntastic.txt index 0c95ab7c..4f3645eb 100644 --- a/doc/syntastic.txt +++ b/doc/syntastic.txt @@ -153,6 +153,10 @@ current filetype is set to passive. See |'syntastic_mode_map'| for more info. Output info about what checkers are available and in use for the current filetype. +:SyntasticReset *:SyntasticReset* + +Resets the list of errors and turns off all error notifiers. + ============================================================================== 4. Global Options *syntastic-global-options* diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index b603149a..514c6c18 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -78,6 +78,7 @@ command! SyntasticToggleMode call s:ToggleMode() command! -nargs=? -complete=custom,s:CompleteCheckerName SyntasticCheck call s:UpdateErrors(0, ) call s:Redraw() command! Errors call s:ShowLocList() command! SyntasticInfo call s:registry.echoInfoFor(s:CurrentFiletypes()) +command! SyntasticReset call s:ClearCache() | call s:notifiers.refresh(g:SyntasticLoclist.New([])) highlight link SyntasticError SpellBad highlight link SyntasticWarning SpellCap