let tmp = substitute(&formatoptions, 't', '', '')
if &formatoptions == tmp
set fo+=t
- :echo "Enable text wrap"
+ :echo ":set fo+=t"
else
set fo-=t
- :echo "Disable text wrap"
+ :echo ":set fo-=t"
endif
endfunction
let tmp = substitute(&formatoptions, 'a', '', '')
if &formatoptions == tmp
set fo+=a
- :echo "Enable auto-wrap paragraphs"
+ :echo ":set fo+=a"
else
set fo-=a
- :echo "Disable auto-wrap paragraphs"
+ :echo ":set fo-=a"
endif
endfunction