aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-10 10:38:50 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-10 10:38:50 +1200
commited2dfe06b1ad22d09af7fe7efc36555812c24aa5 (patch)
treeffc37ddaaf7ae67f2e7f81acc92f56493020a9b2
parenta06d94ba392578f92e8e18ab709bd4563d5f7c5c (diff)
parent640de50c3d05eaa34670a40a5dd2f2bc22534266 (diff)
downloaddotfiles-ed2dfe06b1ad22d09af7fe7efc36555812c24aa5.tar.gz
Merge branch 'release/v4.20.0'v4.20.0
* release/v4.20.0: Bump VERSION Update vim-juvenile to v0.4.0 Update vim-insert-suspend-hlsearch to v0.7.0 Update vim-insert-cancel to v3.3.0 Update vim-foldlevelstart-stdin to v0.2.0 Update vim-equalalways-resized to v0.2.0 Update vim-digraph-search to v0.2.0 Update vim-diff-prune to v1.3.0 Update vim-cursorline-current to v0.4.0 Update vim-copy-linebreak to v0.7.0 Update vim-colon-operator to v0.4.0 Update vim-cmdwin-ctrlc to v0.3.0 Update vim-big-file-options to v1.1.0 Remove unnecessary l: prefixes to Vim variables Remove unnecessary g: prefixes to Vim variables Remap g& to preserve substitution flags Bind \S in Vim to run :scriptnames
-rw-r--r--VERSION4
-rw-r--r--vim/after/ftplugin/diff.vim2
-rw-r--r--vim/after/ftplugin/gitcommit.vim2
-rw-r--r--vim/after/ftplugin/help.vim2
-rw-r--r--vim/after/ftplugin/html.vim2
-rw-r--r--vim/after/ftplugin/mail.vim4
-rw-r--r--vim/after/ftplugin/make.vim2
-rw-r--r--vim/after/ftplugin/markdown.vim2
-rw-r--r--vim/after/ftplugin/perl.vim2
-rw-r--r--vim/after/ftplugin/php.vim2
-rw-r--r--vim/after/ftplugin/sh.vim4
-rw-r--r--vim/after/ftplugin/vim.vim4
-rw-r--r--vim/after/indent/html.vim2
-rw-r--r--vim/after/plugin/dist.vim16
-rw-r--r--vim/after/syntax/readline.vim2
-rw-r--r--vim/after/syntax/sh.vim4
-rw-r--r--vim/autoload/diff.vim18
-rw-r--r--vim/autoload/filetype.vim34
-rw-r--r--vim/autoload/gitcommit.vim10
-rw-r--r--vim/autoload/html.vim20
-rw-r--r--vim/autoload/mail.vim38
-rw-r--r--vim/autoload/perl.vim30
-rw-r--r--vim/autoload/quote.vim16
-rw-r--r--vim/autoload/vimrc.vim4
m---------vim/bundle/big_file_options0
m---------vim/bundle/cmdwin_ctrlc0
m---------vim/bundle/colon_operator0
m---------vim/bundle/copy_linebreak0
m---------vim/bundle/cursorline_current0
m---------vim/bundle/diff_prune0
m---------vim/bundle/digraph_search0
m---------vim/bundle/equalalways_resized0
m---------vim/bundle/foldlevelstart_stdin0
m---------vim/bundle/insert_cancel0
m---------vim/bundle/insert_suspend_hlsearch0
m---------vim/bundle/juvenile0
-rw-r--r--vim/compiler/bash.vim4
-rw-r--r--vim/compiler/ksh.vim4
-rw-r--r--vim/compiler/perlcritic.vim4
-rw-r--r--vim/compiler/php.vim4
-rw-r--r--vim/compiler/sh.vim4
-rw-r--r--vim/compiler/shellcheck.vim4
-rw-r--r--vim/compiler/vint.vim4
-rw-r--r--vim/compiler/zsh.vim4
-rw-r--r--vim/filetype.vim4
-rw-r--r--vim/ftplugin/textarea.vim2
-rw-r--r--vim/indent/html.vim2
-rw-r--r--vim/plugin/dist.vim16
-rw-r--r--vim/plugin/wildignore.vim48
-rw-r--r--vim/syntax/readline.vim2
-rw-r--r--vim/vimrc6
51 files changed, 171 insertions, 167 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
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 =
\ '\<fu\%[nction]\>:\<endf\%[unction]\>,' .
\ '\<\(wh\%[ile]\|for\)\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
@@ -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-=<>>,<Return>
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/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('<afile>')
+ let fn = expand('<afile>')
" 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('<afile>:r')
+ let fn = expand('<afile>: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('<afile>')
+ let fn = expand('<afile>')
" myfileXXQGS16A.conf: strip eight chars before final period
- if l:fn =~# '/[^./]\+\w\{8}\.[^./]\+$'
- let l:fr = expand('<afile>:r')
- let l:fe = expand('<afile>:e')
- let l:fn = strpart(l:fr, -8, strlen(l:fr)) . '.' . l:fe
+ if fn =~# '/[^./]\+\w\{8}\.[^./]\+$'
+ let fr = expand('<afile>:r')
+ let fe = expand('<afile>:e')
+ let fn = strpart(fr, -8, strlen(fr)) . '.' . fe
" myfile.XXQGS16A: strip extension
- elseif l:fn =~# '/[^./]\+\.\w\{8}$'
- let l:fn = expand('<afile>:r')
+ elseif fn =~# '/[^./]\+\.\w\{8}$'
+ let fn = expand('<afile>: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*<em>Last updated: .\+</em>$', '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.*',
- \ '<em>Last updated: '.l:date.'</em>', ''))
+ let li = search('\C^\s*<em>Last updated: .\+</em>$', 'n')
+ if li
+ let date = substitute(system('date -u'), '\C\n$', '', '')
+ let line = getline(li)
+ call setline(li, substitute(line, '\C\S.*',
+ \ '<em>Last updated: '.date.'</em>', ''))
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/bundle/big_file_options b/vim/bundle/big_file_options
-Subproject 10e23336ae2fb213f44affc8c8b37b0d9bc2305
+Subproject 0cfc0f7ca6371539f1d81874137e61e3faf70a7
diff --git a/vim/bundle/cmdwin_ctrlc b/vim/bundle/cmdwin_ctrlc
-Subproject e3b155d0a2281a96f479a4f665fd4ee5bf59dab
+Subproject 5a547325bc70c09f562f783448276a6562eb921
diff --git a/vim/bundle/colon_operator b/vim/bundle/colon_operator
-Subproject f966411229eae27333166a2e13ff868f1bf2b70
+Subproject 8238405d96e500be5c2eedfa638e94e58cc56ac
diff --git a/vim/bundle/copy_linebreak b/vim/bundle/copy_linebreak
-Subproject 4d189176359f23318cb46386d4140cd7fc62912
+Subproject 98eb34d4ef603039cd9d5a50e3c4f12fcb943fc
diff --git a/vim/bundle/cursorline_current b/vim/bundle/cursorline_current
-Subproject b48b57b35899796bfbea9a3aab8c584d8eaebfd
+Subproject 90ffeabc80c0f27748213d30952ad00a8e57b09
diff --git a/vim/bundle/diff_prune b/vim/bundle/diff_prune
-Subproject 389f2da8759cbbcf275798fb1e8c93114fa2dc0
+Subproject a1f9f164aa81742a66fc20806d7f080bdf7770d
diff --git a/vim/bundle/digraph_search b/vim/bundle/digraph_search
-Subproject e330a6befc506f6cdd33148fbf01b802ea7ffef
+Subproject 6a03a3885c0483d5cf6ef05613e509986822a20
diff --git a/vim/bundle/equalalways_resized b/vim/bundle/equalalways_resized
-Subproject 9fa2a475258563d85a75671329451c18b5ca44d
+Subproject d63f11e151b1de9924bb96347f422f83d746a53
diff --git a/vim/bundle/foldlevelstart_stdin b/vim/bundle/foldlevelstart_stdin
-Subproject 5960c5dad48258aa14c623fc6572f867585d1c1
+Subproject 040ee022c80ba3d5745e27dacd898156310e77c
diff --git a/vim/bundle/insert_cancel b/vim/bundle/insert_cancel
-Subproject a59e1fd2f8a8bfe0a498fce183e6d954a85fc71
+Subproject 0b86ed61400d5935b378f909a81ec3b3f6b41fe
diff --git a/vim/bundle/insert_suspend_hlsearch b/vim/bundle/insert_suspend_hlsearch
-Subproject e5f9e3a8985ee0e038324ce493b7b6833e92b9f
+Subproject 39e9abea82f6485cc429f05a03f63c9cabf086c
diff --git a/vim/bundle/juvenile b/vim/bundle/juvenile
-Subproject f8dd96db090e86875c37136ca0484dd1d10abd9
+Subproject 6ce5b57d15a26a42c7c5bbe1e7611485e43e4eb
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 <args>
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 <args>
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 <args>
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 <args>
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 <args>
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 <args>
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 <args>
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 <args>
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 <p> 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..36a8f492 100644
--- a/vim/plugin/wildignore.vim
+++ b/vim/plugin/wildignore.vim
@@ -4,19 +4,19 @@
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
" 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
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
diff --git a/vim/vimrc b/vim/vimrc
index d3a814f2..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 <Space> <Plug>(ScrollNext)
endif
-" Remap normal/visual & to preserve substitution flags
+" Remap normal/visual & and g& to preserve substitution flags
nnoremap <silent> & :&&<CR>
xnoremap <silent> & :&&<CR>
+nnoremap <silent> g& :<C-U>%&&<CR>
" Map g: as a 'colon operator'
nmap g: <Plug>(ColonOperator)
@@ -348,6 +349,9 @@ nnoremap <Leader>R :<C-U>source $MYVIMRC<CR>
" \s toggles spell checking
nnoremap <Leader>s :<C-U>setlocal spell! spell?<CR>
+" \S shows loaded scripts
+nnoremap <Leader>S :<C-U>scriptnames<CR>
+
" \t shows current filetype
nnoremap <Leader>t :<C-U>setlocal filetype?<CR>
" \T clears filetype