From fb45f7acc15a9d7a9f2e4a256dd82461adb6cfd9 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 15 Sep 2021 20:24:33 +0200 Subject: ftplugin/mail.vim: Add bindings to add and remove the 'a' format option I've been editing email headers in Vim recently (previously I only did that in Mutt's line editor). With automatic formatting, the headers can get messed up due to reflow. Add bindings so we can quickly disable automatic paragraph formatting when we need to. --- ftplugin/mail.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ftplugin') diff --git a/ftplugin/mail.vim b/ftplugin/mail.vim index b42fa34..6d4630e 100644 --- a/ftplugin/mail.vim +++ b/ftplugin/mail.vim @@ -20,3 +20,8 @@ setlocal comments-=mb:* comments+=fb:* " Remove last two empty lines below signature nnoremap e m`Gdk`` + + +" Toggle paragraph auto-formatting +nnoremap [a :setlocal formatoptions-=a +nnoremap ]a :setlocal formatoptions+=a -- cgit v1.2.3