" Some global settings
set nocompatible
-" Breaks colors for some versions of mosh, but not if tmux is used on top of
-" mosh. See https://github.com/mobile-shell/mosh/issues/928
-set termguicolors
set number
set cursorline
set scrolloff=5
let g:gruvbox_contrast_light='hard'
let g:gruvbox_contrast_dark='hard'
-let g:gruvbox_italic = 1
set bg=dark
+
+if &term =~ 'linux'
+ let g:gruvbox_termcolors=16
+else
+ " Setting termguicolors has two implications:
+ " - Breaks colors for some versions of mosh, but not if tmux is used on top of
+ " mosh. See https://github.com/mobile-shell/mosh/issues/928
+ set termguicolors
+ let g:gruvbox_italic = 1
+endif
colorscheme gruvbox
" let NERDTreeWinPos="right"
au BufEnter *.h,*.hh,*.hxx let b:fswitchdst='cc,c,cxx,cpp'
au BufNewFile *.{h,hpp,hxx} call AddIncludeGuards()
+au FileType cpp,c packadd termdebug
+
augroup autofoldcolumn
au!
au CursorHold,BufWinEnter * AutoOrigamiFoldColumn
\ ]
" termdebug split windows
-let g:termdebug_wide=1
+let g:termdebug_wide = 1
+let termdebugger = $HOME . '/.vim/gdb.sh'
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""