X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/de6b92abb3ee6da5078dec1aaff33ae87c2626fb..f6a37702c06a10ba38716758438e67e4a371cda2:/vim/vimrc 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