2011-03-25 1 views
0

필자는 테스트 .c 파일에서 누락 된 세미콜론이있는 행을 작성하고 주변을 이동하기 때문에 Synthetic이 작동한다는 것을 알고 있고 :Errors 창이 올바른 구문 오류 위치를보고합니다.Vim syntastic :이 플러그인으로 표지 옵션을 얻는 방법?

그러나 syntastic-error-signs 옵션을 사용할 수 없습니다.

이 빔의 복사본이 표시하여 컴파일해야합니다

set nocompatible 
set enc=utf-8 
set fenc=utf-8 
set number 
set backspace=indent,eol,start "allow bs over everything 
fixdel "for Cygwin 
set nobackup 
"set noswapfile 
set dir=/tmp "swap file location 

set autoindent 
set smartindent 
set tabstop=4 
set shiftwidth=4 
set shiftround "use multiples of shiftwidth when using <or> 
"set expandtab "use spaces instead of \t 
set nowrap 
set history=1000   " remember more commands and search history 
set undolevels=1000  " use many muchos levels of undo 
set wildignore=*.swp,*.bak,*.pyc,*.class 
set title    " change the terminal's title 
set visualbell   " don't beep 
set noerrorbells   " don't beep 

set splitright 
set splitbelow 

" Minimal number of screen lines to keep above and below the cursor. 
set scrolloff=4 

" Shows the current line in different color 
set cursorline 

filetype plugin on 
syntax on 
highlight ExtraWhitespace ctermbg=darkgreen guibg=lightgreen 
autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/ 
"remove trailing whitespace 
"http://vim.wikia.com/wiki/Remove_unwanted_spaces#Automatically_removing_all_trailing_whitespace 
"autocmd BufWritePre * :%s/\s\+$//e 
autocmd BufWritePre *.c :%s/\s\+$//e 
autocmd BufWritePre *.cpp :%s/\s\+$//e 
autocmd BufWritePre *.c++ :%s/\s\+$//e 
autocmd BufWritePre *.h :%s/\s\+$//e 
autocmd BufWritePre *.java :%s/\s\+$//e 
autocmd BufWritePre *.php :%s/\s\+$//e 
autocmd BufWritePre *.pl :%s/\s\+$//e 
autocmd BufWritePre *.py :%s/\s\+$//e 
"autocmd FileType c,cpp,c++,java,php,pl,py autocmd BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,"\\s\\+$","","")')) 

"search options 
set smartcase "ignore case if all lowercase 
set ignorecase 
set incsearch 
set hlsearch 
set showmatch 

nmap <space> <C-f> 
nmap n nzz 
nmap N Nzz 

"adding/removing lines 
map <S-Enter> O<Esc>j 
map <CR> o<Esc>k 

"reduce keystrokes for command mode 
inoremap ;w <esc>:w<cr>a 
nnoremap ; : 

"set arrow keys to move between buffer/tabs 
inoremap <Up> <esc>:bprev<cr> 
inoremap <Down> <esc>:bnext<cr> 
inoremap <Left> <esc>:tabprev<cr> 
inoremap <Right> <esc>:tabnext<cr> 
noremap <Up> :bprev<cr> 
noremap <Down> :bnext<cr> 
noremap <Left> :tabprev<cr> 
noremap <Right> :tabnext<cr> 

" Easy window navigation 
map <C-h> <C-w>h 
map <C-j> <C-w>j 
map <C-k> <C-w>k 
map <C-l> <C-w>l 

"Maps for jj to act as esc 
inoremap jj <esc> 
cnoremap jj <C-c> 
inoremap jk <esc> 
inoremap kj <esc> 

"Use Q for formatting the current paragraph (or selection) 
vmap Q gq 
nmap Q gqap 

"navigate wrapped lines 
nnoremap k gk 
nnoremap j gj 
nnoremap gk k 
nnoremap gj j 

"forget sudo 
cmap w!! w !sudo tee % >/dev/null 

"toggle set paste option 
set pastetoggle=<F2> 

"gvim specific options 
set vb t_vb= 
set guioptions-=T 

"set foldmethod=indent 
set showtabline=2 

"plugin command t 
noremap <S-T> :CommandT<cr> 

"always show status line 
set laststatus=2 
set statusline=%<%y\ b%n\ %h%m%r%=%-14.(%l,%c%V%)\ %P 

"for Syntastic 
let g:syntastic_enable_signs=1 
let g:syntastic_quiet_warnings=1 

au BufWritePost ~/.vimrc source ~/.vimrc 

답변

3

작업이 순서대로 지원 내 전체의 .vimrc (파일의 맨 아래에 Syntastic 특정 옵션) - 당신은 확인할 수를 입력하여

:echo has('signs') 

을하고 그것이 1.

을 반환을 찾습니다 명령 모드에서 다음
관련 문제