我在 vim 中使用 syntastic 和 youcompleteme。每当我离开插入模式并在我的代码中出现错误时,语法错误槽会出现一个红色标记,指示错误在哪里。我发现屏幕每次都会移动以便为排水沟腾出空间,这很烦人。我想知道是否可以设置 vim 以便排水沟始终留在那里。或者,如果可以将它们全部隐藏在一起,仍然可以看到红色的错误标记。我真的只是想避免发生的屏幕偏移。欢迎任何想法。在此先感谢您的帮助。
这是我的 .vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
""""""""" PLUGIN LIST STARTS HERE """"""""""""""""""""
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/syntastic'
Plugin 'jiangmiao/auto-pairs'
Plugin 'tpope/vim-surround'
Plugin 'valloric/youcompleteme'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'tpope/vim-repeat'
Plugin 'scrooloose/nerdtree'
Plugin 'sickill/vim-pasta'
Plugin 'itchyny/lightline.vim'
""""""""" PLUGIN LIST END HERE """"""""""""""""""""
call vundle#end() " required
filetype plugin indent on " requiredntax on
syntax on
set tabstop=4
set number
set smartindent
set shiftwidth=4
set mouse=a
set backspace=indent,eol,start
set colorcolumn+=80
highlight ColorColumn ctermbg=8
set completeopt-=preview
set laststatus=2
let &t_SI.="\e[5 q"
let &t_SR.="\e[4 q"
let &t_EI.="\e[1 q"
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
map <F5> :NERDTreeToggle<CR>
let g:syntastic_cpp_compiler = 'clang++'
let g:syntastic_cpp_compiler_options = ' -std=c++14 -stdlib=libc++'
function! Multiple_cursors_before()
call AutoPairsToggle()
endfun
function! Multiple_cursors_after()
call AutoPairsToggle()
endfun
let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'