From d5f52edcf6e87a2ada4af932225ef28af45aab36 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 18 May 2019 00:03:51 +1200 Subject: Move 'wildignore' setting back into .vimrc --- vim/plugin/wildignore.vim | 173 ---------------------------------------------- vim/vimrc | 73 ++++++++++++++++++- 2 files changed, 72 insertions(+), 174 deletions(-) delete mode 100644 vim/plugin/wildignore.vim diff --git a/vim/plugin/wildignore.vim b/vim/plugin/wildignore.vim deleted file mode 100644 index 36a8f492..00000000 --- a/vim/plugin/wildignore.vim +++ /dev/null @@ -1,173 +0,0 @@ -" Don't complete certain files that I'm not likely to want to manipulate from -" within Vim; this is kind of expensive to reload, so I've made it a plugin -" with a load guard -if &compatible || v:version < 700 || !has('wildignore') - finish -endif -if exists('loaded_wildmenu') - finish -endif -let loaded_wildmenu = 1 - -" Helper function for local scope -function! s:Wildignore() abort - - " New empty array - let ignores = [] - - " Archives - let ignores += [ - \ '*.7z' - \,'*.bz2' - \,'*.gz' - \,'*.jar' - \,'*.rar' - \,'*.tar' - \,'*.xz' - \,'*.zip' - \ ] - - " Bytecode - let ignores += [ - \ '*.class' - \,'*.pyc' - \ ] - - " Databases - let ignores += [ - \ '*.db' - \,'*.dbm' - \,'*.sdbm' - \,'*.sqlite' - \ ] - - " Disk - let ignores += [ - \ '*.adf' - \,'*.bin' - \,'*.hdf' - \,'*.iso' - \ ] - - " Documents - let ignores += [ - \ '*.docx' - \,'*.djvu' - \,'*.odp' - \,'*.ods' - \,'*.odt' - \,'*.pdf' - \,'*.ppt' - \,'*.xls' - \,'*.xlsx' - \ ] - - " Encrypted - let ignores += [ - \ '*.asc' - \,'*.gpg' - \ ] - - " Executables - let ignores += [ - \ '*.exe' - \ ] - - " Fonts - let ignores += [ - \ '*.ttf' - \ ] - - " Images - let ignores += [ - \ '*.bmp' - \,'*.gd2' - \,'*.gif' - \,'*.ico' - \,'*.jpeg' - \,'*.jpg' - \,'*.pbm' - \,'*.png' - \,'*.psd' - \,'*.tga' - \,'*.xbm' - \,'*.xcf' - \,'*.xpm' - \ ] - - " Incomplete - let ignores += [ - \ '*.filepart' - \ ] - - " Objects - let ignores += [ - \ '*.a' - \,'*.o' - \ ] - - " Sound - let ignores += [ - \ '*.au' - \,'*.aup' - \,'*.flac' - \,'*.mid' - \,'*.m4a' - \,'*.mp3' - \,'*.ogg' - \,'*.opus' - \,'*.s3m' - \,'*.wav' - \ ] - - " System-specific - let ignores += [ - \ '.DS_Store' - \ ] - - " Translation - let ignores += [ - \ '*.gmo' - \ ] - - " Version control - let ignores += [ - \ '.git' - \,'.hg' - \,'.svn' - \ ] - - " Video - let ignores += [ - \ '*.avi' - \,'*.gifv' - \,'*.mp4' - \,'*.ogv' - \,'*.rm' - \,'*.swf' - \,'*.webm' - \ ] - - " Vim - let ignores += [ - \ '*~' - \,'*.swp' - \ ] - - " If on a system where case matters for filenames, for any that had - " lowercase letters, add their uppercase analogues - if has('fname_case') - for ignore in ignores - if ignore =~# '\l' - call add(ignores, toupper(ignore)) - endif - endfor - endif - - " Return the completed setting - return join(ignores, ',') - -endfunction - -" Run helper function just defined -let &wildignore = s:Wildignore() diff --git a/vim/vimrc b/vim/vimrc index 6b5fce34..fc27e34a 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -187,7 +187,78 @@ if has('persistent_undo') set undodir^=$MYVIMRUNTIME/cache/undo// endif -" Tab completion settings; see also plugin/wildignore.vim +" Tab completion settings +set wildignore=*~ + \,*.7z + \,*.a + \,*.adf + \,*.asc + \,*.au + \,*.aup + \,*.avi + \,*.bin + \,*.bmp + \,*.bz2 + \,*.class + \,*.db + \,*.dbm + \,*.djvu + \,*.docx + \,*.exe + \,*.filepart + \,*.flac + \,*.gd2 + \,*.gif + \,*.gifv + \,*.gmo + \,*.gpg + \,*.gz + \,*.hdf + \,*.ico + \,*.iso + \,*.jar + \,*.jpeg + \,*.jpg + \,*.m4a + \,*.mid + \,*.mp3 + \,*.mp4 + \,*.o + \,*.odp + \,*.ods + \,*.odt + \,*.ogg + \,*.ogv + \,*.opus + \,*.pbm + \,*.pdf + \,*.png + \,*.ppt + \,*.psd + \,*.pyc + \,*.rar + \,*.rm + \,*.s3m + \,*.sdbm + \,*.sqlite + \,*.swf + \,*.swp + \,*.tar + \,*.tga + \,*.ttf + \,*.wav + \,*.webm + \,*.xbm + \,*.xcf + \,*.xls + \,*.xlsx + \,*.xpm + \,*.xz + \,*.zip + \,.DS_Store + \,.git + \,.hg + \,.svn if exists('+wildignorecase') set wildignorecase " Case insensitive, if supported (v7.3.072) endif -- cgit v1.2.3 From f4dbf1bc3daed4717534d3c409a07d9d03b51e03 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 18 May 2019 00:10:11 +1200 Subject: Adjust formatting of a leading comment --- vim/plugin/dist.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vim/plugin/dist.vim b/vim/plugin/dist.vim index 7c745e4f..3a84abaa 100644 --- a/vim/plugin/dist.vim +++ b/vim/plugin/dist.vim @@ -1,4 +1,5 @@ -" Skip loading some plugins: +" Skip loading some plugins + " I manage plugins myself with Git and a Makefile let loaded_getscriptPlugin = 1 let loaded_vimballPlugin = 1 -- cgit v1.2.3 From 67955bd87e45af37fee245c1ae5d7b44496f78be Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 18 May 2019 00:12:51 +1200 Subject: Don't suppress errors from loading matchit --- vim/plugin/matchit.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/plugin/matchit.vim b/vim/plugin/matchit.vim index 4507640e..f842bd9c 100644 --- a/vim/plugin/matchit.vim +++ b/vim/plugin/matchit.vim @@ -2,5 +2,5 @@ if has('packages') && !has('nvim') packadd matchit else - silent! runtime macros/matchit.vim + runtime macros/matchit.vim endif -- cgit v1.2.3 From db1e6d44afdae641a0f4cb5d367b25fb216f13c3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 18 May 2019 00:24:15 +1200 Subject: Add a couple of abbreviations --- vim/vimrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index fc27e34a..3c4e3df0 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -503,5 +503,9 @@ nnoremap : ^"zyg_:z " \! executes line with 'shell' nnoremap ! ^"zyg_:!z +" Things I almsot always type wrnog +inoreabbrev almsot almost +inoreabbrev wrnog wrong + " Source any .vim files from ~/.vim/config runtime! config/*.vim -- cgit v1.2.3 From 914503919283e061c3013cb64114187d4412b11b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 18 May 2019 00:25:58 +1200 Subject: Test 'compatible' is off before loading main vimrc --- vim/vimrc.stub.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/vimrc.stub.vim b/vim/vimrc.stub.vim index b2d8803a..1d8d3d9a 100644 --- a/vim/vimrc.stub.vim +++ b/vim/vimrc.stub.vim @@ -1,6 +1,6 @@ " If we have non-tiny Vim version >=7, source real vimrc; this works because " tiny and/or ancient builds of Vim quietly ignore all code in :if blocks -if v:version >= 700 +if v:version >= 700 && !&compatible runtime vimrc finish endif -- cgit v1.2.3 From c2f115fd2fb4eae76782d74584eeea36afebc52b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 18 May 2019 00:37:06 +1200 Subject: Move single ftdetect rule into filetype.vim --- Makefile | 6 ------ vim/filetype.vim | 10 ++++++++++ vim/ftdetect/perl.vim | 9 --------- 3 files changed, 10 insertions(+), 15 deletions(-) delete mode 100644 vim/ftdetect/perl.vim diff --git a/Makefile b/Makefile index 696fd72a..df29b947 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,6 @@ install-vim-compiler \ install-vim-config \ install-vim-filetype \ - install-vim-ftdetect \ install-vim-ftplugin \ install-vim-gui \ install-vim-gui-config \ @@ -531,7 +530,6 @@ install-vim: install-vim-after \ install-vim-compiler \ install-vim-config \ install-vim-filetype \ - install-vim-ftdetect \ install-vim-ftplugin \ install-vim-indent \ install-vim-plugin \ @@ -599,10 +597,6 @@ install-vim-config: install-vim-cache install-vim-filetype: cp -p -- vim/filetype.vim vim/scripts.vim $(VIMDIR) -install-vim-ftdetect: - mkdir -p -- $(VIMDIR)/ftdetect - cp -p -- vim/ftdetect/*.vim $(VIMDIR)/ftdetect - install-vim-ftplugin: mkdir -p -- $(VIMDIR)/ftplugin cp -p -- vim/ftplugin/*.vim $(VIMDIR)/ftplugin diff --git a/vim/filetype.vim b/vim/filetype.vim index d7ca5255..9d6c6eb7 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -462,6 +462,16 @@ augroup filetypedetect \,zshrc \ setfiletype zsh + " If it's a new file in a bin, libexec, or scripts subdir that has a + " Makefile.PL sibling, and I'm editing it, it's almost definitely Perl. + autocmd BufNewFile + \ ?*/bin/?* + \,?*/libexec/?* + \,?*/scripts/?* + \ if filereadable(expand(':p:h:h') . '/Makefile.PL') + \| setfiletype perl + \|endif + " Load any extra rules in ftdetect directories runtime! ftdetect/*.vim diff --git a/vim/ftdetect/perl.vim b/vim/ftdetect/perl.vim deleted file mode 100644 index 887a9fb6..00000000 --- a/vim/ftdetect/perl.vim +++ /dev/null @@ -1,9 +0,0 @@ -" If it's a new file in a bin, libexec, or scripts subdir that has a -" Makefile.PL sibling, and I'm editing it, it's almost definitely Perl. -autocmd filetypedetect BufNewFile - \ ?*/bin/?* - \,?*/libexec/?* - \,?*/scripts/?* - \ if filereadable(expand(':p:h:h') . '/Makefile.PL') - \| setfiletype perl - \|endif -- cgit v1.2.3 From a7157ca218d430d924de78099b8427b43728c9f1 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 18 May 2019 01:07:47 +1200 Subject: Update vim-sahara to v1.2.0 --- vim/bundle/sahara | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/sahara b/vim/bundle/sahara index 901fdb72..7504b620 160000 --- a/vim/bundle/sahara +++ b/vim/bundle/sahara @@ -1 +1 @@ -Subproject commit 901fdb72c3fe74ee5f0aa49c2fda52af3cbde081 +Subproject commit 7504b62005330302110ed26f84ac2f588251ca72 -- cgit v1.2.3 From 093665ce37ff6447431741f633ce28a4ae982360 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 18 May 2019 01:40:37 +1200 Subject: More compact layout for 'wildignore' setting --- vim/vimrc | 81 +++++++++++++-------------------------------------------------- 1 file changed, 16 insertions(+), 65 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 3c4e3df0..ab4729ec 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -190,75 +190,26 @@ endif " Tab completion settings set wildignore=*~ \,*.7z - \,*.a - \,*.adf - \,*.asc - \,*.au - \,*.aup - \,*.avi - \,*.bin - \,*.bmp - \,*.bz2 + \,*.a,*.adf,*.asc,*.au,*.aup,*.avi + \,*.bin,*.bmp,*.bz2 \,*.class - \,*.db - \,*.dbm - \,*.djvu - \,*.docx + \,*.db,*.dbm,*.djvu,*.docx \,*.exe - \,*.filepart - \,*.flac - \,*.gd2 - \,*.gif - \,*.gifv - \,*.gmo - \,*.gpg - \,*.gz + \,*.filepart,*.flac + \,*.gd2,*.gif,*.gifv,*.gmo,*.gpg,*.gz \,*.hdf - \,*.ico - \,*.iso - \,*.jar - \,*.jpeg - \,*.jpg - \,*.m4a - \,*.mid - \,*.mp3 - \,*.mp4 - \,*.o - \,*.odp - \,*.ods - \,*.odt - \,*.ogg - \,*.ogv - \,*.opus - \,*.pbm - \,*.pdf - \,*.png - \,*.ppt - \,*.psd - \,*.pyc - \,*.rar - \,*.rm - \,*.s3m - \,*.sdbm - \,*.sqlite - \,*.swf - \,*.swp - \,*.tar - \,*.tga - \,*.ttf - \,*.wav - \,*.webm - \,*.xbm - \,*.xcf - \,*.xls - \,*.xlsx - \,*.xpm - \,*.xz + \,*.ico,*.iso + \,*.jar,*.jpeg,*.jpg + \,*.m4a,*.mid,*.mp3,*.mp4 + \,*.o,*.odp,*.ods,*.odt,*.ogg,*.ogv,*.opus + \,*.pbm,*.pdf,*.png,*.ppt,*.psd,*.pyc + \,*.rar,*.rm + \,*.s3m,*.sdbm,*.sqlite,*.swf,*.swp + \,*.tar,*.tga,*.ttf + \,*.wav,*.webm + \,*.xbm,*.xcf,*.xls,*.xlsx,*.xpm,*.xz \,*.zip - \,.DS_Store - \,.git - \,.hg - \,.svn + \,.DS_Store,.git,.hg,.svn if exists('+wildignorecase') set wildignorecase " Case insensitive, if supported (v7.3.072) endif -- cgit v1.2.3 From 45851349ef36870460624039992b2dc59386a032 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 18 May 2019 12:11:06 +1200 Subject: Remove accidentally created "3" file --- 3 | 219 ---------------------------------------------------------------------- 1 file changed, 219 deletions(-) delete mode 100644 3 diff --git a/3 b/3 deleted file mode 100644 index a63baadd..00000000 --- a/3 +++ /dev/null @@ -1,219 +0,0 @@ -" Remove g:is_posix if we resorted to it in order to get correct POSIX sh -" highlighting with older Vim runtime files -if exists('is_posix') - unlet! is_posix is_kornshell -endif - -" If we know we have another shell type, clear away the others completely, now -" that core syntax/sh.vim is done prodding /bin/sh to determine the system -" shell type (which I don't care about). -if exists('b:is_bash') - unlet! b:is_sh b:is_posix b:is_kornshell -elseif exists('b:is_kornshell') - unlet! b:is_sh b:is_posix -elseif exists('b:is_posix') - unlet! b:is_sh -endif - -" The syntax highlighter seems to flag '/baz' in '"${foo:-"$bar"/baz}"' as an -" error, which it isn't, at least in POSIX sh, Bash, and Ksh. -syntax clear shDerefWordError - -" The syntax highlighter doesn't match parens for subshells for 'if' tests -" correctly if they're on separate lines. This happens enough that it's -" probably not worth keeping the error. -syntax clear shParenError - -" The syntax highlighter flags this code with an error on the final square -" bracket: `case $foo in [![:ascii:]]) ;; esac`, but that's all legal. I'm not -" yet sure how to fix it, so will just turn the error group for now. -syntax clear shTestError - -" Highlighting corrections specific to POSIX mode -if exists('b:is_posix') - - " Highlight some commands that are both defined by POSIX and builtin - " commands in dash, as a rough but useable proxy for 'shell builtins'. This - " list was mostly wrested from `man 1 dash`. Also include control structure - " keywords like `break`, `continue`, and `return`. - syntax clear shStatement - syntax cluster shCommandSubList add=shStatement - syntax cluster shCaseList add=shStatement - syntax keyword shStatement - \ alias - \ bg - \ break - \ cd - \ command - \ continue - \ echo - \ eval - \ exec - \ exit - \ export - \ fc - \ fg - \ getopts - \ hash - \ kill - \ printf - \ pwd - \ read - \ readonly - \ return - \ set - \ shift - \ test - \ times - \ trap - \ true - \ type - \ ulimit - \ umask - \ unalias - \ unset - \ wait - - " Core syntax/sh.vim puts IFS and other variables that affect shell function - " in another color, but a subset of them actually apply to POSIX shell too - " (and plain Bourne). These are selected by searching the POSIX manpages. I - " added NLSPATH too, which wasn't in the original. - syntax clear shShellVariables - syntax cluster shCommandSubList add=shShellVariables - syntax keyword shShellVariables - \ CDPATH - \ ENV - \ FCEDIT - \ HISTFILE - \ HISTSIZE - \ HISTTIMEFORMAT - \ HOME - \ IFS - \ LANG - \ LC_ALL - \ LC_COLLATE - \ LC_CTYPE - \ LC_MESSAGES - \ LC_NUMERIC - \ LINENO - \ MAIL - \ MAILCHECK - \ MAILPATH - \ NLSPATH - \ OLDPWD - \ OPTARG - \ OPTERR - \ OPTIND - \ PATH - \ PS1 - \ PS2 - \ PS3 - \ PS4 - \ PWD - - " Core syntax/sh.vim thinks 'until' is a POSIX control structure keyword, - " but it isn't. Reset shRepeat and rebuild it with just 'while'. I only - " sort-of understand what this does, but it works. - syntax clear shRepeat - syntax region shRepeat - \ matchgroup=shLoop - \ start='\ Date: Sat, 18 May 2019 12:40:59 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index f1f04c8d..83ce6dfe 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v4.31.0 -Fri May 17 11:11:41 UTC 2019 +tejr dotfiles v4.32.0 +Sat May 18 00:40:59 UTC 2019 -- cgit v1.2.3