Re: automatically starting line with #
- Gary Johnson <garyjohn@...> wrote:
> On 2003-05-01, Mark Davis <mark@...> wrote:to see where an option has been last set, do
> > 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.
> Gary Johnson | Agilent Technologies
> garyjohn@... | Wireless Division
> | Spokane, Washington, USA
: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).