Discussion:
vim ignores formatoptions
(too old to reply)
Florian Rehnisch
2009-12-10 18:37:05 UTC
Permalink
:set fo=cro
When I edit a file and type :set
formatoptions=croql
If I change ts=4 to ts=8 it changes. I think
that theres a bug in reading the fo / formatoptions
option when vim starts up, but maybe Im wrong.
Id ignore this issue but the autocomment feature is
killing me everytime I work on source files.
I can't help you out, but the Vim fellows hang out in
comp.editors, so let's go over there.
--
flori
Vim-Hilfe auf Deutsch http://www.florianrehnisch.de/vimhelp/
Gary Johnson
2009-12-10 23:30:52 UTC
Permalink
:set fo=cro
When I edit a file and type :set
formatoptions=croql
If I change ts=4 to ts=8 it changes. I think
that theres a bug in reading the fo / formatoptions
option when vim starts up, but maybe Im wrong.
Id ignore this issue but the autocomment feature is
killing me everytime I work on source files.
I'm not clear on exactly what you're observing. I'm also not aware of
anyone reporting a problem with the reading of 'formatoptions' at
startup, or at any other time, so I doubt very much that you've found a
bug in vim.

You say you have

set fo=cro

in your ~/.vimrc file, so it should be true that starting vim without a
file name and executing

:verbose set fo?

displays

formatoptions=cro
Last set from ~/.vimrc

Is that true? Then you say that you edit a file and type

:set formatoptions=croql

so it should be true that again executing

:verbose set fo?

displays

formatoptions=croql

without any "Last set from" line. Is that true? Then you say "it"
changes. I assume you mean the value of 'formatoptions' changes. If
so, to find out what changed it, again execute

:verbose set fo?

and see what it reports.
--
Gary Johnson
Loading...