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

Re: syntax/modconf.vim

Expand Messages
  • Wichert Akkerman
    ... For Debian systems also add /etc/modutils/** (but make sure you do that after checking for things like sh scripts which can also be in there). Wichert. --
    Message 1 of 9 , Nov 2, 2002
      Previously Nikolai :: lone-star :: Weibull wrote:
      > to match:
      >
      > au BufNewFile,BufRead /etc/modules.conf setf modconf
      > au BufNewFile,BufRead /etc/conf.modules setf modconf

      For Debian systems also add /etc/modutils/** (but make sure you do that
      after checking for things like sh scripts which can also be in there).

      Wichert.

      --
      _________________________________________________________________
      /wichert@... This space intentionally left occupied \
      | wichert@... http://www.wiggy.net/ |
      | 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0 2805 3CB8 9250 2FA3 BC2D |
    • Bram Moolenaar
      ... Using something ending in a * is always a bit dangerous, it might pick up more than expected. Can the pattern be made a bit more specific? What file
      Message 2 of 9 , Nov 3, 2002
        Wichert Akkerman wrote:

        > Previously Nikolai :: lone-star :: Weibull wrote:
        > > to match:
        > >
        > > au BufNewFile,BufRead /etc/modules.conf setf modconf
        > > au BufNewFile,BufRead /etc/conf.modules setf modconf
        >
        > For Debian systems also add /etc/modutils/** (but make sure you do that
        > after checking for things like sh scripts which can also be in there).

        Using something ending in a "*" is always a bit dangerous, it might pick
        up more than expected. Can the pattern be made a bit more specific?
        What file names should it pick up?

        --
        BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow?
        ARTHUR: What do you mean? An African or European swallow?
        BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh!
        BRIDGEKEEPER is cast into the gorge.
        "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
        \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
        \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
      • Wichert Akkerman
        ... The strict rules would be: everything that does not end in .chandev, or is exectuable. Wichert. --
        Message 3 of 9 , Nov 3, 2002
          Previously Bram Moolenaar wrote:
          > Using something ending in a "*" is always a bit dangerous, it might pick
          > up more than expected. Can the pattern be made a bit more specific?
          > What file names should it pick up?

          The strict rules would be: everything that does not end in .chandev,
          or is exectuable.

          Wichert.

          --
          _________________________________________________________________
          /wichert@... This space intentionally left occupied \
          | wichert@... http://www.wiggy.net/ |
          | 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0 2805 3CB8 9250 2FA3 BC2D |
        • Bram Moolenaar
          ... Thus also foo.sh, foo.vim, foo.c, etc.? Sounds a bit unlikely. Please suggest an autocommand that works. -- Any sufficiently advanced technology is
          Message 4 of 9 , Nov 3, 2002
            Wichert Akkerman wrote:

            > Previously Bram Moolenaar wrote:
            > > Using something ending in a "*" is always a bit dangerous, it might pick
            > > up more than expected. Can the pattern be made a bit more specific?
            > > What file names should it pick up?
            >
            > The strict rules would be: everything that does not end in .chandev,
            > or is exectuable.

            Thus also foo.sh, foo.vim, foo.c, etc.? Sounds a bit unlikely. Please
            suggest an autocommand that works.

            --
            Any sufficiently advanced technology is indistinguishable from magic.
            Arthur C. Clarke

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
            \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
            \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
          • Wichert Akkerman
            ... foo.sh would be an executable. But if someone sticks foo.vim in /etc/modutils he/she will have broken his Debian system anyway so I don t see why vim can t
            Message 5 of 9 , Nov 3, 2002
              Previously Bram Moolenaar wrote:
              > Thus also foo.sh, foo.vim, foo.c, etc.? Sounds a bit unlikely. Please
              > suggest an autocommand that works.

              foo.sh would be an executable. But if someone sticks foo.vim in
              /etc/modutils he/she will have broken his Debian system anyway so I
              don't see why vim can't mis-guess here either (might even be a good
              hint that something is wrong).

              Wichert.

              --
              _________________________________________________________________
              /wichert@... This space intentionally left occupied \
              | wichert@... http://www.wiggy.net/ |
              | 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0 2805 3CB8 9250 2FA3 BC2D |
            • Bram Moolenaar
              ... Well, perhaps this autocommand would work then: au BufNewFile,BufRead /etc/modutils/* if executable(expand( )) != 1 | setf modconf | endif Can you
              Message 6 of 9 , Nov 3, 2002
                Wichert Akkerman wrote:

                > Previously Bram Moolenaar wrote:
                > > Thus also foo.sh, foo.vim, foo.c, etc.? Sounds a bit unlikely. Please
                > > suggest an autocommand that works.
                >
                > foo.sh would be an executable. But if someone sticks foo.vim in
                > /etc/modutils he/she will have broken his Debian system anyway so I
                > don't see why vim can't mis-guess here either (might even be a good
                > hint that something is wrong).

                Well, perhaps this autocommand would work then:

                au BufNewFile,BufRead /etc/modutils/* if executable(expand(<afile>)) != 1 | setf modconf | endif

                Can you try this out?

                --
                Kisses may last for as much as, but no more than, five minutes.
                [real standing law in Iowa, United States of America]

                /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
                /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
                \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
                \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
              • Wichert Akkerman
                ... Seems to work fine. Wichert. -- _________________________________________________________________ /wichert@wiggy.net This space intentionally left
                Message 7 of 9 , Nov 5, 2002
                  Previously Bram Moolenaar wrote:
                  > au BufNewFile,BufRead /etc/modutils/* if executable(expand(<afile>)) != 1 | setf modconf | endif
                  >
                  > Can you try this out?

                  Seems to work fine.

                  Wichert.

                  --
                  _________________________________________________________________
                  /wichert@... This space intentionally left occupied \
                  | wichert@... http://www.wiggy.net/ |
                  | 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0 2805 3CB8 9250 2FA3 BC2D |
                Your message has been successfully submitted and would be delivered to recipients shortly.