a suggestion and a question -- first the suggestion:
try :verbose set fo?
and see if it can tell you where the errant fo is being set
and the question: i see you are using an older vim, which implies
you are also using an older netrw -- in older netrws there was a
problem with it altering formatoptions for buffers in the same
session -- did you in fact use netrw to find and open your conf
file?
sc
no, i was referring to the netrw.vim in your runtime/plugin
directory which you might use with :Explore or :e .
if you're not using it forget the warning and focus on scripts.vim
if you didn't know about :verbose, maybe you didn't also know about
the :scriptnames command, which will list all scripts invoked for
the current buffer -- also can be useful in debugging
anyway, glad to help -- vim on!
sc
> I tried adding the line "set formatoptions-=l" to my .vimrc, but it
> did not work.
>
> Here is the entirety of conf.vim. I do not see where is might be
> messing with the formatoptions flags. At this point, I'm mystified
> enough to post this query here.
create a directory ~/.vim/after/ftdetect
create a file in that directory named conf.vim
put you set command inside
In fact, most/all of the ftplugin files in vim72/ftplugin change the
formatoptions variable
either to croql or add those options in (ie. set fo+=croql). Some
subtract the "t" option.
Several of the vim72/indent files do, too. So if you have the following
in your .vimrc:
filetype plugin indent on
then it'll likely change your formatoptions on you. In particular,
vim72/ftplugin/conf.vim has
setlocal comments=:# commentstring=#\ %s formatoptions-=t
formatoptions+=croql
The only syntax file I found (by a few searches, so there may be more)
that changes the
formatoptions setting is vim72/syntax/lpc.vim .
Regards,
Chip Campbell
The ftdetect directory is meant to contain scripts to be sourced by
filetype.vim, i.e., usually once per session when you do ":filetype
[plugin] [indent] on", to set up BufReadPost,BufNewFile autocommands for
filetype-detection. You could put those same autocommands in
~/.vim/filetype.vim but the idea of separate scripts is to make them
easier to drop when distributing a series of scripts to support a new
filetype (let's say "foobar") by means of, let's say, a
filetype-detection script ~/.vim/ftdetect/foobar.vim, a filetype-plugin
~/.vim/ftplugin/foobar.vim, a syntax plugin ~/.vim/syntax/foobar.vim, an
indent plugin ~/.vim/indent/foobar.vim, and a helpfile
~/.vim/doc/pi-foobar.txt, maybe all packed together as a compressed
vimball in .vba.gz format.
Best regards,
Tony.
--
If God had wanted you to go around nude, He would have given you bigger
hands.