Loading ...
Sorry, an error occurred while loading the content.

Re: automatically starting line with #

Expand Messages
  • Antoine J. Mechelynck
    ... to see where an option has been last set, do ... i.e., in this case, ... This should return the current value, and also (unless it was set from the
    Message 1 of 6 , May 1 2:55 PM
    • 0 Attachment
      Gary Johnson <garyjohn@...> wrote:
      > On 2003-05-01, Mark Davis <mark@...> wrote:
      > > I have two installations of vim, both are version 6.1. When using
      > > one of them, if I start a line with '#', and then type enough
      > > characters that the line wraps around, the '#' (and a space) gets
      > > added automatically at the beginning of subsequent lines. On the
      > > other, this doesn't happen. I assume this is just an option one
      > > can set, but I can't find anything about this on the FAQ.
      >
      > The option you are looking for is 'formatoptions' and the particular
      > flag giving you problems is 'c'. See
      >
      > :help formatoptions
      > :help fo-table
      >
      > > I'm using vim on Windows XP Home; one version is the standard
      > > download from the site; the other came wrapped with an installation
      > > of Cygwin. It's the latter that automatically adds the '#'.
      >
      > This is odd, because the default value of 'formatoptions' is "tcq",
      > so I would expect the "standard download" to use that default.
      > Maybe it's being changed by a filetype plugin.
      >
      > HTH,
      > Gary
      >
      > --
      > Gary Johnson | Agilent Technologies
      > garyjohn@... | Wireless Division
      > | Spokane, Washington, USA

      to see where an option has been last set, do

      :verbose set optionname?

      i.e., in this case,

      :verbose set formatoptions?

      This should return the current value, and also (unless it was set from the
      keyboard) something like "Set from /path/to/file.vim" or "Set from modeline"
      (see :help modeline if you get the latter, to see what it means).

      HTH,
      Tony.
    Your message has been successfully submitted and would be delivered to recipients shortly.