aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-04 15:08:51 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-04 15:08:51 +1300
commit1b8d301ffb3b30addadd7ea26f92d6eca4dfdcd8 (patch)
tree181d2520c60bde44e0d4c1245369403722c4042a /vim/after
parentMerge branch 'release/v2.8.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-1b8d301ffb3b30addadd7ea26f92d6eca4dfdcd8.tar.gz
dotfiles-1b8d301ffb3b30addadd7ea26f92d6eca4dfdcd8.zip
Merge branch 'release/v3.0.0'v3.0.0
* release/v3.0.0: Remove b:undo_ftplugin cmds for double-key maps Remove accidentally created html.vim~ file Use "stub .vimrc" method to dodge vim-tiny Use :help for 'keywordprg', junk tag binding Unseat tidy(1) as HTML 'equalprg' Remove line squeezing function for mail.vim
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftplugin/diff.vim1
-rw-r--r--vim/after/ftplugin/gitcommit.vim2
-rw-r--r--vim/after/ftplugin/help.vim13
-rw-r--r--vim/after/ftplugin/html.vim11
-rw-r--r--vim/after/ftplugin/mail.vim2
-rw-r--r--vim/after/ftplugin/markdown.vim2
6 files changed, 16 insertions, 15 deletions
diff --git a/vim/after/ftplugin/diff.vim b/vim/after/ftplugin/diff.vim
index 123f0d0a..5d4ff9ae 100644
--- a/vim/after/ftplugin/diff.vim
+++ b/vim/after/ftplugin/diff.vim
@@ -30,4 +30,3 @@ xmap <buffer> <LocalLeader>p
\ <Plug>(DiffPrune)
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>p'
\ . '|xunmap <buffer> <LocalLeader>p'
- \ . '|nunmap <buffer> <LocalLeader>pp'
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim
index 1a4c1b1b..618b9324 100644
--- a/vim/after/ftplugin/gitcommit.vim
+++ b/vim/after/ftplugin/gitcommit.vim
@@ -25,7 +25,6 @@ nnoremap <buffer> <expr> <LocalLeader>q
xnoremap <buffer> <expr> <LocalLeader>q
\ quote#Quote()
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>q'
- \ . '|nunmap <buffer> <LocalLeader>qq'
\ . '|xunmap <buffer> <LocalLeader>q'
" Quote operator with reformatting
@@ -34,5 +33,4 @@ nnoremap <buffer> <expr> <LocalLeader>Q
xnoremap <buffer> <expr> <LocalLeader>Q
\ quote#QuoteReformat()
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>Q'
- \ . '|nunmap <buffer> <LocalLeader>QQ'
\ . '|xunmap <buffer> <LocalLeader>Q'
diff --git a/vim/after/ftplugin/help.vim b/vim/after/ftplugin/help.vim
index ae032344..a0b637aa 100644
--- a/vim/after/ftplugin/help.vim
+++ b/vim/after/ftplugin/help.vim
@@ -11,13 +11,16 @@ 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<'
+
" Stop here if the user doesn't want ftplugin mappings
if exists('g:no_plugin_maps') || exists('g:no_help_maps')
finish
endif
-" Make K jump to the help topic; NeoVim does this, and it's a damned good idea
-if !has('nvim')
- nnoremap <buffer> K <C-]>
- let b:undo_ftplugin .= '|nunmap <buffer> K'
-endif
+" ,K runs :helpgrep on the word under the cursor
+nnoremap <buffer> <LocalLeader>K
+ \ :<C-U>helpgrep <cword><CR>
+let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>K'
diff --git a/vim/after/ftplugin/html.vim b/vim/after/ftplugin/html.vim
index b5c387fb..5f7155bc 100644
--- a/vim/after/ftplugin/html.vim
+++ b/vim/after/ftplugin/html.vim
@@ -3,11 +3,16 @@ if &filetype !=# 'html'
finish
endif
-" Use tidy(1) for checking and program formatting
+" Use tidy(1) for checking
compiler tidy
-setlocal equalprg=tidy\ -quiet
let b:undo_ftplugin .= '|unlet b:current_compiler'
- \ . '|setlocal equalprg< errorformat< makeprg<'
+ \ . '|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.
+nnoremap <buffer> <Leader>= :<C-U>call html#TidyBuffer()<CR>
+let b:undo_ftplugin .= '|nunmap <buffer> <Leader>='
" Set up hooks for timestamp updating
augroup html_timestamp
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 74ec1699..ffaa6709 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -57,7 +57,6 @@ nnoremap <buffer> <expr> <LocalLeader>q
xnoremap <buffer> <expr> <LocalLeader>q
\ quote#Quote()
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>q'
- \ . '|nunmap <buffer> <LocalLeader>qq'
\ . '|xunmap <buffer> <LocalLeader>q'
" Quote operator with reformatting
@@ -66,7 +65,6 @@ nnoremap <buffer> <expr> <LocalLeader>Q
xnoremap <buffer> <expr> <LocalLeader>Q
\ quote#QuoteReformat()
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>Q'
- \ . '|nunmap <buffer> <LocalLeader>QQ'
\ . '|xunmap <buffer> <LocalLeader>Q'
" Maps using autoloaded function for quoted paragraph movement
diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim
index f129deba..82fbe9da 100644
--- a/vim/after/ftplugin/markdown.vim
+++ b/vim/after/ftplugin/markdown.vim
@@ -27,7 +27,6 @@ nnoremap <buffer> <expr> <LocalLeader>q
xnoremap <buffer> <expr> <LocalLeader>q
\ quote#Quote()
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>q'
- \ . '|nunmap <buffer> <LocalLeader>qq'
\ . '|xunmap <buffer> <LocalLeader>q'
" Quote operator with reformatting
@@ -36,5 +35,4 @@ nnoremap <buffer> <expr> <LocalLeader>Q
xnoremap <buffer> <expr> <LocalLeader>Q
\ quote#QuoteReformat()
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>Q'
- \ . '|nunmap <buffer> <LocalLeader>QQ'
\ . '|xunmap <buffer> <LocalLeader>Q'