I am using syntastic and youcompleteme in vim. Whenever I leave insert mode and have a mistake in my code the syntastic error gutter appears with a red marks indicating where the mistakes are. I find it annoying that the screen shifts to make room for the gutter every time. I was wondering if it is possible to set vim so that the gutter always stays there. Or if it is possible to just hide it all together and still see the red error markings. I'm really just trying to avoid the screen shift that takes place. Any ideas are welcome. Thanks in advance for the help.
Here is my .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'
I found this, which recommends using set signcolumn=yes
in your .vimrc
As an aside, I recently learned of this plugin as a replacement for syntastic. It’s basically the same thing, except it does the operations asynchronously, which makes it perform much faster. It does require vim 8, though (or some version of neovim I’m not familiar with). I made the switch like 2 weeks ago and really enjoy it (though I did increase the timeout that ALE has for running linters).
If you switch to ALE, they specifically have a setting to keep the sign gutter open, which exactly what you’re looking for.