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

Xmodmap syxtax highlighting

Expand Messages
  • mapuna
    Hi! Vim only recognises files named xmodmap . Change of case in any letter is not detected. Thus, if the file is named Xmodmap , no syntax highlighting is
    Message 1 of 5 , Jul 20, 2007
    • 0 Attachment
      Hi!

      Vim only recognises files named "xmodmap". Change of case in any
      letter is not detected. Thus, if the file is named "Xmodmap", no
      syntax highlighting is done.

      It would be nice if vim would just ignore the case while loading.
      There are several programs which do not detect xmodmap but Xmodmap...
      right now my solution is to have xmodmap and a link to it named
      Xmodmap

      Thanks


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... I think this is a bug in the Vim runtime files. The workaround is as follows: Create (or edit) a file named (assuming ;-) you re on a Unix-like system)
      Message 2 of 5 , Jul 20, 2007
      • 0 Attachment
        mapuna wrote:
        > Hi!
        >
        > Vim only recognises files named "xmodmap". Change of case in any
        > letter is not detected. Thus, if the file is named "Xmodmap", no
        > syntax highlighting is done.
        >
        > It would be nice if vim would just ignore the case while loading.
        > There are several programs which do not detect xmodmap but Xmodmap...
        > right now my solution is to have xmodmap and a link to it named
        > Xmodmap
        >
        > Thanks

        I think this is a bug in the Vim runtime files. The workaround is as follows:

        Create (or edit) a file named (assuming ;-) you're on a Unix-like system)
        $HOME/.vim/filetype.vim

        and make sure that it contains (possibly among others) the following lines, in
        this order:

        augroup filetypedetect

        au BufRead,BufNewFile Xmodmap setf xmodmap

        augroup END


        If some of the directories in the path to this file don't yet exist, create
        them. Then, after saving your work, restart Vim. It should recognise Xmodmap
        from now on, without the need for a link.


        Best regards,
        Tony.
        --
        Bathquake, n.:
        The violent quake that rattles the entire house when the water
        faucet is turned on to a certain point.
        -- Rich Hall, "Sniglets"

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Bram Moolenaar
        ... I try to detect only file names that are really used, ignoring case is a bit expensive. I can add *Xmodmap as a pattern, I would think that finds most
        Message 3 of 5 , Jul 20, 2007
        • 0 Attachment
          Anupam Srivastava wrote:

          > Vim only recognises files named "xmodmap". Change of case in any
          > letter is not detected. Thus, if the file is named "Xmodmap", no
          > syntax highlighting is done.
          >
          > It would be nice if vim would just ignore the case while loading.
          > There are several programs which do not detect xmodmap but Xmodmap...
          > right now my solution is to have xmodmap and a link to it named
          > Xmodmap

          I try to detect only file names that are really used, ignoring case is a
          bit expensive.

          I can add "*Xmodmap" as a pattern, I would think that finds most files.
          I notice ".Xmodmap" being used in examples.

          --
          hundred-and-one symptoms of being an internet addict:
          24. You realize there is not a sound in the house and you have no idea where
          your children are.

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ download, build and distribute -- http://www.A-A-P.org ///
          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • mapuna
          On Jul 20, 4:13 pm, Tony Mechelynck ... I think you meant .Xmodmap Thanks, it works.
          Message 4 of 5 , Jul 29, 2007
          • 0 Attachment
            On Jul 20, 4:13 pm, Tony Mechelynck <antoine.mechely...@...>
            wrote:
            > au BufRead,BufNewFile Xmodmap setf xmodmap
            I think you meant .Xmodmap

            Thanks, it works.



            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Tony Mechelynck
            ... maybe *[xX]modmap it would depend on how the file is named on your system. Best regards, Tony. -- Certainly there are things in life that money can t buy,
            Message 5 of 5 , Jul 29, 2007
            • 0 Attachment
              mapuna wrote:
              >
              >
              > On Jul 20, 4:13 pm, Tony Mechelynck <antoine.mechely...@...>
              > wrote:
              >> au BufRead,BufNewFile Xmodmap setf xmodmap
              > I think you meant .Xmodmap
              >
              > Thanks, it works.

              maybe *[xX]modmap

              it would depend on how the file is named on your system.


              Best regards,
              Tony.
              --
              Certainly there are things in life that money can't buy, but it's very funny--
              Did you ever try buying them without money?
              -- Ogden Nash

              --~--~---------~--~----~------------~-------~--~----~
              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.