From f6a37702c06a10ba38716758438e67e4a371cda2 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Thu, 27 Aug 2015 01:45:56 +0100 Subject: [PATCH] vim: toggle formatoptions=a --- vim/vimrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index 717cfe0..2cbf3b6 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -461,6 +461,11 @@ for idt in range(1,8) exe 'nnoremap co'.idt.' :set tabstop='.idt.' shiftwidth='.idt.' softtabstop='.idt.'' endfor +" toggle auto format of text +nnoremap coa :set =&formatoptions =~ "a" ? 'formatoptions-=a' : 'formatoptions+=a' +nnoremap [oa :set formatoptions+=a +nnoremap ]oa :set formatoptions-=a + " space will toggle current fold in normal mode nnoremap za " create folds around visual selection -- 2.48.1