+" Implement 'coa' -- Toggle formatoption 'a' -- auto-wrap paragraphs
+nnoremap coa :call ToggleFormatOptionA()<CR>
+function! ToggleFormatOptionA()
+ let tmp = substitute(&formatoptions, 'a', '', '')
+ if &formatoptions == tmp
+ set fo+=a
+ :echo "Enable auto-wrap paragraphs"
+ else
+ set fo-=a
+ :echo "Disable auto-wrap paragraphs"
+ endif
+endfunction
+