aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-09 00:03:10 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-09 00:03:10 +1200
commitacb2ed1390d98516d8d1d5fd7ca83ed4d55af948 (patch)
tree0b2e1b11e12b4090860cf52560f2a2eb457b42dd /vim
parentRemap g& to preserve substitution flags (diff)
downloaddotfiles-acb2ed1390d98516d8d1d5fd7ca83ed4d55af948.tar.gz
dotfiles-acb2ed1390d98516d8d1d5fd7ca83ed4d55af948.zip
Remove unnecessary g: prefixes to Vim variables
Diffstat (limited to 'vim')
-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/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.vim4
-rw-r--r--vim/syntax/readline.vim2
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 =
\ '\<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/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..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