aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-14 20:52:49 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-14 20:52:49 +1200
commit720b6971850e636912737fe9bcb72fb0d566f344 (patch)
tree4311fd0fbb3a936021de33172804e16bd72816ef /vim/after/ftplugin
parentMerge branch 'release/v1.29.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-3cf6d30492cf9bf3f91040b64b09c0ecb33df329.tar.gz (sig)
dotfiles-3cf6d30492cf9bf3f91040b64b09c0ecb33df329.zip
Merge branch 'release/v1.30.0'v1.30.0
* release/v1.30.0: Bump VERSION Revert "Remove :nohlsearch from vimrc" Spin off vimrc_reload_filetype.vim Add mail quote maps for gitcommit and markdown Expand and comment quoting functions Change mail quoting to generic autoload function Remove bell settings from .gvimrc
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/gitcommit.vim13
-rw-r--r--vim/after/ftplugin/mail.vim6
-rw-r--r--vim/after/ftplugin/markdown.vim13
3 files changed, 29 insertions, 3 deletions
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim
index 8e365d98..4f57a407 100644
--- a/vim/after/ftplugin/gitcommit.vim
+++ b/vim/after/ftplugin/gitcommit.vim
@@ -7,3 +7,16 @@ endif
setlocal comments+=n:>
setlocal formatoptions+=coqr
let b:undo_ftplugin .= '|setlocal comments< formatoptions<'
+
+" Stop here if the user doesn't want ftplugin mappings
+if exists('g:no_plugin_maps') || exists('g:no_gitcommit_maps')
+ finish
+endif
+
+" Mail quote mappings
+nnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
+nnoremap <buffer> <expr> <LocalLeader>qq quote#Quote().'_'
+xnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
+let b:undo_ftplugin .= '|nunmap <LocalLeader>q'
+ \ . '|nunmap <LocalLeader>qq'
+ \ . '|xunmap <LocalLeader>q'
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index d22ec142..0867311a 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -21,9 +21,9 @@ endif
" The quote mapping in the stock plugin is a good idea, but I prefer it to
" work as a motion rather than quoting to the end of the buffer
-nnoremap <buffer> <expr> <LocalLeader>q mail#Quote()
-nnoremap <buffer> <expr> <LocalLeader>qq mail#Quote().'_'
-xnoremap <buffer> <expr> <LocalLeader>q mail#Quote()
+nnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
+nnoremap <buffer> <expr> <LocalLeader>qq quote#Quote().'_'
+xnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
let b:undo_ftplugin .= '|nunmap <LocalLeader>q'
\ . '|nunmap <LocalLeader>qq'
\ . '|xunmap <LocalLeader>q'
diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim
index 63f3f062..26b42849 100644
--- a/vim/after/ftplugin/markdown.vim
+++ b/vim/after/ftplugin/markdown.vim
@@ -20,3 +20,16 @@ if has('spell')
endif
endif
+
+" Stop here if the user doesn't want ftplugin mappings
+if exists('g:no_plugin_maps') || exists('g:no_markdown_maps')
+ finish
+endif
+
+" Mail quote mappings
+nnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
+nnoremap <buffer> <expr> <LocalLeader>qq quote#Quote().'_'
+xnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
+let b:undo_ftplugin .= '|nunmap <LocalLeader>q'
+ \ . '|nunmap <LocalLeader>qq'
+ \ . '|xunmap <LocalLeader>q'