From ca624e2661a3ae449442c07cea1954e7666a339c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 3 Jan 2020 17:05:49 +1300 Subject: Fix case sensitivity of an operator for vim-vint --- vim/autoload/mail/header.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/autoload/mail/header.vim b/vim/autoload/mail/header.vim index 7a360a2c..5284b84d 100644 --- a/vim/autoload/mail/header.vim +++ b/vim/autoload/mail/header.vim @@ -15,7 +15,7 @@ function! mail#header#Read() abort \ 'body': matchlist[2], \} call add(fields, field) - elseif line =~ '^\s' && exists('field') + elseif line =~# '^\s' && exists('field') let field['body'] .= "\n" . line elseif line ==# '' break -- cgit v1.2.3 From d389cbec9bddfcb4418df43fa7dca7a837be1c3d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 3 Jan 2020 17:27:37 +1300 Subject: Rename filetype repeat commands --- vim/autoload/filetype.vim | 66 ---------------------------------------- vim/autoload/filetype/repeat.vim | 66 ++++++++++++++++++++++++++++++++++++++++ vim/filetype.vim | 4 +-- 3 files changed, 68 insertions(+), 68 deletions(-) delete mode 100644 vim/autoload/filetype.vim create mode 100644 vim/autoload/filetype/repeat.vim diff --git a/vim/autoload/filetype.vim b/vim/autoload/filetype.vim deleted file mode 100644 index 6a66d62e..00000000 --- a/vim/autoload/filetype.vim +++ /dev/null @@ -1,66 +0,0 @@ -" Helper function to run the 'filetypedetect' group on a file with its -" extension stripped off -function! filetype#StripRepeat() abort - - " Check we have the fnameescape() function - if !exists('*fnameescape') - return - endif - - " Expand the match result - let fn = expand('') - - " Strip leading and trailing #hashes# - if fn =~# '^#\+.*#\+$' - let fn = substitute(fn, '^#\+\(.\+\)#\+$', '\1', '') - - " Strip trailing tilde~ - elseif fn =~# '\~$' - let fn = substitute(fn, '\~$', '', '') - - " Strip generic .extension - else - let fn = expand(':r') - endif - - " Re-run the group if there's anything left - if strlen(fn) - execute 'doautocmd filetypedetect BufRead ' . fnameescape(fn) - endif - -endfunction - -" Helper function to run the 'filetypedetect' group on a file in a temporary -" sudoedit(8) directory, modifying it with an attempt to reverse the temporary -" filename change -function! filetype#SudoRepeat() abort - - " Check we have the fnameescape() function - if !exists('*fnameescape') - return - endif - - " Expand the match result - let fn = expand('') - - " myfileXXQGS16A.conf: strip eight chars before final period - if fn =~# '/[^/]\+\w\{8}\.[^./]\+$' - let fr = expand(':r') - let fe = expand(':e') - let fn = strpart(fr, -8, strlen(fr)) . '.' . fe - - " myfile.XXQGS16A: strip extension - elseif fn =~# '/[^/]\+\.\w\{8}$' - let fn = expand(':r') - - " Unrecognised pattern; return, don't repeat - else - return - endif - - " Re-run the group if there's anything left - if strlen(fn) - execute 'doautocmd filetypedetect BufRead ' . fnameescape(fn) - endif - -endfunction diff --git a/vim/autoload/filetype/repeat.vim b/vim/autoload/filetype/repeat.vim new file mode 100644 index 00000000..f681932b --- /dev/null +++ b/vim/autoload/filetype/repeat.vim @@ -0,0 +1,66 @@ +" Helper function to run the 'filetypedetect' group on a file with its +" extension stripped off +function! filetype#repeat#Strip() abort + + " Check we have the fnameescape() function + if !exists('*fnameescape') + return + endif + + " Expand the match result + let fn = expand('') + + " Strip leading and trailing #hashes# + if fn =~# '^#\+.*#\+$' + let fn = substitute(fn, '^#\+\(.\+\)#\+$', '\1', '') + + " Strip trailing tilde~ + elseif fn =~# '\~$' + let fn = substitute(fn, '\~$', '', '') + + " Strip generic .extension + else + let fn = expand(':r') + endif + + " Re-run the group if there's anything left + if strlen(fn) + execute 'doautocmd filetypedetect BufRead ' . fnameescape(fn) + endif + +endfunction + +" Helper function to run the 'filetypedetect' group on a file in a temporary +" sudoedit(8) directory, modifying it with an attempt to reverse the temporary +" filename change +function! filetype#repeat#Sudo() abort + + " Check we have the fnameescape() function + if !exists('*fnameescape') + return + endif + + " Expand the match result + let fn = expand('') + + " myfileXXQGS16A.conf: strip eight chars before final period + if fn =~# '/[^/]\+\w\{8}\.[^./]\+$' + let fr = expand(':r') + let fe = expand(':e') + let fn = strpart(fr, -8, strlen(fr)) . '.' . fe + + " myfile.XXQGS16A: strip extension + elseif fn =~# '/[^/]\+\.\w\{8}$' + let fn = expand(':r') + + " Unrecognised pattern; return, don't repeat + else + return + endif + + " Re-run the group if there's anything left + if strlen(fn) + execute 'doautocmd filetypedetect BufRead ' . fnameescape(fn) + endif + +endfunction diff --git a/vim/filetype.vim b/vim/filetype.vim index 12edb3d2..137d1cf5 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -16,7 +16,7 @@ augroup filetypedetect \,?*~ \,?*.{bak,example,in,new,old,orig,sample,test} \,?*.dpkg-{bak,dist,new,old} - \ call filetype#StripRepeat() + \ call filetype#repeat#Strip() " Stuff Tom cares about enough and edits often enough to type based on " filename patterns follows. @@ -474,7 +474,7 @@ augroup filetypedetect \ /var/tmp/?*????????.* \,/var/tmp/?*.???????? \ if !did_filetype() - \| call filetype#SudoRepeat() + \| call filetype#repeat#Sudo() \|endif " Generic text, config, and log files, if no type assigned yet -- cgit v1.2.3 From eb800458ee4b5540c811436983b883cad2a699b9 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 5 Jan 2020 01:07:46 +1300 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 25a80e4f..c5e7377d 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v8.9.0 -Fri, 03 Jan 2020 03:41:18 +0000 +tejr dotfiles v8.10.0 +Sat, 04 Jan 2020 12:07:46 +0000 -- cgit v1.2.3 From d5b579c688eb883614a3c6974ab8fc1115b623d7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 5 Jan 2020 01:07:49 +1300 Subject: Update PGP key --- finger/pgpkey | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/finger/pgpkey b/finger/pgpkey index f1c4c402..a19c98f8 100644 --- a/finger/pgpkey +++ b/finger/pgpkey @@ -1,4 +1,4 @@ -pub rsa4096 2013-03-12 [C] [expires: 2020-01-18] +pub rsa4096 2013-03-12 [SC] [expires: 2020-04-03] FA09 C06E 1B67 0CD0 B2F5 DE60 C142 86EA 77BB 8872 uid [ultimate] Thomas Ryder (tyrmored, tejr) uid [ultimate] Thomas Ryder @@ -6,9 +6,9 @@ uid [ultimate] Thomas Ryder uid [ultimate] Thomas Ryder (TEJR) uid [ultimate] Thomas Ryder uid [ultimate] Thomas Ryder -sub rsa4096 2013-03-12 [E] [expires: 2020-01-18] +sub rsa4096 2013-03-12 [E] [expires: 2020-04-03] 9DF1 A89F F8D9 70AF 3265 C882 96C2 CD91 E67A C61D -sub rsa4096 2013-03-12 [S] [expires: 2020-01-18] +sub rsa4096 2013-03-12 [S] [expires: 2020-04-03] 3179 90A1 4597 A1FC F82D 953A B5AF 5F89 2592 6609 -sub rsa4096 2019-08-06 [A] [expires: 2020-01-18] +sub rsa4096 2019-08-06 [A] [expires: 2020-04-03] 42AE 569D 6162 7C52 03B0 74ED D58F F1F0 7E90 9B49 -- cgit v1.2.3