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

Re: Why does formatoptions flag "l" keep getting set with .conf files?

Expand Messages
  • risingjoker
    ... Thanks. Nice to know because I have some file configurations in that place and now I need to move them. ...
    Message 1 of 9 , Jul 3 12:24 AM
    • 0 Attachment
      Ben Fritz wrote:
      >
      >
      > On Jul 2, 3:34 pm, risingjoker <risingjo...@...> wrote:
      >> create a directory ~/.vim/after/ftdetect
      >> create a file in that directory named conf.vim
      >> put you set command inside
      >
      > A better place would be in the after/ftplugin directory. I'm pretty
      > certain the formatoptions are being modified in the ftplugin for conf
      > files, NOT the syntax file.

      Thanks. Nice to know because I have some file configurations in that
      place and now I need to move them.


      >
      > The OP mentioned checking the syntax file. You want conf.vim in the
      > ftplugin directory, not the syntax directory.
      > >
      >


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... 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]
      Message 2 of 9 , Jul 5 8:31 PM
      • 0 Attachment
        On 03/07/09 09:24, risingjoker wrote:
        >
        > Ben Fritz wrote:
        >>
        >>
        >> On Jul 2, 3:34 pm, risingjoker<risingjo...@...> wrote:
        >>> create a directory ~/.vim/after/ftdetect
        >>> create a file in that directory named conf.vim
        >>> put you set command inside
        >>
        >> A better place would be in the after/ftplugin directory. I'm pretty
        >> certain the formatoptions are being modified in the ftplugin for conf
        >> files, NOT the syntax file.
        >
        > Thanks. Nice to know because I have some file configurations in that
        > place and now I need to move them.
        >
        >
        >>
        >> The OP mentioned checking the syntax file. You want conf.vim in the
        >> ftplugin directory, not the syntax directory.
        >>>
        >>

        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.

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.