On Thursday 02 July 2009 2:28 pm, Jeffery wrote:
> 
> The formatoptions=tcql when I open .conf files.  The "l" is the
> problem.  From the vim online help:
> 
> <screen scrape>
> "l"  Only break a line if it was not longer than 'textwidth' when the
> insert
>      started.
> </screen scrape>
> 
> This is kind of annoying, and I want it to stop.  I verified it does
> this on .conf files but not on .sh files, for example.
> 
> The default formatoptions=tcq (from vim online help), and using
> the :set command seems to confirm this.
> 
> 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.
> 
> <screen scrape>
> " Vim syntax file
> " Language:     generic configure file
> " Maintainer:   Bram Moolenaar <[email protected]>
> " Last Change:  2005 Jun 20
> 
> " Quit when a (custom) syntax file was already loaded
> if exists("b:current_syntax")
>   finish
> endif
> 
> syn keyword     confTodo        contained TODO FIXME XXX
> " Avoid matching "text#text", used in /etc/disktab and /etc/gettytab
> syn match       confComment     "^#.*" contains=confTodo
> syn match       confComment     "\s#.*"ms=s+1 contains=confTodo
> syn region      confString      start=+"+ skip=+\\\\\|\\"+ end=+"+
> oneline
> syn region      confString      start=+'+ skip=+\\\\\|\\'+ end=+'+
> oneline
> 
> " Define the default highlighting.
> " Only used when an item doesn't have highlighting yet
> hi def link confComment Comment
> hi def link confTodo    Todo
> hi def link confString  String
> 
> let b:current_syntax = "conf"
> 
> " vim: ts=8 sw=2
> </screen scrape>

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


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to