From 8cdc24af7ce746ac20baba406864adc540481352 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 16 Jul 2018 10:23:48 +1200 Subject: Make a filetype.vim comment consistent --- vim/filetype.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3 From e16a825feaad2bf23b98e33409185ad280c56cc3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 16 Jul 2018 10:26:20 +1200 Subject: Reformat comment in wildignore.vim --- vim/plugin/wildignore.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- cgit v1.2.3 From 5a88a073fb2a1efeef8363b878f5582b3bd9997a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 16 Jul 2018 13:24:30 +1200 Subject: Don't default (InsertCancel) This causes problems on vimrc reload. --- vim/vimrc | 2 -- 1 file changed, 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index a3bc5f0d..c8e219f1 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -170,8 +170,6 @@ nnoremap :nohlsearch vnoremap :nohlsearchgv " Remap insert Ctrl-C to undo the escaped insert operation -" Default to not-quite-correct vim-tiny-compatible map if no plugin -inoremap (InsertCancel) u imap (InsertCancel) " Map double Ctrl-K in insert mode to search digraph names -- cgit v1.2.3 From 009b0efd84118d4ce3ffcf2fdc400477326f4f30 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 16 Jul 2018 13:46:10 +1200 Subject: Add reformatting analogue to quote mappings --- vim/after/ftplugin/gitcommit.vim | 6 ++++++ vim/after/ftplugin/mail.vim | 6 ++++++ vim/after/ftplugin/markdown.vim | 6 ++++++ vim/autoload/quote.vim | 12 ++++++++++++ 4 files changed, 30 insertions(+) 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 q quote#Quote() nnoremap qq quote#Quote().'_' xnoremap q quote#Quote() +nnoremap Q quote#QuoteReformat() +nnoremap QQ quote#QuoteReformat().'_' +xnoremap Q quote#QuoteReformat() let b:undo_ftplugin .= '|nunmap q' \ . '|nunmap qq' \ . '|xunmap q' + \ . '|nunmap Q' + \ . '|nunmap QQ' + \ . '|xunmap Q' diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 3e3a08c5..4d2f0a17 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -24,6 +24,12 @@ endif nnoremap q quote#Quote() nnoremap qq quote#Quote().'_' xnoremap q quote#Quote() +nnoremap Q quote#QuoteReformat() +nnoremap QQ quote#QuoteReformat().'_' +xnoremap Q quote#QuoteReformat() let b:undo_ftplugin .= '|nunmap q' \ . '|nunmap qq' \ . '|xunmap q' + \ . '|nunmap Q' + \ . '|nunmap QQ' + \ . '|xunmap 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 q quote#Quote() nnoremap qq quote#Quote().'_' xnoremap q quote#Quote() +nnoremap Q quote#QuoteReformat() +nnoremap QQ quote#QuoteReformat().'_' +xnoremap Q quote#QuoteReformat() let b:undo_ftplugin .= '|nunmap q' \ . '|nunmap qq' \ . '|xunmap q' + \ . '|nunmap Q' + \ . '|nunmap QQ' + \ . '|xunmap 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 -- cgit v1.2.3 From 0e70a0defd83492bb5f466d1232afd3f69134cbd Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 16 Jul 2018 14:06:19 +1200 Subject: Add \m 'magic' setting to mail headers jump This is because Vim's search() function checks the value of 'magic' to decide how to interpret the pattern. It's crazy to have this option off, but best to be explicit about it anyway. --- vim/after/ftplugin/mail.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 4d2f0a17..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 -- cgit v1.2.3 From 0f17e2b885333c006b78ff5644daa2eceadccdbc Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 16 Jul 2018 14:09:01 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 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 -- cgit v1.2.3