我最近根据这个指南https://github.com/scrooloose/syntastic#installpathogen安装了Syntastic via pathogen。
但是,Syntastic不适用于c++。我不确定原因是什么,当我打开.cpp文件并故意创建一个错误时,没有任何报告。
下面是我的vimrc:
:syntax on
:set number
:set autoindent
:set cindent
set t_Co=256 "sets vim to 256 color
if &term =~ '256color'
" disable Background Color Erase (BCE) so that color schemes
" render properly when inside 256-color tmux and GNU screen.
set t_ut=
endif
"Synastic
let g:syntastic_cpp_compiler = 'clang++'
let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++'
let g:syntastic_cpp_check_header = 1
nmap <F8> :TagbarToggle<CR> "maps f8 to tagbar toggle
execute pathogen#infect()
:colorscheme mustang发布于 2015-03-22 08:25:19
这可能在其他地方也得到了回答。你试过调试Syntastic吗?
尝试在您的.vimrc中设置let g:syntastic_debug=1。,运行检查器,并检查:mes的输出以调试任何问题。或者,您可以键入:SyntasticInfo,它将输出类似以下内容:
Syntastic version: 3.4.0-134
Info for filetype: cpp
Mode: active
Filetype cpp is active
Available checkers: clang_check clang_tidy gcc
Currently enabled checkers: -因此,您可以通过将它们添加到.vimrc:let g:syntastic_cpp_checkers = ['clang_check', 'gcc']来启用所需的适当检查器,也可以指定您自己的规则。为此,您可以通过键入:h syntastic来查看手册。
https://stackoverflow.com/questions/27539658
复制相似问题