diff options
Diffstat (limited to 'vim/after/ftplugin/mail.vim')
-rw-r--r-- | vim/after/ftplugin/mail.vim | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 738f17ec..4c07bac3 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -1,3 +1,13 @@ +" Restore global value for no_mail_maps that we set in +" ~/.vim/ftplugin/mail.vim to work around the bad maps set in +" $VIMRUNTIME/ftplugin/mail.vim +" +if exists('b:no_mail_maps') + let no_mail_maps = b:no_mail_maps +elseif exists('no_mail_maps') + unlet no_mail_maps +endif + " Don't append spaces after quote chars, for strict compliance with " format=flowed let b:quote_space = 0 @@ -8,7 +18,7 @@ command -bar -buffer SuggestStart let b:undo_ftplugin .= '|delcommand SuggestStart' SuggestStart -" Normalise quoting +" Normalize quoting command -bar -buffer -range=% StrictQuote \ call mail#StrictQuote(<q-line1>, <q-line2>) let b:undo_ftplugin .= '|delcommand StrictQuote' @@ -66,9 +76,9 @@ let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>Q' \ . '|xunmap <buffer> <LocalLeader>Q' " Mappings for enforcing strict quoting -nnoremap <LocalLeader>s +nnoremap <buffer> <LocalLeader>s \ :StrictQuote<CR> -xnoremap <LocalLeader>s +xnoremap <buffer> <LocalLeader>s \ :StrictQuote<CR> let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>s' \ . '|xunmap <buffer> <LocalLeader>s' |