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

syntax/modconf.vim

Expand Messages
  • Nikolai :: lone-star :: Weibull
    ok, this is a personal record. if not a world record? three new Vim syntax definitions in under 24 hours! hooray! this time Linux Modutils configuration files
    Message 1 of 9 , Oct 23, 2002
      ok, this is a personal record. if not a world record? three new Vim
      syntax definitions in under 24 hours! hooray! this time Linux Modutils
      configuration files are the target.

      to match:

      au BufNewFile,BufRead /etc/modules.conf setf modconf
      au BufNewFile,BufRead /etc/conf.modules setf modconf

      which can of course be joined to make it one line but then the line
      becomes too long for this email =).

      enjoy!

      --
      ::: name: Nikolai Weibull :: aliases: pcp / lone-star :::
      ::: born: Chicago, IL USA :: loc now: Gothenburg, Sweden :::
      ::: page: http://pcppopper.org/ :: top ref: google "pcp rocks" :::
      main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
    • Nikolai :: lone-star :: Weibull
      ... ok, here s a better version again. hm...should perhaps think it through a bit longer before posting ;). -- ...
      Message 2 of 9 , Oct 24, 2002
        On Thu, 24 Oct 2002 02:29:16 +0000, Nikolai :: lone-star :: Weibull wrote:
        > ok, this is a personal record. if not a world record? three new Vim
        > syntax definitions in under 24 hours! hooray! this time Linux Modutils
        > configuration files are the target.
        >
        > to match:
        >
        > au BufNewFile,BufRead /etc/modules.conf setf modconf
        > au BufNewFile,BufRead /etc/conf.modules setf modconf
        >
        > which can of course be joined to make it one line but then the line
        > becomes too long for this email =).
        >
        > enjoy!
        >
        ok, here's a better version again. hm...should perhaps think it through
        a bit longer before posting ;).

        --
        ::: name: Nikolai Weibull :: aliases: pcp / lone-star :::
        ::: born: Chicago, IL USA :: loc now: Gothenburg, Sweden :::
        ::: page: http://pcppopper.org/ :: top ref: google "pcp rocks" :::
        main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
      • 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 3 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 4 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 5 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 6 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 7 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 8 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 9 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.