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

Re: automatically starting line with #

Expand Messages
  • Herr Christian Wolfgang Hujer
    ... Hash: SHA1 ... Hi mark, try :help formatoptions and :help fo-table to find out more. As you see there, it s the flag insert current comment leader for
    Message 1 of 6 , May 1, 2003
    • 0 Attachment
      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1

      Am Donnerstag, 1. Mai 2003 19:23 schrieb Mark Davis:
      > 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.
      >
      > 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 '#'.

      Hi mark,

      try :help formatoptions and :help fo-table to find out more.
      As you see there, it's the flag "insert current comment leader" for option
      "formatoptions", which can be activated using :set formatoptions+=ro

      I hope this is what you have been looking for.


      Bye
      - --
      ITCQIS GmbH
      Christian Wolfgang Hujer
      Geschäftsführender Gesellschafter
      Telefon: +49 (0)89 27 37 04 37
      Telefax: +49 (0)89 27 37 04 39
      E-Mail: Christian.Hujer@...
      WWW: http://www.itcqis.com/
      -----BEGIN PGP SIGNATURE-----
      Version: GnuPG v1.0.7 (GNU/Linux)

      iD8DBQE+sVwdzu6h7O/MKZkRAnCRAJwPoe4eAvlfXOKDtFB4mtgXc7RIpQCeIjAr
      zmmbmDBI2ovppfrBxuaE8FY=
      =/MIl
      -----END PGP SIGNATURE-----
    • Gary Johnson
      ... The option you are looking for is formatoptions and the particular flag giving you problems is c . See ... This is odd, because the default value of
      Message 2 of 6 , May 1, 2003
      • 0 Attachment
        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
      • 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 3 of 6 , May 1, 2003
        • 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.