diff options
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | finger/pgpkey | 8 | ||||
-rw-r--r-- | vim/autoload/has.vim | 34 | ||||
-rw-r--r-- | vim/autoload/indent.vim | 2 | ||||
-rw-r--r-- | vim/autoload/patch.vim | 27 | ||||
m--------- | vim/bundle/put_date | 0 | ||||
-rw-r--r-- | vim/vimrc | 43 |
7 files changed, 53 insertions, 65 deletions
@@ -1,2 +1,2 @@ -tejr dotfiles v10.10.0 -Sat, 19 Sep 2020 08:18:20 +0000 +tejr dotfiles v10.11.0 +Mon, 05 Oct 2020 10:30:47 +0000 diff --git a/finger/pgpkey b/finger/pgpkey index 330dba69..dc7f2e25 100644 --- a/finger/pgpkey +++ b/finger/pgpkey @@ -1,4 +1,4 @@ -pub rsa4096 2013-03-12 [SC] [expires: 2020-10-06] +pub rsa4096 2013-03-12 [SC] [expires: 2021-01-03] FA09 C06E 1B67 0CD0 B2F5 DE60 C142 86EA 77BB 8872 uid [ultimate] Thomas Ryder (tyrmored, tejr) <tom@sanctum.geek.nz> uid [ultimate] Thomas Ryder <tejr@echo-n.nz> @@ -6,6 +6,6 @@ uid [ultimate] Thomas Ryder <secretary@plug.org.nz> uid [ultimate] Thomas Ryder (TEJR) <tejr@cpan.org> uid [ultimate] Thomas Ryder <tyrmored@inspire.net.nz> uid [ultimate] Thomas Ryder <tej.ryder@gmail.com> -sub rsa4096 2013-03-12 [E] [expires: 2020-10-06] -sub rsa4096 2013-03-12 [S] [expires: 2020-10-06] -sub rsa4096 2019-08-06 [A] [expires: 2020-10-06] +sub rsa4096 2013-03-12 [E] [expires: 2021-01-03] +sub rsa4096 2013-03-12 [S] [expires: 2021-01-03] +sub rsa4096 2019-08-06 [A] [expires: 2021-01-03] diff --git a/vim/autoload/has.vim b/vim/autoload/has.vim deleted file mode 100644 index 162e4929..00000000 --- a/vim/autoload/has.vim +++ /dev/null @@ -1,34 +0,0 @@ -" Wrapper to backport the nicer has() syntax for simultaneous version and -" patch level checking that was introduced in v7.4.236 and fixed in v7.4.237. -" -" * <https://github.com/vim/vim/releases/tag/v7.4.236> -" * <https://github.com/vim/vim/releases/tag/v7.4.237> -" -function! has#(feature) abort - - " If we're new enough, we can just run the native has() - if has('patch-7.4.237') - return has(a:feature) - endif - - " Otherwise, we have to break down the pattern and do manual version and - " patch level checks; if it doesn't match the patch syntax, just return what - " the native has() does - " - let feature = a:feature - let pattern = '^patch-\(\d\+\)\.\(\d\+\)\.\(\d\+\)$' - let matchlist = matchlist(feature, pattern) - if empty(matchlist) - return has(a:feature) - endif - let [major, minor, patch] = matchlist[1:3] - - " The v:version variable looks like e.g. 801 for v8.1 - let l:version = major * 100 + minor - - " Compare the version numbers, and then the patch level if they're the same - return v:version != l:version - \ ? v:version > l:version - \ : has('patch-'.patch) - -endfunction diff --git a/vim/autoload/indent.vim b/vim/autoload/indent.vim index d597653f..5f62fb0b 100644 --- a/vim/autoload/indent.vim +++ b/vim/autoload/indent.vim @@ -10,7 +10,7 @@ function! indent#Spaces(...) abort " If we have the patch that supports it, set 'softtabstop' to dynamically " mirror the value of 'shiftwidth'; failing that, just copy it - let &l:softtabstop = has#('patch-7.3.693') + let &l:softtabstop = patch#('7.3.693') \ ? -1 \ : &l:shiftwidth diff --git a/vim/autoload/patch.vim b/vim/autoload/patch.vim new file mode 100644 index 00000000..54637e09 --- /dev/null +++ b/vim/autoload/patch.vim @@ -0,0 +1,27 @@ +" Wrapper to emulate the nicer has() syntax for simultaneous version and patch +" level checking that was introduced in v7.4.236 and fixed in v7.4.237. +" +" * <https://github.com/vim/vim/releases/tag/v7.4.236> +" * <https://github.com/vim/vim/releases/tag/v7.4.237> +" +function! patch#(feature) abort + + " If we're new enough, we can just run the native has() + if has('patch-7.4.237') + return has(a:feature) + endif + + " Otherwise, we need to start splitting and comparing numbers + let [major, minor, patch] = split(a:feature, '\.') + + " The v:version variable looks like e.g. 801 for v8.1 + let l:version = major * 100 + minor + + " If the version numbers are the same, return whether we have the patch; + " otherwise, return whether the version + " + return v:version == l:version + \ ? has('patch-'.patch) + \ : v:version > l:version + +endfunction diff --git a/vim/bundle/put_date b/vim/bundle/put_date -Subproject 598090797c2cb3a4fe945d2eacd3eca42a0cfe5 +Subproject fa0b0289b80fadbe9af87ca2faa3b5da4512d3f @@ -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 |