aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-16 14:09:06 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-16 14:09:06 +1200
commit4826ac2858d02df0ebd5f4e25abb4b18805cbfcc (patch)
treea65c2f423cb61bd591af6e1b857a147e23ed0fd1
parentd7491b213b2f0df6da97f2f1c951cb070b9513a5 (diff)
parent0f17e2b885333c006b78ff5644daa2eceadccdbc (diff)
downloaddotfiles-4826ac2858d02df0ebd5f4e25abb4b18805cbfcc.tar.gz
dotfiles-4826ac2858d02df0ebd5f4e25abb4b18805cbfcc.zip
Merge branch 'release/v1.32.0'v1.32.0
* release/v1.32.0: Bump VERSION Add \m 'magic' setting to mail headers jump Add reformatting analogue to quote mappings Don't default <Plug>(InsertCancel) Reformat comment in wildignore.vim Make a filetype.vim comment consistent
-rw-r--r--VERSION4
-rw-r--r--vim/after/ftplugin/gitcommit.vim6
-rw-r--r--vim/after/ftplugin/mail.vim8
-rw-r--r--vim/after/ftplugin/markdown.vim6
-rw-r--r--vim/autoload/quote.vim12
-rw-r--r--vim/filetype.vim2
-rw-r--r--vim/plugin/wildignore.vim6
-rw-r--r--vim/vimrc2
8 files changed, 37 insertions, 9 deletions
diff --git a/VERSION b/VERSION
index d8ffc50c..b3e92d12 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v1.31.0
-Sun Jul 15 21:22:13 UTC 2018
+tejr dotfiles v1.32.0
+Mon Jul 16 02:08:56 UTC 2018
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim
index 7fab5a92..5699188d 100644
--- a/vim/after/ftplugin/gitcommit.vim
+++ b/vim/after/ftplugin/gitcommit.vim
@@ -27,6 +27,12 @@ endif
nnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
nnoremap <buffer> <expr> <LocalLeader>qq quote#Quote().'_'
xnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
+nnoremap <buffer> <expr> <LocalLeader>Q quote#QuoteReformat()
+nnoremap <buffer> <expr> <LocalLeader>QQ quote#QuoteReformat().'_'
+xnoremap <buffer> <expr> <LocalLeader>Q quote#QuoteReformat()
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>q'
\ . '|nunmap <buffer> <LocalLeader>qq'
\ . '|xunmap <buffer> <LocalLeader>q'
+ \ . '|nunmap <buffer> <LocalLeader>Q'
+ \ . '|nunmap <buffer> <LocalLeader>QQ'
+ \ . '|xunmap <buffer> <LocalLeader>Q'
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 3e3a08c5..74261d8c 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -7,7 +7,7 @@ endif
" the first entirely blank line, if something hasn't already moved us from the
" start of the file
if line('.') == 1 && col('.') == 1
- call search('^$', 'c')
+ call search('\m^$', 'c')
endif
" Add a space to the end of wrapped lines for format-flowed mail
@@ -24,6 +24,12 @@ endif
nnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
nnoremap <buffer> <expr> <LocalLeader>qq quote#Quote().'_'
xnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
+nnoremap <buffer> <expr> <LocalLeader>Q quote#QuoteReformat()
+nnoremap <buffer> <expr> <LocalLeader>QQ quote#QuoteReformat().'_'
+xnoremap <buffer> <expr> <LocalLeader>Q quote#QuoteReformat()
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>q'
\ . '|nunmap <buffer> <LocalLeader>qq'
\ . '|xunmap <buffer> <LocalLeader>q'
+ \ . '|nunmap <buffer> <LocalLeader>Q'
+ \ . '|nunmap <buffer> <LocalLeader>QQ'
+ \ . '|xunmap <buffer> <LocalLeader>Q'
diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim
index 38f2a8b9..a5c80ca9 100644
--- a/vim/after/ftplugin/markdown.vim
+++ b/vim/after/ftplugin/markdown.vim
@@ -30,6 +30,12 @@ endif
nnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
nnoremap <buffer> <expr> <LocalLeader>qq quote#Quote().'_'
xnoremap <buffer> <expr> <LocalLeader>q quote#Quote()
+nnoremap <buffer> <expr> <LocalLeader>Q quote#QuoteReformat()
+nnoremap <buffer> <expr> <LocalLeader>QQ quote#QuoteReformat().'_'
+xnoremap <buffer> <expr> <LocalLeader>Q quote#QuoteReformat()
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>q'
\ . '|nunmap <buffer> <LocalLeader>qq'
\ . '|xunmap <buffer> <LocalLeader>q'
+ \ . '|nunmap <buffer> <LocalLeader>Q'
+ \ . '|nunmap <buffer> <LocalLeader>QQ'
+ \ . '|xunmap <buffer> <LocalLeader>Q'
diff --git a/vim/autoload/quote.vim b/vim/autoload/quote.vim
index 6e943091..26e95698 100644
--- a/vim/autoload/quote.vim
+++ b/vim/autoload/quote.vim
@@ -28,3 +28,15 @@ function! quote#QuoteOpfunc(type) abort
endfor
endfunction
+
+" Tack on reformatting the edited text afterwards
+function! quote#QuoteReformat() abort
+ set operatorfunc=quote#QuoteReformatOpfunc
+ return 'g@'
+endfunction
+
+" Wrapper operator function to reformat quoted text afterwards
+function! quote#QuoteReformatOpfunc(type) abort
+ call quote#QuoteOpfunc(a:type)
+ normal! '[gq']
+endfunction
diff --git a/vim/filetype.vim b/vim/filetype.vim
index 00e47c0c..0ff4cf76 100644
--- a/vim/filetype.vim
+++ b/vim/filetype.vim
@@ -231,7 +231,7 @@ augroup filetypedetect
\ ?*.markdown
\,?*.md
\ setfiletype markdown
- " Add automatic commands to detect .muttrc files
+ " Mutt configuration files
autocmd BufNewFile,BufRead
\ Muttrc
\,*/.muttrc.d/*.rc
diff --git a/vim/plugin/wildignore.vim b/vim/plugin/wildignore.vim
index fb190bce..b87b62b1 100644
--- a/vim/plugin/wildignore.vim
+++ b/vim/plugin/wildignore.vim
@@ -1,6 +1,6 @@
-" Don't complete certain files that I'm not likely to want to manipulate
-" from within Vim; this is kind of expensive to reload, so I've made it a
-" plugin with a load guard
+" Don't complete certain files that I'm not likely to want to manipulate from
+" within Vim; this is kind of expensive to reload, so I've made it a plugin
+" with a load guard
if v:version < 700 || !has('wildignore')
finish
endif
diff --git a/vim/vimrc b/vim/vimrc
index a3bc5f0d..c8e219f1 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -170,8 +170,6 @@ nnoremap <silent> <C-L> :<C-U>nohlsearch<CR><C-L>
vnoremap <silent> <C-L> :<C-U>nohlsearch<CR>gv<C-L>
" Remap insert Ctrl-C to undo the escaped insert operation
-" Default to not-quite-correct vim-tiny-compatible map if no plugin
-inoremap <Plug>(InsertCancel) <Esc>u
imap <C-C> <Plug>(InsertCancel)
" Map double Ctrl-K in insert mode to search digraph names