]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
git: ignore worktree directory `/wt/`
[dotfiles.git] / vim / vimrc
index 4a51a99f0b8328e4a6c180c40c6b56d32e15a045..34afc34f514993bdcd0db7b1883eedc5758d503e 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -183,6 +183,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 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
 " Only shown when not in insert mode
 set listchars+=trail:·
 augroup trailing
@@ -195,6 +196,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 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:│
 
 
 set fillchars=diff:⣿,vert:│
 
@@ -223,7 +225,9 @@ set ttyfast
 
 " using the mouse {{{2
 set mouse=rnv                   " list of flags for using the mouse
 
 " 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.
 
 " messages and info {{{2
 set showcmd         " Show (partial) command in status line.
@@ -254,7 +258,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 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
 
 set complete=.       " scan the current buffer ( 'wrapscan' is ignored)
 set complete+=w      " scan buffers from other windows
@@ -306,7 +310,9 @@ set backupskip+=.netrc          " skip netrc
 set backupskip+=/dev/shm/pass*  " skip passwordstore files
 
 set undofile                    " persistent undo history
 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!
 
 augroup undoskip
     au!
@@ -349,7 +355,15 @@ set isfname-==    " don't treat `=` as being part of filenames
 " various {{{2
 set virtualedit+=block     " let cursor move past last char in <C-V> mode
 set virtualedit+=onemore   " allow the cursor to move just past the end of the line
 " various {{{2
 set virtualedit+=block     " let cursor move past last char in <C-V> 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//
 
 
 set viewdir=$XDG_CACHE_HOME/vim/view//
 
@@ -404,11 +418,6 @@ augroup END
 command! NoAutoChecktime let b:autochecktime=0
 command! ToggleAutoChecktime let b:autochecktime=!get(b:, 'autochecktime', 0) | echom "b:autochecktime:" b:autochecktime
 
 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 <space> and \ to be <leader>
 " bindings {{{1
 
 " allow both <space> and \ to be <leader>