X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/f22b24fddcfef913f1a186e686114ad0bf6d27cd..7dd48bb77afddcd296bc0a77d01cf159e247ef3b:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index 9d85de2..c487252 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -107,6 +107,11 @@ Plug 'kana/vim-operator-user' " staging " Check LucHermites plugins: https://github.com/LucHermitte/lh-cpp +Plug 'imsnif/kdl.vim' + +Plug 'puremourning/vimspector' +Plug 'ilyachur/cmake4vim' +Plug 'ilyachur/gtest-vim' Plug 'git@github.com:/ram-z/vim-orgmode', { 'branch': 'dev' } " {{{2 Plug 'vim-scripts/syntaxrange' @@ -196,6 +201,7 @@ augroup END set scrolloff=5 " number of screen lines to show around the cursor set sidescroll=1 " number of collumns to scroll set sidescrolloff=1 " don't scroll over the listchars +set display+=lastline " display as much as possible of last line set fillchars=diff:⣿,vert:│ @@ -257,7 +263,7 @@ set formatoptions+=l " do not wrap lines that have been longer when starting set formatoptions+=t " Auto-wrap text using textwidth set formatoptions-=o " Do not insert comment leader after hitting o or O in normal mode -set nrformats=hex " number formats recognized for CTRL-A and CTRL-X commands +set nrformats-=octal " don't inc/dec octal numbers with ^[AX] set complete=. " scan the current buffer ( 'wrapscan' is ignored) set complete+=w " scan buffers from other windows @@ -309,7 +315,9 @@ set backupskip+=.netrc " skip netrc set backupskip+=/dev/shm/pass* " skip passwordstore files set undofile " persistent undo history -set undodir=$XDG_CACHE_HOME/vim/undo// +if !has('nvim') + set undodir=$XDG_CACHE_HOME/vim/undo// +endif augroup undoskip au! @@ -352,7 +360,15 @@ set isfname-== " don't treat `=` as being part of filenames " various {{{2 set virtualedit+=block " let cursor move past last char in mode set virtualedit+=onemore " allow the cursor to move just past the end of the line -set viminfo='100,<50,s10,h,n$XDG_CACHE_HOME/vim/viminfo " viminfo defaults but save file in .cache +if !has('nvim') + " viminfo defaults but save file in .cache + set viminfo='100,<50,s10,h,n$XDG_CACHE_HOME/vim/viminfo +else + " shada is the replacement format for viminfo + " this setting is probably not needed as it's most likely the default + " the default path is in XDG_DATA_HOME, which is fine + set shada='100,<50,s10,h +endif set viewdir=$XDG_CACHE_HOME/vim/view// @@ -407,11 +423,6 @@ augroup END command! NoAutoChecktime let b:autochecktime=0 command! ToggleAutoChecktime let b:autochecktime=!get(b:, 'autochecktime', 0) | echom "b:autochecktime:" b:autochecktime -augroup terminal - au! - au TerminalOpen * if &buftype == 'terminal' | setlocal bufhidden=hide | endif -augroup END - " bindings {{{1 " allow both and \ to be @@ -604,6 +615,14 @@ nmap qq :echo "hi<" . synIDattr(synID(line("."),col("."),1),"na let g:checkattach_filebrowser = 'ranger' let g:checkattach_once = 'y' +" close-another-window {{{2 +nnoremap c +nnoremap cc c +nnoremap ch :CloseLeftWindow +nnoremap cl :CloseRightWindow +nnoremap cj :CloseBelowWindow +nnoremap ck :CloseAboveWindow + " delimitmate {{{2 let delimitMate_expand_cr = 2 let g:delimitMate_expand_space = 1 @@ -668,14 +687,6 @@ nmap cog IndentGuidesToggle nmap [og IndentGuidesEnable nmap ]og IndentGuidesDisable -" close-another-window {{{2 -nnoremap c -nnoremap cc c -nnoremap ch :CloseLeftWindow -nnoremap cl :CloseRightWindow -nnoremap cj :CloseBelowWindow -nnoremap ck :CloseAboveWindow - " python-mode {{{2 let g:pymode_rope_completion = 0