X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/81e54577d68c9bf2093c1e0766beba7a769e81e7..7dd48bb77afddcd296bc0a77d01cf159e247ef3b:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index 8b9b5c1..c487252 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -81,15 +81,17 @@ Plug 'morhetz/gruvbox' " {{{2 let g:gruvbox_contrast_dark = 'hard' let g:gruvbox_contrast_light = 'soft' -Plug 'arcticicestudio/nord-vim' " {{{2 -let g:nord_bold = 1 -let g:nord_italic = 1 -let g:nord_italic_comments = 1 -let g:nord_underline = 1 -let g:nord_uniform_status_lines = 0 -let g:nord_uniform_diff_background = 0 -let g:nord_cursor_line_number_background = 0 -let g:nord_bold_vertical_split_line = 0 +if !has('nvim') + Plug 'arcticicestudio/nord-vim' " {{{2 + let g:nord_bold = 1 + let g:nord_italic = 1 + let g:nord_italic_comments = 1 + let g:nord_underline = 1 + let g:nord_uniform_status_lines = 0 + let g:nord_uniform_diff_background = 0 + let g:nord_cursor_line_number_background = 0 + let g:nord_bold_vertical_split_line = 0 +endif "}}} @@ -105,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' @@ -130,21 +137,30 @@ Plug 'mtth/scratch.vim' " {{{2 let g:scratch_autohide = 0 "}}} -Plug 'vim-utils/vim-man' " {{{2 -let g:man_width = 80 +let g:man_hardwrap = 80 +if !has('nvim') + Plug 'vim-utils/vim-man' " {{{2 + let g:man_width = 80 "}}} +endif +Plug 'jenterkin/vim-autosource' " {{{2 + let g:autosource_hashdir = $XDG_CACHE_HOME . '/vim/vim-autosource' + let g:autosource_conf_names = ['.vimrc', '.vimrc.lua'] +"}}} call plug#end() filetype plugin indent on +syntax on " colorscheme {{{1 -syntax on set background=dark let &t_8f = "\[38;2;%lu;%lu;%lum" let &t_8b = "\[48;2;%lu;%lu;%lum" set termguicolors -colorscheme $THEME +if !has('nvim') + colorscheme $THEME +endif "TODO see how I can integrate this into a theme that customises upstream Nord hi debugPC term=reverse ctermbg=8 @@ -172,6 +188,7 @@ set lazyredraw " don't redraw while executing macros set list " show chars defined in 'listchars' set listchars=tab:❭\ " list of strings used for list mode set listchars+=extends:❯,precedes:❮ +set listchars+=nbsp:␣ " Only shown when not in insert mode set listchars+=trail:· augroup trailing @@ -184,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:│ @@ -212,7 +230,9 @@ set ttyfast " using the mouse {{{2 set mouse=rnv " list of flags for using the mouse -set ttymouse=xterm " type of mouse +if !has('nvim') + set ttymouse=xterm " type of mouse +endif " messages and info {{{2 set showcmd " Show (partial) command in status line. @@ -243,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 @@ -295,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! @@ -338,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// @@ -393,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 @@ -590,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 @@ -654,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