aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
-rw-r--r--vim/after/ftplugin/html.vim2
-rw-r--r--vim/after/ftplugin/mail.vim2
-rw-r--r--vim/after/ftplugin/vim.vim6
-rw-r--r--vim/after/syntax/sh.vim12
-rw-r--r--vim/after/syntax/vim.vim2
-rw-r--r--vim/autoload/diff.vim2
-rw-r--r--vim/autoload/filetype/repeat.vim2
-rw-r--r--vim/autoload/mail.vim4
-rw-r--r--vim/autoload/mail/header/field.vim2
-rw-r--r--vim/autoload/quote.vim4
m---------vim/bundle/spellfile_local0
m---------vim/bundle/squeeze_repeat_blanks0
-rw-r--r--vim/filetype.vim8
-rw-r--r--vim/ftplugin/csv.vim2
-rw-r--r--vim/ftplugin/markdown.vim2
-rw-r--r--vim/plugin/2html.vim6
-rw-r--r--vim/plugin/fortune.vim4
-rw-r--r--vim/vimrc14
18 files changed, 45 insertions, 29 deletions
diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim
index 7e2ba439..21a84a42 100644
--- a/vim/after/ftplugin/html.vim
+++ b/vim/after/ftplugin/html.vim
@@ -4,7 +4,7 @@ if &filetype !=# 'html'
finish
endif
-" Spellcheck documents we're actually editing (not just viewing)
+" Check the spelling of documents we're actually editing (not just viewing)
if &modifiable && !&readonly
setlocal spell
let b:undo_ftplugin .= '|setlocal spell<'
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 738f17ec..ed52edf0 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -8,7 +8,7 @@ command -bar -buffer SuggestStart
let b:undo_ftplugin .= '|delcommand SuggestStart'
SuggestStart
-" Normalise quoting
+" Normalize quoting
command -bar -buffer -range=% StrictQuote
\ call mail#StrictQuote(<q-line1>, <q-line2>)
let b:undo_ftplugin .= '|delcommand StrictQuote'
diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim
index 01f971b9..112523da 100644
--- a/vim/after/ftplugin/vim.vim
+++ b/vim/after/ftplugin/vim.vim
@@ -26,9 +26,9 @@ let &l:include = '\<source\>\|\<runtime!\=\>'
" Search runtime paths for included scripts
let &l:path = &runtimepath . ',' . &path
-" 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
+" Adjust the match words for the matchit.vim plugin; the default filetype
+" plugin matches e.g. an opening "function" with the first "return" within,
+" which I don't like
if exists('loaded_matchit')
let b:match_words = '\<fu\%[nction]\>:\<endf\%[unction]\>,'
\ . '\<\(wh\%[ile]\|for\)\>:\<end\(w\%[hile]\|fo\%[r]\)\>,'
diff --git a/vim/after/syntax/sh.vim b/vim/after/syntax/sh.vim
index af7670d5..d7cf040d 100644
--- a/vim/after/syntax/sh.vim
+++ b/vim/after/syntax/sh.vim
@@ -16,11 +16,11 @@ elseif exists('b:is_posix')
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.
+" error, which it isn't, at least in POSIX sh, Bash, and Korn shell.
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
+" The syntax highlighter doesn't match parentheses 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
@@ -33,7 +33,7 @@ syntax clear shTestError
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
+ " commands in dash, as a rough but usable 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
@@ -76,8 +76,8 @@ if exists('b:is_posix')
" 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.
+ " (and plain Bourne). These are selected by searching the POSIX man pages.
+ " I added NLSPATH too, which wasn't in the original.
syntax clear shShellVariables
syntax cluster shCommandSubList add=shShellVariables
syntax keyword shShellVariables
diff --git a/vim/after/syntax/vim.vim b/vim/after/syntax/vim.vim
index 438ce596..bd7d8274 100644
--- a/vim/after/syntax/vim.vim
+++ b/vim/after/syntax/vim.vim
@@ -4,7 +4,7 @@ syntax clear vimCommentString
syntax clear vimCommentTitle
" Highlight :CompilerSet commands like :set/:setlocal, but only in compiler
-" scripts in recognisable paths
+" scripts in recognizable paths
if expand('%:p:h:t') ==# 'compiler'
\ && expand('%:e') ==# 'vim'
syntax keyword vimCommand contained
diff --git a/vim/autoload/diff.vim b/vim/autoload/diff.vim
index 29389b95..6e87b62a 100644
--- a/vim/autoload/diff.vim
+++ b/vim/autoload/diff.vim
@@ -1,7 +1,7 @@
" Move between diff block headers
function! diff#MoveBlock(count, up, visual) abort
- " Reselect visual selection
+ " Re-select visual selection
if a:visual
normal! gv
endif
diff --git a/vim/autoload/filetype/repeat.vim b/vim/autoload/filetype/repeat.vim
index f681932b..899bbcc4 100644
--- a/vim/autoload/filetype/repeat.vim
+++ b/vim/autoload/filetype/repeat.vim
@@ -53,7 +53,7 @@ function! filetype#repeat#Sudo() abort
elseif fn =~# '/[^/]\+\.\w\{8}$'
let fn = expand('<afile>:r')
- " Unrecognised pattern; return, don't repeat
+ " Unrecognized pattern; return, don't repeat
else
return
endif
diff --git a/vim/autoload/mail.vim b/vim/autoload/mail.vim
index cd585af4..6d4874ca 100644
--- a/vim/autoload/mail.vim
+++ b/vim/autoload/mail.vim
@@ -1,7 +1,7 @@
" Move through quoted paragraphs like normal-mode `{` and `}`
function! mail#NewBlank(count, up, visual) abort
- " Reselect visual selection
+ " Re-select visual selection
if a:visual
normal! gv
endif
@@ -61,7 +61,7 @@ function! mail#StrictQuote(start, end) abort
continue
endif
- " Normalise the quote with no spaces
+ " Normalize the quote with no spaces
let quote = substitute(quote, '[^>]', '', 'g')
" Re-set the line
diff --git a/vim/autoload/mail/header/field.vim b/vim/autoload/mail/header/field.vim
index e27d13c0..db38c09f 100644
--- a/vim/autoload/mail/header/field.vim
+++ b/vim/autoload/mail/header/field.vim
@@ -9,7 +9,7 @@ function! mail#header#field#Add(header, name, body) abort
endfunction
" Set a field in a header, replacing the first one with the same name (if
-" any), and and removing any others
+" any), and removing any others
"
function! mail#header#field#Set(header, name, body) abort
let fields = []
diff --git a/vim/autoload/quote.vim b/vim/autoload/quote.vim
index 690ba2db..7574ed71 100644
--- a/vim/autoload/quote.vim
+++ b/vim/autoload/quote.vim
@@ -24,8 +24,8 @@ function! quote#QuoteOpfunc(type) abort
continue
endif
- " If configured to do so, add a a space after the quote character, but
- " only if this line isn't already quoted
+ " If configured to do so, add a space after the quote character, but only
+ " if this line isn't already quoted
let new = char
if space && cur[0] != char
let new .= ' '
diff --git a/vim/bundle/spellfile_local b/vim/bundle/spellfile_local
-Subproject 1b42457d9024745c2990583c90dc39c448f11e1
+Subproject cb792a082202bba673ccf0f6f58a8ce2cf44f07
diff --git a/vim/bundle/squeeze_repeat_blanks b/vim/bundle/squeeze_repeat_blanks
-Subproject 8c849183f8723086e6b61a0644292bdb1ad99c1
+Subproject d80bc3733cf19eb72111171bee269306222d67b
diff --git a/vim/filetype.vim b/vim/filetype.vim
index 137d1cf5..e1bdf728 100644
--- a/vim/filetype.vim
+++ b/vim/filetype.vim
@@ -395,7 +395,7 @@ augroup filetypedetect
autocmd BufNewFile,BufRead
\ ?*.tsv
\ setfiletype tsv
- " VimL files
+ " Vim script files
autocmd BufNewFile,BufRead
\ ?*.vim
\,.exrc
@@ -416,7 +416,7 @@ augroup filetypedetect
\ .wgetrc
\,wgetrc
\ setfiletype wget
- " Add automatic commands to find Xresources subfiles
+ " Add automatic commands to find .Xresources subfiles
autocmd BufNewFile,BufRead
\ .Xresources
\,*/.Xresources.d/*
@@ -455,8 +455,8 @@ 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.
+ " If it's a new file in a bin, libexec, or scripts subdirectory that has
+ " a Makefile.PL sibling, and I'm editing it, it's almost definitely Perl.
autocmd BufNewFile
\ ?*/bin/?*
\,?*/libexec/?*
diff --git a/vim/ftplugin/csv.vim b/vim/ftplugin/csv.vim
index 9bd3e86e..68378d62 100644
--- a/vim/ftplugin/csv.vim
+++ b/vim/ftplugin/csv.vim
@@ -4,6 +4,6 @@ if exists('b:did_ftplugin')
endif
let b:did_ftplugin = 1
-" No autoformatting
+" No automatic formatting
setlocal formatoptions=
let b:undo_ftplugin = 'formatoptions<'
diff --git a/vim/ftplugin/markdown.vim b/vim/ftplugin/markdown.vim
index 3f41cf8d..ddd88e2c 100644
--- a/vim/ftplugin/markdown.vim
+++ b/vim/ftplugin/markdown.vim
@@ -56,7 +56,7 @@ xnoremap <buffer> <expr> <LocalLeader>Q
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>Q'
\ . '|xunmap <buffer> <LocalLeader>Q'
-" Autoformat headings
+" Automatically format headings
command -buffer -nargs=1 MarkdownHeading
\ call markdown#Heading(<f-args>)
nnoremap <buffer> <LocalLeader>=
diff --git a/vim/plugin/2html.vim b/vim/plugin/2html.vim
index 95dcbb6c..51d377e3 100644
--- a/vim/plugin/2html.vim
+++ b/vim/plugin/2html.vim
@@ -1 +1,5 @@
-let g:html_font = ['DejaVu Sans Mono', 'Ubuntu Mono', 'Consolas']
+let g:html_font = [
+ \ 'DejaVu Sans Mono',
+ \ 'Ubuntu Mono',
+ \ 'Consolas',
+ \]
diff --git a/vim/plugin/fortune.vim b/vim/plugin/fortune.vim
index efc03467..be4abdff 100644
--- a/vim/plugin/fortune.vim
+++ b/vim/plugin/fortune.vim
@@ -1,3 +1,7 @@
+if exists('loaded_fortune') || &compatible
+ finish
+endif
+let loaded_fortune = 1
command! -bar Fortune
\ call fortune#()
nnoremap <silent> <Plug>(Fortune)
diff --git a/vim/vimrc b/vim/vimrc
index 09a31c42..32dbabcd 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -2,7 +2,7 @@
" Tom Ryder (tejr)’s Literate Vimrc
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"
-" Last updated: Sat, 09 May 2020 04:48:24 UTC
+" Last updated: Sat, 09 May 2020 04:57:54 UTC
"
" │ And I was lifted up in heart, and thought
" │ Of all my late-shown prowess in the lists,
@@ -348,8 +348,12 @@ augroup END
" saves restarting Vim or running the :source command manually, which I almost
" always want to do after changing my vimrc file anyway.
"
-autocmd vimrc BufWritePost $MYVIMRC,$MYVIM/vimrc
+autocmd vimrc BufWritePost $MYVIMRC
\ ReloadVimrc
+if $MYVIM !=# ''
+ autocmd vimrc BufWritePost $MYVIM/vimrc
+ \ ReloadVimrc
+endif
" If Vim is new enough (v7.0.187) to support the ##SourceCmd event for
" automatic command hooks, we'll also apply a hook for that event to catch
@@ -361,6 +365,10 @@ autocmd vimrc BufWritePost $MYVIMRC,$MYVIM/vimrc
if exists('##SourceCmd')
autocmd vimrc SourceCmd $MYVIMRC,$MYVIM/vimrc
\ ReloadVimrc
+ if $MYVIM !=# ''
+ autocmd vimrc SourceCmd $MYVIM/vimrc
+ \ ReloadVimrc
+ endif
endif
" For spelling, use New Zealand English by default, but later on we’ll
@@ -943,7 +951,7 @@ autocmd vimrc ColorScheme *
" environment variable COLORFGBG or a response in v:termrbgresp that would set
" it specifically.
"
-if !exists('$COLORFGBG') && get(v:, 'termrbgresp', '') ==# ''
+if !exists('$COLORFGBG') && !get(v:, 'termrbgresp')
set background=dark
endif