From 6df8bea1857f54880dda016f30b170e42d15734b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 8 May 2019 23:19:50 +1200 Subject: Bind \S in Vim to run :scriptnames Just because I seem to be running it a lot lately. --- vim/vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index d3a814f2..5d3bfc7a 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -348,6 +348,9 @@ nnoremap R :source $MYVIMRC " \s toggles spell checking nnoremap s :setlocal spell! spell? +" \S shows loaded scripts +nnoremap S :scriptnames + " \t shows current filetype nnoremap t :setlocal filetype? " \T clears filetype -- cgit v1.2.3 From 6a1209adc7c3bede26376a90b2068d2801e391f8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 8 May 2019 23:48:48 +1200 Subject: Remap g& to preserve substitution flags --- vim/vimrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vim/vimrc b/vim/vimrc index 5d3bfc7a..d996e1c6 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -243,9 +243,10 @@ if &loadplugins " Don't change the mapping if we won't be loading the plugin nmap (ScrollNext) endif -" Remap normal/visual & to preserve substitution flags +" Remap normal/visual & and g& to preserve substitution flags nnoremap & :&& xnoremap & :&& +nnoremap g& :%&& " Map g: as a 'colon operator' nmap g: (ColonOperator) -- cgit v1.2.3 From acb2ed1390d98516d8d1d5fd7ca83ed4d55af948 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 00:03:10 +1200 Subject: Remove unnecessary g: prefixes to Vim variables --- vim/after/ftplugin/diff.vim | 2 +- vim/after/ftplugin/gitcommit.vim | 2 +- vim/after/ftplugin/help.vim | 2 +- vim/after/ftplugin/html.vim | 2 +- vim/after/ftplugin/mail.vim | 4 ++-- vim/after/ftplugin/make.vim | 2 +- vim/after/ftplugin/markdown.vim | 2 +- vim/after/ftplugin/perl.vim | 2 +- vim/after/ftplugin/php.vim | 2 +- vim/after/ftplugin/sh.vim | 4 ++-- vim/after/ftplugin/vim.vim | 4 ++-- vim/after/indent/html.vim | 2 +- vim/after/plugin/dist.vim | 16 ++++++++-------- vim/after/syntax/readline.vim | 2 +- vim/after/syntax/sh.vim | 4 ++-- vim/compiler/bash.vim | 4 ++-- vim/compiler/ksh.vim | 4 ++-- vim/compiler/perlcritic.vim | 4 ++-- vim/compiler/php.vim | 4 ++-- vim/compiler/sh.vim | 4 ++-- vim/compiler/shellcheck.vim | 4 ++-- vim/compiler/vint.vim | 4 ++-- vim/compiler/zsh.vim | 4 ++-- vim/filetype.vim | 4 ++-- vim/ftplugin/textarea.vim | 2 +- vim/indent/html.vim | 2 +- vim/plugin/dist.vim | 16 ++++++++-------- vim/plugin/wildignore.vim | 4 ++-- vim/syntax/readline.vim | 2 +- 29 files changed, 57 insertions(+), 57 deletions(-) diff --git a/vim/after/ftplugin/diff.vim b/vim/after/ftplugin/diff.vim index 5d4ff9ae..f9f6c4b3 100644 --- a/vim/after/ftplugin/diff.vim +++ b/vim/after/ftplugin/diff.vim @@ -1,5 +1,5 @@ " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_diff_maps') +if exists('no_plugin_maps') || exists('no_diff_maps') finish endif diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim index 76a65596..bac342f0 100644 --- a/vim/after/ftplugin/gitcommit.vim +++ b/vim/after/ftplugin/gitcommit.vim @@ -15,7 +15,7 @@ if has('autocmd') && exists('+cursorcolumn') endif " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_gitcommit_maps') +if exists('no_plugin_maps') || exists('no_gitcommit_maps') finish endif diff --git a/vim/after/ftplugin/help.vim b/vim/after/ftplugin/help.vim index a72dac8e..a588700d 100644 --- a/vim/after/ftplugin/help.vim +++ b/vim/after/ftplugin/help.vim @@ -19,7 +19,7 @@ if &keywordprg !=# ':help' endif " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_help_maps') +if exists('no_plugin_maps') || exists('no_help_maps') finish endif diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim index 0dff879f..203e3f46 100644 --- a/vim/after/ftplugin/html.vim +++ b/vim/after/ftplugin/html.vim @@ -26,7 +26,7 @@ let b:undo_ftplugin .= '|execute ''autocmd! html_timestamp''' \ . '|augroup! html_timestamp' " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_html_maps') +if exists('no_plugin_maps') || exists('no_html_maps') finish endif diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 898fd6a8..457135ef 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -26,13 +26,13 @@ let b:undo_ftplugin .= '|setlocal formatoptions<' " Define what constitutes a 'blank line' for the squeeze_repeat_blanks.vim " plugin, if loaded, to include leading quotes and spaces -if exists('g:loaded_squeeze_repeat_blanks') +if exists('loaded_squeeze_repeat_blanks') let b:squeeze_repeat_blanks_blank = '^[ >]*$' let b:undo_ftplugin .= '|unlet b:squeeze_repeat_blanks_blank' endif " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_mail_maps') +if exists('no_plugin_maps') || exists('no_mail_maps') finish endif diff --git a/vim/after/ftplugin/make.vim b/vim/after/ftplugin/make.vim index 353a0bbf..53a1cc7b 100644 --- a/vim/after/ftplugin/make.vim +++ b/vim/after/ftplugin/make.vim @@ -1,5 +1,5 @@ " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_make_maps') +if exists('no_plugin_maps') || exists('no_make_maps') finish endif diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim index 82fbe9da..b5919b20 100644 --- a/vim/after/ftplugin/markdown.vim +++ b/vim/after/ftplugin/markdown.vim @@ -17,7 +17,7 @@ if has('spell') endif " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_markdown_maps') +if exists('no_plugin_maps') || exists('no_markdown_maps') finish endif diff --git a/vim/after/ftplugin/perl.vim b/vim/after/ftplugin/perl.vim index bcee97d6..d1e5dd52 100644 --- a/vim/after/ftplugin/perl.vim +++ b/vim/after/ftplugin/perl.vim @@ -13,7 +13,7 @@ let b:regex_escape_flavor = 'ere' let b:undo_ftplugin .= '|unlet b:regex_escape_flavor' " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_perl_maps') +if exists('no_plugin_maps') || exists('no_perl_maps') finish endif diff --git a/vim/after/ftplugin/php.vim b/vim/after/ftplugin/php.vim index 801f1c76..58d83c49 100644 --- a/vim/after/ftplugin/php.vim +++ b/vim/after/ftplugin/php.vim @@ -17,7 +17,7 @@ let b:regex_escape_flavor = 'ere' let b:undo_ftplugin .= '|unlet b:regex_escape_flavor' " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_php_maps') +if exists('no_plugin_maps') || exists('no_php_maps') finish endif diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim index 0fece696..7ded5134 100644 --- a/vim/after/ftplugin/sh.vim +++ b/vim/after/ftplugin/sh.vim @@ -25,7 +25,7 @@ let b:undo_ftplugin .= '|unlet b:current_compiler b:sh_check_compiler' " 8.1.257 updated the runtime files to include a fix for this if exists('b:is_posix') \ && (v:version < 800 || v:version == 800 && !has('patch257')) - let g:is_posix = 1 + let is_posix = 1 endif " Queue up undo commands to clear the shell language flags that we set for @@ -34,7 +34,7 @@ endif let b:undo_ftplugin .= '|unlet! b:is_bash b:is_kornshell b:is_posix' " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_sh_maps') +if exists('no_plugin_maps') || exists('no_sh_maps') finish endif diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim index 790dd38e..76608691 100644 --- a/vim/after/ftplugin/vim.vim +++ b/vim/after/ftplugin/vim.vim @@ -19,7 +19,7 @@ endif " Adjust the match words for the matchit plugin; the default filetype plugin " matches e.g. an opening "function" with the first "return" within, which I " don't like -if exists('g:loaded_matchit') +if exists('loaded_matchit') let b:match_words = \ '\:\,' . \ '\<\(wh\%[ile]\|for\)\>:\,' . @@ -29,7 +29,7 @@ if exists('g:loaded_matchit') endif " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_vim_maps') +if exists('no_plugin_maps') || exists('no_vim_maps') finish endif diff --git a/vim/after/indent/html.vim b/vim/after/indent/html.vim index 0309881c..a7a085fe 100644 --- a/vim/after/indent/html.vim +++ b/vim/after/indent/html.vim @@ -1,5 +1,5 @@ " Clear away the flag we set to indent after paragraphs -unlet g:html_indent_inctags +unlet html_indent_inctags " Don't re-indent lines on right-angle-bracket or enter setlocal indentkeys-=<>>, diff --git a/vim/after/plugin/dist.vim b/vim/after/plugin/dist.vim index f7491d66..70747f8c 100644 --- a/vim/after/plugin/dist.vim +++ b/vim/after/plugin/dist.vim @@ -1,9 +1,9 @@ " Clean up the short-circuiting variables from config/plugins.vim -unlet! g:loaded_getscriptPlugin -unlet! g:loaded_vimballPlugin -unlet! g:loaded_logiPat -unlet! g:loaded_netrwPlugin -unlet! g:loaded_rrhelper -unlet! g:loaded_spellfile_plugin -unlet! g:loaded_tarPlugin -unlet! g:loaded_zipPlugin +unlet! loaded_getscriptPlugin +unlet! loaded_vimballPlugin +unlet! loaded_logiPat +unlet! loaded_netrwPlugin +unlet! loaded_rrhelper +unlet! loaded_spellfile_plugin +unlet! loaded_tarPlugin +unlet! loaded_zipPlugin diff --git a/vim/after/syntax/readline.vim b/vim/after/syntax/readline.vim index 050b2dc1..215cedc8 100644 --- a/vim/after/syntax/readline.vim +++ b/vim/after/syntax/readline.vim @@ -1,3 +1,3 @@ " Clear away the flag we set in syntax/readline.vim to include Bash commands " in the highlight list -unlet! g:readline_has_bash +unlet! readline_has_bash diff --git a/vim/after/syntax/sh.vim b/vim/after/syntax/sh.vim index 95ec5546..797bdab9 100644 --- a/vim/after/syntax/sh.vim +++ b/vim/after/syntax/sh.vim @@ -1,7 +1,7 @@ " Remove g:is_posix if we resorted to it in order to get correct POSIX sh " highlighting with older Vim runtime files -if exists('g:is_posix') - unlet! g:is_posix g:is_kornshell +if exists('is_posix') + unlet! is_posix is_kornshell endif " If we know we have another shell type, clear away the others completely, now diff --git a/vim/compiler/bash.vim b/vim/compiler/bash.vim index 832e9120..ca418c24 100644 --- a/vim/compiler/bash.vim +++ b/vim/compiler/bash.vim @@ -1,7 +1,7 @@ -if exists('g:current_compiler') +if exists('current_compiler') finish endif -let g:current_compiler = 'bash' +let current_compiler = 'bash' if exists(':CompilerSet') != 2 command -nargs=* CompilerSet setlocal diff --git a/vim/compiler/ksh.vim b/vim/compiler/ksh.vim index be552972..759aae02 100644 --- a/vim/compiler/ksh.vim +++ b/vim/compiler/ksh.vim @@ -1,7 +1,7 @@ -if exists('g:current_compiler') +if exists('current_compiler') finish endif -let g:current_compiler = 'ksh' +let current_compiler = 'ksh' if exists(':CompilerSet') != 2 command -nargs=* CompilerSet setlocal diff --git a/vim/compiler/perlcritic.vim b/vim/compiler/perlcritic.vim index 0d61487b..341fc9c8 100644 --- a/vim/compiler/perlcritic.vim +++ b/vim/compiler/perlcritic.vim @@ -1,7 +1,7 @@ -if exists('g:current_compiler') +if exists('current_compiler') finish endif -let g:current_compiler = 'perlcritic' +let current_compiler = 'perlcritic' if exists(':CompilerSet') != 2 command -nargs=* CompilerSet setlocal diff --git a/vim/compiler/php.vim b/vim/compiler/php.vim index 2d5f4f69..66313bba 100644 --- a/vim/compiler/php.vim +++ b/vim/compiler/php.vim @@ -1,7 +1,7 @@ -if exists('g:current_compiler') || &compatible +if exists('current_compiler') || &compatible finish endif -let g:current_compiler = 'php' +let current_compiler = 'php' if exists(':CompilerSet') != 2 command -nargs=* CompilerSet setlocal diff --git a/vim/compiler/sh.vim b/vim/compiler/sh.vim index a62a00db..d4134e6e 100644 --- a/vim/compiler/sh.vim +++ b/vim/compiler/sh.vim @@ -1,7 +1,7 @@ -if exists('g:current_compiler') +if exists('current_compiler') finish endif -let g:current_compiler = 'sh' +let current_compiler = 'sh' if exists(':CompilerSet') != 2 command -nargs=* CompilerSet setlocal diff --git a/vim/compiler/shellcheck.vim b/vim/compiler/shellcheck.vim index 354291f6..c2cf04de 100644 --- a/vim/compiler/shellcheck.vim +++ b/vim/compiler/shellcheck.vim @@ -1,7 +1,7 @@ -if exists('g:current_compiler') +if exists('current_compiler') finish endif -let g:current_compiler = 'shellcheck' +let current_compiler = 'shellcheck' if exists(':CompilerSet') != 2 command -nargs=* CompilerSet setlocal diff --git a/vim/compiler/vint.vim b/vim/compiler/vint.vim index db75d3c6..e0d0b076 100644 --- a/vim/compiler/vint.vim +++ b/vim/compiler/vint.vim @@ -1,7 +1,7 @@ -if exists('g:current_compiler') +if exists('current_compiler') finish endif -let g:current_compiler = 'vimlint' +let current_compiler = 'vimlint' if exists(':CompilerSet') != 2 command -nargs=* CompilerSet setlocal diff --git a/vim/compiler/zsh.vim b/vim/compiler/zsh.vim index c9290b8d..4fc5f30e 100644 --- a/vim/compiler/zsh.vim +++ b/vim/compiler/zsh.vim @@ -1,7 +1,7 @@ -if exists('g:current_compiler') +if exists('current_compiler') finish endif -let g:current_compiler = 'zsh' +let current_compiler = 'zsh' if exists(':CompilerSet') != 2 command -nargs=* CompilerSet setlocal diff --git a/vim/filetype.vim b/vim/filetype.vim index 8a477ecc..66936f34 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -1,8 +1,8 @@ " Override system filetype.vim if sufficiently new -if exists('g:did_load_filetypes') || v:version < 700 +if exists('did_load_filetypes') || v:version < 700 finish endif -let g:did_load_filetypes = 1 +let did_load_filetypes = 1 " If we don't have +autocmd or are 'compatible', do nothing, and don't try " again later diff --git a/vim/ftplugin/textarea.vim b/vim/ftplugin/textarea.vim index 7877c8db..872ae4c6 100644 --- a/vim/ftplugin/textarea.vim +++ b/vim/ftplugin/textarea.vim @@ -1,5 +1,5 @@ " Stop here if the user doesn't want ftplugin mappings -if exists('g:no_plugin_maps') || exists('g:no_textarea_maps') +if exists('no_plugin_maps') || exists('no_textarea_maps') finish endif diff --git a/vim/indent/html.vim b/vim/indent/html.vim index b0a4a4f6..d93443a7 100644 --- a/vim/indent/html.vim +++ b/vim/indent/html.vim @@ -1,2 +1,2 @@ " Indent after

paragraph tags too -let g:html_indent_inctags = 'p' +let html_indent_inctags = 'p' diff --git a/vim/plugin/dist.vim b/vim/plugin/dist.vim index eb814387..7c745e4f 100644 --- a/vim/plugin/dist.vim +++ b/vim/plugin/dist.vim @@ -1,15 +1,15 @@ " Skip loading some plugins: " I manage plugins myself with Git and a Makefile -let g:loaded_getscriptPlugin = 1 -let g:loaded_vimballPlugin = 1 +let loaded_getscriptPlugin = 1 +let loaded_vimballPlugin = 1 " Vim is the wrong tool for reading archives -let g:loaded_tarPlugin = 1 -let g:loaded_zipPlugin = 1 +let loaded_tarPlugin = 1 +let loaded_zipPlugin = 1 " I prefer filtering text with Unix tools -let g:loaded_logiPat = 1 +let loaded_logiPat = 1 " The shell, tab completion, and 'wildmenu' are good enough -let g:loaded_netrwPlugin = 1 +let loaded_netrwPlugin = 1 " I don't use Vim servers -let g:loaded_rrhelper = 1 +let loaded_rrhelper = 1 " I don't need extra spelling files -let g:loaded_spellfile_plugin = 1 +let loaded_spellfile_plugin = 1 diff --git a/vim/plugin/wildignore.vim b/vim/plugin/wildignore.vim index a08e0251..a99a2eb0 100644 --- a/vim/plugin/wildignore.vim +++ b/vim/plugin/wildignore.vim @@ -4,10 +4,10 @@ if &compatible || v:version < 700 || !has('wildignore') finish endif -if exists('g:loaded_wildmenu') +if exists('loaded_wildmenu') finish endif -let g:loaded_wildmenu = 1 +let loaded_wildmenu = 1 " Helper function for local scope function! s:Wildignore() abort diff --git a/vim/syntax/readline.vim b/vim/syntax/readline.vim index 874ebb32..250410ec 100644 --- a/vim/syntax/readline.vim +++ b/vim/syntax/readline.vim @@ -1,2 +1,2 @@ " Include Bash commands in the highlight list -let g:readline_has_bash = 1 +let readline_has_bash = 1 -- cgit v1.2.3 From 91220b6858bfcdd360b78cb1c4a36ab59cf82421 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 00:34:44 +1200 Subject: Remove unnecessary l: prefixes to Vim variables --- vim/autoload/diff.vim | 18 +++++++++--------- vim/autoload/filetype.vim | 34 +++++++++++++++++----------------- vim/autoload/gitcommit.vim | 10 +++++----- vim/autoload/html.vim | 20 ++++++++++---------- vim/autoload/mail.vim | 38 +++++++++++++++++++------------------- vim/autoload/perl.vim | 30 +++++++++++++++--------------- vim/autoload/quote.vim | 16 ++++++++-------- vim/autoload/vimrc.vim | 4 ++-- vim/plugin/wildignore.vim | 44 ++++++++++++++++++++++---------------------- 9 files changed, 107 insertions(+), 107 deletions(-) diff --git a/vim/autoload/diff.vim b/vim/autoload/diff.vim index 32e9333a..29389b95 100644 --- a/vim/autoload/diff.vim +++ b/vim/autoload/diff.vim @@ -7,23 +7,23 @@ function! diff#MoveBlock(count, up, visual) abort endif " Flag for the number of blocks passed - let l:blocks = 0 + let blocks = 0 " Iterate through buffer lines - let l:num = line('.') - while a:up ? l:num > 1 : l:num < line('$') - let l:num += a:up ? -1 : 1 - if getline(l:num) =~# '^@@' - let l:blocks += 1 - if l:blocks == a:count + let num = line('.') + while a:up ? num > 1 : num < line('$') + let num += a:up ? -1 : 1 + if getline(num) =~# '^@@' + let blocks += 1 + if blocks == a:count break endif endif endwhile " Move to line if nonzero and not equal to the current line - if l:num != line('.') - execute 'normal '.l:num.'G' + if num != line('.') + execute 'normal '.num.'G' endif endfunction diff --git a/vim/autoload/filetype.vim b/vim/autoload/filetype.vim index e33dfcbc..fb70d690 100644 --- a/vim/autoload/filetype.vim +++ b/vim/autoload/filetype.vim @@ -8,24 +8,24 @@ function! filetype#StripRepeat() abort endif " Expand the match result - let l:fn = expand('') + let fn = expand('') " Strip leading and trailing #hashes# - if l:fn =~# '^#\+.*#\+$' - let l:fn = substitute(l:fn, '^#\+\(.\+\)#\+$', '\1', '') + if fn =~# '^#\+.*#\+$' + let fn = substitute(fn, '^#\+\(.\+\)#\+$', '\1', '') " Strip trailing tilde~ - elseif l:fn =~# '\~$' - let l:fn = substitute(l:fn, '\~$', '', '') + elseif fn =~# '\~$' + let fn = substitute(fn, '\~$', '', '') " Strip generic .extension else - let l:fn = expand(':r') + let fn = expand(':r') endif " Re-run the group if there's anything left - if strlen(l:fn) - execute 'doautocmd filetypedetect BufRead ' . fnameescape(l:fn) + if strlen(fn) + execute 'doautocmd filetypedetect BufRead ' . fnameescape(fn) endif endfunction @@ -41,17 +41,17 @@ function! filetype#SudoRepeat() abort endif " Expand the match result - let l:fn = expand('') + let fn = expand('') " myfileXXQGS16A.conf: strip eight chars before final period - if l:fn =~# '/[^./]\+\w\{8}\.[^./]\+$' - let l:fr = expand(':r') - let l:fe = expand(':e') - let l:fn = strpart(l:fr, -8, strlen(l:fr)) . '.' . l:fe + 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 l:fn =~# '/[^./]\+\.\w\{8}$' - let l:fn = expand(':r') + elseif fn =~# '/[^./]\+\.\w\{8}$' + let fn = expand(':r') " Unrecognised pattern; return, don't repeat else @@ -59,8 +59,8 @@ function! filetype#SudoRepeat() abort endif " Re-run the group if there's anything left - if strlen(l:fn) - execute 'doautocmd filetypedetect BufRead ' . fnameescape(l:fn) + if strlen(fn) + execute 'doautocmd filetypedetect BufRead ' . fnameescape(fn) endif endfunction diff --git a/vim/autoload/gitcommit.vim b/vim/autoload/gitcommit.vim index 170cc2d0..7aba1c5b 100644 --- a/vim/autoload/gitcommit.vim +++ b/vim/autoload/gitcommit.vim @@ -3,14 +3,14 @@ function! gitcommit#CursorColumn() abort " If we can find a line after the first that isn't a comment, we're " composing the message - for l:num in range(1, line('$')) - if l:num == 1 + for num in range(1, line('$')) + if num == 1 continue endif - let l:line = getline(l:num) - if strpart(l:line, 0, 1) !=# '#' + let line = getline(num) + if strpart(line, 0, 1) !=# '#' return '+1' - elseif l:line =~# '^# -\{24} >8 -\{24}$' + elseif line =~# '^# -\{24} >8 -\{24}$' break endif endfor diff --git a/vim/autoload/html.vim b/vim/autoload/html.vim index e0d47e47..9466be33 100644 --- a/vim/autoload/html.vim +++ b/vim/autoload/html.vim @@ -16,9 +16,9 @@ endfunction " Tidy the whole buffer function! html#TidyBuffer() abort - let l:view = winsaveview() + let view = winsaveview() %!tidy -quiet - call winrestview(l:view) + call winrestview(view) endfunction " Update a timestamp @@ -26,14 +26,14 @@ function! html#TimestampUpdate() abort if !&modified return endif - let l:cv = winsaveview() + let cv = winsaveview() call cursor(1,1) - let l:li = search('\C^\s*Last updated: .\+$', 'n') - if l:li - let l:date = substitute(system('date -u'), '\C\n$', '', '') - let l:line = getline(l:li) - call setline(l:li, substitute(l:line, '\C\S.*', - \ 'Last updated: '.l:date.'', '')) + let li = search('\C^\s*Last updated: .\+$', 'n') + if li + let date = substitute(system('date -u'), '\C\n$', '', '') + let line = getline(li) + call setline(li, substitute(line, '\C\S.*', + \ 'Last updated: '.date.'', '')) endif - call winrestview(l:cv) + call winrestview(cv) endfunction diff --git a/vim/autoload/mail.vim b/vim/autoload/mail.vim index f37a7865..40b7fb7f 100644 --- a/vim/autoload/mail.vim +++ b/vim/autoload/mail.vim @@ -1,16 +1,16 @@ " Add a header to a mail message function! mail#AddHeaderField(name, body) abort - let l:num = 0 - while l:num < line('$') && getline(l:num + 1) !=# '' - let l:num += 1 + let num = 0 + while num < line('$') && getline(num + 1) !=# '' + let num += 1 endwhile - call append(l:num, a:name.': '.a:body) + call append(num, a:name.': '.a:body) endfunction " Add a set of headers to a mail message function! mail#AddHeaderFields(fields) abort - for l:name in sort(keys(a:fields)) - call mail#AddHeaderField(l:name, a:fields[l:name]) + for name in sort(keys(a:fields)) + call mail#AddHeaderField(name, a:fields[name]) endfor endfunction @@ -39,43 +39,43 @@ function! mail#NewBlank(count, up, visual) abort endif " Flag for whether we've started a block - let l:block = 0 + let block = 0 " Flag for the number of blocks passed - let l:blocks = 0 + let blocks = 0 " Iterate through buffer lines - let l:num = line('.') - while a:up ? l:num > 1 : l:num < line('$') + let num = line('.') + while a:up ? num > 1 : num < line('$') " If the line is blank - if getline(l:num) =~# '^[ >]*$' + if getline(num) =~# '^[ >]*$' " If we'd moved through a non-blank block already, reset that flag and " bump up the block count - if l:block - let l:block = 0 - let l:blocks += 1 + if block + let block = 0 + let blocks += 1 endif " If we've hit the number of blocks, end the loop - if l:blocks == a:count + if blocks == a:count break endif " If the line is not blank, flag that we're going through a block else - let l:block = 1 + let block = 1 endif " Move the line number or up or down depending on direction - let l:num += a:up ? -1 : 1 + let num += a:up ? -1 : 1 endwhile " Move to line if nonzero and not equal to the current line - if l:num != line('.') - execute 'normal '.l:num.'G' + if num != line('.') + execute 'normal '.num.'G' endif endfunction diff --git a/vim/autoload/perl.vim b/vim/autoload/perl.vim index 3b87bb36..7d825604 100644 --- a/vim/autoload/perl.vim +++ b/vim/autoload/perl.vim @@ -2,26 +2,26 @@ function! perl#Boilerplate() abort " Flag whether the buffer started blank - let l:blank = line2byte(line('$') + 1) <= 2 + let blank = line2byte(line('$') + 1) <= 2 " This is a .pm file, guess its package name from path if expand('%:e') ==# 'pm' - let l:match = matchlist(expand('%:p'), '.*/lib/\(.\+\).pm$') - if len(l:match) - let l:package = substitute(l:match[1], '/', '::', 'g') + let match = matchlist(expand('%:p'), '.*/lib/\(.\+\).pm$') + if len(match) + let package = substitute(match[1], '/', '::', 'g') else - let l:package = expand('%:t:r') + let package = expand('%:t:r') endif " Otherwise, just use 'main' else - let l:package = 'main' + let package = 'main' endif " Lines always to add - let l:lines = [ - \ 'package '.l:package.';', + let lines = [ + \ 'package '.package.';', \ '', \ 'use strict;', \ 'use warnings;', @@ -34,24 +34,24 @@ function! perl#Boilerplate() abort \ ] " Conditional lines depending on package - if l:package ==# 'main' - let l:lines = ['#!perl'] + l:lines + if package ==# 'main' + let lines = ['#!perl'] + lines else - let l:lines = l:lines + ['', '1;'] + let lines = lines + ['', '1;'] endif " Add all the lines in the array - for l:line in l:lines - call append(line('.') - 1, l:line) + for line in lines + call append(line('.') - 1, line) endfor " If we started in a completely empty buffer, delete the current blank line - if l:blank + if blank delete endif " If we added a trailing '1' for a package, move the cursor up two lines - if l:package !=# 'main' + if package !=# 'main' -2 endif diff --git a/vim/autoload/quote.vim b/vim/autoload/quote.vim index 2343b12a..b84a87e8 100644 --- a/vim/autoload/quote.vim +++ b/vim/autoload/quote.vim @@ -10,27 +10,27 @@ endfunction function! quote#QuoteOpfunc(type) abort " May as well make this configurable - let l:char = exists('b:quote_char') + let char = exists('b:quote_char') \ ? b:quote_char \ : '>' " Iterate over each matched line - for l:li in range(line('''['), line(''']')) + for li in range(line('''['), line(''']')) " Get current line text - let l:cur = getline(l:li) + let cur = getline(li) " Don't quote the first or last lines if they're blank - if !strlen(l:cur) && (l:li == line('''[') || l:li == line(''']')) + if !strlen(cur) && (li == line('''[') || li == line(''']')) continue endif " Only add a space after the quote character if this line isn't already " quoted with the same character - let l:new = l:cur[0] == l:char - \ ? l:char.l:cur - \ : l:char.' '.l:cur - call setline(l:li, l:new) + let new = cur[0] == char + \ ? char.cur + \ : char.' '.cur + call setline(li, new) endfor diff --git a/vim/autoload/vimrc.vim b/vim/autoload/vimrc.vim index 0dff8ffd..1af59c07 100644 --- a/vim/autoload/vimrc.vim +++ b/vim/autoload/vimrc.vim @@ -1,6 +1,6 @@ " Run some normal-mode keystrokes without jumping around function! vimrc#Anchor(keys) abort - let l:view = winsaveview() + let view = winsaveview() execute 'normal! '.a:keys - call winrestview(l:view) + call winrestview(view) endfunction diff --git a/vim/plugin/wildignore.vim b/vim/plugin/wildignore.vim index a99a2eb0..36a8f492 100644 --- a/vim/plugin/wildignore.vim +++ b/vim/plugin/wildignore.vim @@ -13,10 +13,10 @@ let loaded_wildmenu = 1 function! s:Wildignore() abort " New empty array - let l:ignores = [] + let ignores = [] " Archives - let l:ignores += [ + let ignores += [ \ '*.7z' \,'*.bz2' \,'*.gz' @@ -28,13 +28,13 @@ function! s:Wildignore() abort \ ] " Bytecode - let l:ignores += [ + let ignores += [ \ '*.class' \,'*.pyc' \ ] " Databases - let l:ignores += [ + let ignores += [ \ '*.db' \,'*.dbm' \,'*.sdbm' @@ -42,7 +42,7 @@ function! s:Wildignore() abort \ ] " Disk - let l:ignores += [ + let ignores += [ \ '*.adf' \,'*.bin' \,'*.hdf' @@ -50,7 +50,7 @@ function! s:Wildignore() abort \ ] " Documents - let l:ignores += [ + let ignores += [ \ '*.docx' \,'*.djvu' \,'*.odp' @@ -63,23 +63,23 @@ function! s:Wildignore() abort \ ] " Encrypted - let l:ignores += [ + let ignores += [ \ '*.asc' \,'*.gpg' \ ] " Executables - let l:ignores += [ + let ignores += [ \ '*.exe' \ ] " Fonts - let l:ignores += [ + let ignores += [ \ '*.ttf' \ ] " Images - let l:ignores += [ + let ignores += [ \ '*.bmp' \,'*.gd2' \,'*.gif' @@ -96,18 +96,18 @@ function! s:Wildignore() abort \ ] " Incomplete - let l:ignores += [ + let ignores += [ \ '*.filepart' \ ] " Objects - let l:ignores += [ + let ignores += [ \ '*.a' \,'*.o' \ ] " Sound - let l:ignores += [ + let ignores += [ \ '*.au' \,'*.aup' \,'*.flac' @@ -121,24 +121,24 @@ function! s:Wildignore() abort \ ] " System-specific - let l:ignores += [ + let ignores += [ \ '.DS_Store' \ ] " Translation - let l:ignores += [ + let ignores += [ \ '*.gmo' \ ] " Version control - let l:ignores += [ + let ignores += [ \ '.git' \,'.hg' \,'.svn' \ ] " Video - let l:ignores += [ + let ignores += [ \ '*.avi' \,'*.gifv' \,'*.mp4' @@ -149,7 +149,7 @@ function! s:Wildignore() abort \ ] " Vim - let l:ignores += [ + let ignores += [ \ '*~' \,'*.swp' \ ] @@ -157,15 +157,15 @@ function! s:Wildignore() abort " If on a system where case matters for filenames, for any that had " lowercase letters, add their uppercase analogues if has('fname_case') - for l:ignore in l:ignores - if l:ignore =~# '\l' - call add(l:ignores, toupper(l:ignore)) + for ignore in ignores + if ignore =~# '\l' + call add(ignores, toupper(ignore)) endif endfor endif " Return the completed setting - return join(l:ignores, ',') + return join(ignores, ',') endfunction -- cgit v1.2.3 From f40d66c775d9c2b46d8c8173d756b4f1de806b71 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 10:22:00 +1200 Subject: Update vim-big-file-options to v1.1.0 --- vim/bundle/big_file_options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/big_file_options b/vim/bundle/big_file_options index 10e23336..0cfc0f7c 160000 --- a/vim/bundle/big_file_options +++ b/vim/bundle/big_file_options @@ -1 +1 @@ -Subproject commit 10e23336ae2fb213f44affc8c8b37b0d9bc23056 +Subproject commit 0cfc0f7ca6371539f1d81874137e61e3faf70a7d -- cgit v1.2.3 From 7b38ac6aa569eea4fbf88984f5813de2571d7aab Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 10:51:09 +1200 Subject: Update vim-cmdwin-ctrlc to v0.3.0 --- vim/bundle/cmdwin_ctrlc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/cmdwin_ctrlc b/vim/bundle/cmdwin_ctrlc index e3b155d0..5a547325 160000 --- a/vim/bundle/cmdwin_ctrlc +++ b/vim/bundle/cmdwin_ctrlc @@ -1 +1 @@ -Subproject commit e3b155d0a2281a96f479a4f665fd4ee5bf59dab8 +Subproject commit 5a547325bc70c09f562f783448276a6562eb9216 -- cgit v1.2.3 From 5c5a2cb18c11e691210c83b5d89de0b37d1ada4c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 10:56:20 +1200 Subject: Update vim-colon-operator to v0.4.0 --- vim/bundle/colon_operator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/colon_operator b/vim/bundle/colon_operator index f9664112..8238405d 160000 --- a/vim/bundle/colon_operator +++ b/vim/bundle/colon_operator @@ -1 +1 @@ -Subproject commit f966411229eae27333166a2e13ff868f1bf2b705 +Subproject commit 8238405d96e500be5c2eedfa638e94e58cc56ac7 -- cgit v1.2.3 From e5c49042ee765ec3224d50ac62a5396430bab0a3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 11:41:35 +1200 Subject: Update vim-copy-linebreak to v0.7.0 --- vim/bundle/copy_linebreak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/copy_linebreak b/vim/bundle/copy_linebreak index 4d189176..98eb34d4 160000 --- a/vim/bundle/copy_linebreak +++ b/vim/bundle/copy_linebreak @@ -1 +1 @@ -Subproject commit 4d189176359f23318cb46386d4140cd7fc629124 +Subproject commit 98eb34d4ef603039cd9d5a50e3c4f12fcb943fce -- cgit v1.2.3 From b75eb839cf103d589bb8ce7f4ef9105fab5c4f7a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 11:48:17 +1200 Subject: Update vim-cursorline-current to v0.4.0 --- vim/bundle/cursorline_current | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/cursorline_current b/vim/bundle/cursorline_current index b48b57b3..90ffeabc 160000 --- a/vim/bundle/cursorline_current +++ b/vim/bundle/cursorline_current @@ -1 +1 @@ -Subproject commit b48b57b35899796bfbea9a3aab8c584d8eaebfd5 +Subproject commit 90ffeabc80c0f27748213d30952ad00a8e57b097 -- cgit v1.2.3 From 44d0a4b70a041b5dceb128abf305113aa8b8d39c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 13:44:14 +1200 Subject: Update vim-diff-prune to v1.3.0 --- vim/bundle/diff_prune | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/diff_prune b/vim/bundle/diff_prune index 389f2da8..a1f9f164 160000 --- a/vim/bundle/diff_prune +++ b/vim/bundle/diff_prune @@ -1 +1 @@ -Subproject commit 389f2da8759cbbcf275798fb1e8c93114fa2dc0c +Subproject commit a1f9f164aa81742a66fc20806d7f080bdf7770d3 -- cgit v1.2.3 From e20a1b8dfe5296d5e8a838e411457463ce250cdd Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 15:56:56 +1200 Subject: Update vim-digraph-search to v0.2.0 --- vim/bundle/digraph_search | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/digraph_search b/vim/bundle/digraph_search index e330a6be..6a03a388 160000 --- a/vim/bundle/digraph_search +++ b/vim/bundle/digraph_search @@ -1 +1 @@ -Subproject commit e330a6befc506f6cdd33148fbf01b802ea7ffefd +Subproject commit 6a03a3885c0483d5cf6ef05613e509986822a209 -- cgit v1.2.3 From 46fce62e66fd5cdc762c869d4030420c47f98cb8 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 16:08:28 +1200 Subject: Update vim-equalalways-resized to v0.2.0 --- vim/bundle/equalalways_resized | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/equalalways_resized b/vim/bundle/equalalways_resized index 9fa2a475..d63f11e1 160000 --- a/vim/bundle/equalalways_resized +++ b/vim/bundle/equalalways_resized @@ -1 +1 @@ -Subproject commit 9fa2a475258563d85a75671329451c18b5ca44df +Subproject commit d63f11e151b1de9924bb96347f422f83d746a532 -- cgit v1.2.3 From 7ccc1c036f1d2e728a9773cafe7aa3c2528f48e3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 17:44:12 +1200 Subject: Update vim-foldlevelstart-stdin to v0.2.0 --- vim/bundle/foldlevelstart_stdin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/foldlevelstart_stdin b/vim/bundle/foldlevelstart_stdin index 5960c5da..040ee022 160000 --- a/vim/bundle/foldlevelstart_stdin +++ b/vim/bundle/foldlevelstart_stdin @@ -1 +1 @@ -Subproject commit 5960c5dad48258aa14c623fc6572f867585d1c14 +Subproject commit 040ee022c80ba3d5745e27dacd898156310e77c8 -- cgit v1.2.3 From 2e9758ffc044ec8c488871699be6bfc4433adf12 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 9 May 2019 17:48:38 +1200 Subject: Update vim-insert-cancel to v3.3.0 --- vim/bundle/insert_cancel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/insert_cancel b/vim/bundle/insert_cancel index a59e1fd2..0b86ed61 160000 --- a/vim/bundle/insert_cancel +++ b/vim/bundle/insert_cancel @@ -1 +1 @@ -Subproject commit a59e1fd2f8a8bfe0a498fce183e6d954a85fc715 +Subproject commit 0b86ed61400d5935b378f909a81ec3b3f6b41fea -- cgit v1.2.3 From d0578971f69483049db878f5fd00bb4d160b0418 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 10 May 2019 09:52:30 +1200 Subject: Update vim-insert-suspend-hlsearch to v0.7.0 --- vim/bundle/insert_suspend_hlsearch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/insert_suspend_hlsearch b/vim/bundle/insert_suspend_hlsearch index e5f9e3a8..39e9abea 160000 --- a/vim/bundle/insert_suspend_hlsearch +++ b/vim/bundle/insert_suspend_hlsearch @@ -1 +1 @@ -Subproject commit e5f9e3a8985ee0e038324ce493b7b6833e92b9f5 +Subproject commit 39e9abea82f6485cc429f05a03f63c9cabf086c6 -- cgit v1.2.3 From d79a3a642084633326e078ef10e9c8f3535b9503 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 10 May 2019 10:04:45 +1200 Subject: Update vim-juvenile to v0.4.0 --- vim/bundle/juvenile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/bundle/juvenile b/vim/bundle/juvenile index f8dd96db..6ce5b57d 160000 --- a/vim/bundle/juvenile +++ b/vim/bundle/juvenile @@ -1 +1 @@ -Subproject commit f8dd96db090e86875c37136ca0484dd1d10abd92 +Subproject commit 6ce5b57d15a26a42c7c5bbe1e7611485e43e4eb1 -- cgit v1.2.3 From 640de50c3d05eaa34670a40a5dd2f2bc22534266 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 10 May 2019 10:38:50 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index d5e22a6d..9bc38852 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v4.19.0 -Fri May 3 01:38:05 UTC 2019 +tejr dotfiles v4.20.0 +Thu May 9 22:38:50 UTC 2019 -- cgit v1.2.3