aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-01-07 09:48:46 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-01-07 09:48:46 +1300
commit5d56356e22b6ac6888051ac000f4542a41bc4ae2 (patch)
tree0bcec57a939388b27acaf1ee42033d6ad6cfecde /vim/after
parentMerge branch 'release/v4.8.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-5d56356e22b6ac6888051ac000f4542a41bc4ae2.tar.gz
dotfiles-5d56356e22b6ac6888051ac000f4542a41bc4ae2.zip
Merge branch 'release/v4.9.0'v4.9.0
* release/v4.9.0: Bump VERSION Return to vi as default visual editor Remove superfluous unmappings for mail filetype Clarify a comment for HTML indentation Add test to 'keywordprg' setting for Vim help Make name of autocmd group more specific Clarify a comment Refactor Vim mail header field shortcuts Explain .bashrc $- 'r' flag problem fully
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftplugin/c.vim2
-rw-r--r--vim/after/ftplugin/gitcommit.vim8
-rw-r--r--vim/after/ftplugin/help.vim9
-rw-r--r--vim/after/ftplugin/html.vim5
-rw-r--r--vim/after/ftplugin/mail.vim7
5 files changed, 14 insertions, 17 deletions
diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim
index ccc5b170..e3eeaede 100644
--- a/vim/after/ftplugin/c.vim
+++ b/vim/after/ftplugin/c.vim
@@ -4,7 +4,7 @@ setlocal complete+=d
" Set include pattern
setlocal include=^\\s*#\\s*include
-" Include headers on UNIX
+" Include system headers on UNIX
if has('unix')
setlocal path+=/usr/include
endif
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim
index 618b9324..465c0e81 100644
--- a/vim/after/ftplugin/gitcommit.vim
+++ b/vim/after/ftplugin/gitcommit.vim
@@ -5,12 +5,12 @@ let b:undo_ftplugin .= '|setlocal comments< formatoptions<'
" Choose the color column depending on non-comment line count
if has('autocmd') && exists('+cursorcolumn')
- augroup gitcommit
+ augroup gitcommit_cursorcolumn
autocmd CursorMoved,CursorMovedI <buffer>
- \ let &l:colorcolumn = gitcommit#CursorColumn()
+ \ let &l:colorcolumn = gitcommit_cursorcolumn#CursorColumn()
augroup END
- let b:undo_ftplugin .= '|execute ''autocmd! gitcommit'''
- \ . '|augroup! gitcommit'
+ let b:undo_ftplugin .= '|execute ''autocmd! gitcommit_cursorcolumn'''
+ \ . '|augroup! gitcommit_cursorcolumn'
\ . '|setlocal colorcolumn<'
endif
diff --git a/vim/after/ftplugin/help.vim b/vim/after/ftplugin/help.vim
index a0b637aa..a72dac8e 100644
--- a/vim/after/ftplugin/help.vim
+++ b/vim/after/ftplugin/help.vim
@@ -11,9 +11,12 @@ if has('conceal') && &modifiable && !&readonly
let b:undo_ftplugin .= '|setlocal conceallevel<'
endif
-" Use :help for 'keywordprg'; odd that this isn't the default
-setlocal keywordprg=:help
-let b:undo_ftplugin .= '|setlocal keywordprg<'
+" Use :help as 'keywordprg' if not already set; this is the default since Vim
+" v8.1.0690
+if &keywordprg !=# ':help'
+ setlocal keywordprg=:help
+ let b:undo_ftplugin .= '|setlocal keywordprg<'
+endif
" Stop here if the user doesn't want ftplugin mappings
if exists('g:no_plugin_maps') || exists('g:no_help_maps')
diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim
index c4f2e35e..0dff879f 100644
--- a/vim/after/ftplugin/html.vim
+++ b/vim/after/ftplugin/html.vim
@@ -9,8 +9,9 @@ let b:undo_ftplugin .= '|unlet b:current_compiler'
\ . '|setlocal errorformat< makeprg<'
" tidy(1) copes fine with formatting an entire document, but not just part of
-" it; we map \= to do the former, but don't actually set 'equalprg', falling
-" back on the good-enough built-in Vim indentation behavior.
+" it; we map \= to do the former, but don't actually set 'equalprg' for the
+" latter, instead falling back on the good-enough built-in Vim indentation
+" behavior
nnoremap <buffer> <Leader>= :<C-U>call html#TidyBuffer()<CR>
let b:undo_ftplugin .= '|nunmap <buffer> <Leader>='
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index ffaa6709..898fd6a8 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -36,13 +36,6 @@ if exists('g:no_plugin_maps') || exists('g:no_mail_maps')
finish
endif
-" Clear away the quoting maps that the stock mail.vim sets; they work fine,
-" but we have nicer ones to define shortly
-nunmap <buffer> <LocalLeader>q
-vunmap <buffer> <LocalLeader>q
-nunmap <buffer> <Plug>MailQuote
-vunmap <buffer> <Plug>MailQuote
-
" Flag messages as important/unimportant
nnoremap <buffer> <LocalLeader>h
\ :<C-U>call mail#FlagImportant()<CR>