diff options
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 43 |
1 files changed, 19 insertions, 24 deletions
@@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Sat, 19 Sep 2020 08:17:28 UTC +" Last updated: Sun, 04 Oct 2020 04:15:27 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -72,7 +72,7 @@ " " <https://github.com/vim/vim/releases/tag/v8.1.0733> " -if has#('multi_byte') +if has('multi_byte') if &encoding ==# 'latin1' && !exists('$LANG') set encoding=utf-8 endif @@ -238,7 +238,7 @@ if s:xdgcachehome !=# '' call mkdir(s:xdgcachehome.'/backup', 'p', 0700) endif execute 'set backupdir^='.option#Escape(option#item#Escape( - \ s:xdgcachehome.'/backup'.(has#('patch-8.1.251') ? '//' : '') + \ s:xdgcachehome.'/backup'.(patch#('8.1.251') ? '//' : '') \)) endif @@ -248,7 +248,7 @@ endif " default value of 'backupskip' here, in order to prevent the creation of such " undesired backup files. " -if has#('unix') +if has('unix') " Prior to v8.1.1519, Vim didn’t check patterns added to 'backupskip' for " uniqueness, so adding the same path repeatedly resulted in duplicate strings @@ -260,7 +260,7 @@ if has#('unix') " " <https://github.com/vim/vim/releases/tag/v8.1.1519> " - if !has#('patch-8.1.1519') + if !patch#('8.1.1519') set backupskip& endif @@ -288,7 +288,6 @@ if has#('unix') endif - " Keep swap files for file buffers in a dedicated directory, rather than the " default of writing them to the same directory as the buffer file. Add two " trailing slashes to the path to prompt Vim to use the full escaped path in @@ -316,7 +315,7 @@ endif " Support for these persistent undo file caches was not released until v7.3.0, " so we need to check for the feature’s presence before we enable it. " -if s:xdgcachehome !=# '' && has#('persistent_undo') +if s:xdgcachehome !=# '' && has('persistent_undo') set undofile if !isdirectory(s:xdgcachehome.'/undo') call mkdir(s:xdgcachehome.'/undo', 'p', 0700) @@ -331,7 +330,7 @@ endif " directories of this type. This isn't a comma-separated list like the others " ('backupdir', 'directory', 'spell', 'undodir') " -if s:xdgcachehome !=# '' && has#('mksession') +if s:xdgcachehome !=# '' && has('mksession') if !isdirectory(s:xdgcachehome.'/view') call mkdir(s:xdgcachehome.'/view', 'p', 0700) endif @@ -379,12 +378,8 @@ augroup END " saves restarting Vim or running the :source command manually, which I almost " always want to do after changing my vimrc file anyway. " -autocmd vimrc BufWritePost $MYVIMRC +autocmd vimrc BufWritePost $MYVIMRC,$MYVIM/vimrc \ ReloadVimrc -if $MYVIM !=# '' - autocmd vimrc BufWritePost $MYVIM/vimrc - \ doautocmd vimrc BufWritePost $MYVIMRC -endif " If Vim is new enough (v7.0.187) to support the ##SourceCmd event for " automatic command hooks, we'll also apply a hook for that event to catch @@ -394,12 +389,8 @@ endif " <https://github.com/vim/vim/releases/tag/v7.0.187> " if exists('##SourceCmd') - autocmd vimrc SourceCmd $MYVIMRC + autocmd vimrc SourceCmd $MYVIMRC,$MYVIM/vimrc \ ReloadVimrc - if $MYVIM !=# '' - autocmd vimrc SourceCmd $MYVIM/vimrc - \ doautocmd vimrc SourceCmd $MYVIMRC - endif endif " For spelling, use New Zealand English by default, but later on we’ll @@ -534,7 +525,7 @@ set linebreak " Checking that ‘&encoding ==# 'utf-8'’ is not quite the same thing, though " it’s unlikely I’ll ever use a different Unicode encoding by choice. " -if has#('multi_byte_encoding') +if has('multi_byte_encoding') set showbreak=… else set showbreak=... @@ -618,7 +609,7 @@ set formatoptions+=1 " " <https://github.com/vim/vim/releases/tag/v7.3.541> " -if has#('patch-7.3.541') +if patch#('7.3.541') set formatoptions+=j endif @@ -658,7 +649,7 @@ set cpoptions+=J " " <https://github.com/vim/vim/releases/tag/v8.1.1523> " -if has#('patch-8.1.728') +if patch#('8.1.728') set formatoptions+=p endif @@ -670,7 +661,7 @@ endif " flag should be set here, rather that in the GUI-specific gvimrc file, as one " might otherwise think. " -if has#('gui_running') +if has('gui_running') set guioptions+=M endif @@ -741,7 +732,7 @@ set listchars+=nbsp:+ " Non-breaking spaces " " Failing that, ‘<’ and ‘>’ will do the trick. " -if has#('multi_byte_encoding') +if has('multi_byte_encoding') set listchars+=extends:»,precedes:« else set listchars+=extends:>,precedes:< @@ -985,7 +976,7 @@ endif " it. " if &background ==# 'dark' - \ && (has#('gui_running') || &t_Co >= 256) + \ && (has('gui_running') || &t_Co >= 256) \ && globpath(&runtimepath, 'colors/sahara.vim') !=# '' colorscheme sahara endif @@ -1579,6 +1570,10 @@ inoreabbrev wrnog \ wrong inoreabbrev Fielding \ Feilding +inoreabbrev Newsbeuter + \ Newsboat +inoreabbrev newsbeuter + \ newsboat inoreabbrev THe \ The inoreabbrev THere |