]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
vim: include bin in nrformats, i.e. only disable octal
[dotfiles.git] / vim / vimrc
index fe0aa1232787e78bc1c83c9df8260ec7ee50106d..9af477ef6cbb071428d725a65319237fe8bc8502 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -132,21 +132,30 @@ Plug 'mtth/scratch.vim'  " {{{2
   let g:scratch_autohide = 0
 "}}}
 
   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
 call plug#end()
 
 filetype plugin indent on
+syntax on
 
 " colorscheme {{{1
 
 " colorscheme {{{1
-syntax on
 set background=dark
 let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
 let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
 set termguicolors
 set background=dark
 let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
 let &t_8b = "\<Esc>[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
 
 "TODO see how I can integrate this into a theme that customises upstream Nord
 hi debugPC term=reverse ctermbg=8
 
@@ -174,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
@@ -214,7 +224,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.
@@ -245,7 +257,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