X-Git-Url: https://git.sthu.org/?p=vimconf.git;a=blobdiff_plain;f=init.vim;h=86f93b3da6befc9866c02fbf7e6f6bb0299d5f6b;hp=e7c0dac9f752fff1c31356882f671351b03e2840;hb=95d6560e46cca2b656743f2ce7f56b7b37bfdc77;hpb=578400998673699c494221333e9846790cfba0ee diff --git a/init.vim b/init.vim index e7c0dac..86f93b3 100644 --- a/init.vim +++ b/init.vim @@ -6,15 +6,13 @@ " 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 set encoding=utf-8 +set fillchars=vert:│,fold:\ set listchars=tab:»­,trail:·,eol:$ set virtualedit=block @@ -93,8 +91,17 @@ let g:airline#extensions#branch#enabled=1 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" @@ -119,7 +126,10 @@ let g:clang_compilation_database = '.' let g:python3_host_prog = '/usr/bin/python3' " deoplete requires huge startuptime. Delay loading upon first InsertEnter. let g:deoplete#enable_at_startup = 0 -let g:deoplete#enable_smart_case = 1 +call deoplete#custom#option({ + \ 'smart_case' : v:true, + \ 'auto_refresh_delay' : 100, + \ }) au InsertEnter * call deoplete#enable() "augroup pencil @@ -167,6 +177,8 @@ au BufEnter *.cpp,*.cc,*.cxx let b:fswitchdst='h,hxx,hpp,hh' 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 @@ -177,6 +189,8 @@ augroup END let g:localvimrc_persistent = 1 +let g:fastfold_minlines = 0 + au FileType markdown call RagtagInit() let g:detectspelllang_langs = {} @@ -204,6 +218,8 @@ let g:VimMailContactsCommands={ \'sync': "/bin/true"} \} +let g:vimtex_fold_enabled = 1 +let g:vimtex_fold_levelmarker = '➜' " The denite settings are largely stolen from spacevim let s:denite_options = { @@ -288,6 +304,10 @@ let s:normal_mode_mappings = [ \ ['r', '', 'noremap'], \ ] +" termdebug split windows +let g:termdebug_wide = 1 +let termdebugger = $HOME . '/.vim/gdb.sh' + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" runtime keymaps.vim