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

Re: autocmd {pattern} doesn't work on osx gVim

Expand Messages
  • Bram Moolenaar
    ... It works just fine for me. Any idea what you could be doing that is different? -- Lawmakers made it obligatory for everybody to take at least one bath
    Message 1 of 5 , Jul 7, 2004
    • 0 Attachment
      Aman Patel wrote:

      > I've recently encountered a situation where the {pattern} argument to
      > autocmd command doesn't work correctly on the Mac. Here are more
      > details:
      >
      > I put this in my vimrc (it is a common vimrc for my peecee and mac):
      >
      > au GUIEnter *.php,*.html,*.css,*.js se co=120 lines=60
      >
      > It works on the PC, but not on the Mac. I tried reducing the command to:
      >
      > au GUIEnter * se co=120 lines=60
      >
      > And this works on the PC and the Mac. Anyone have any clue on why the
      > {pattern} argument might not match on the Mac?

      It works just fine for me. Any idea what you could be doing that is
      different?

      --
      Lawmakers made it obligatory for everybody to take at least one bath
      each week -- on Saturday night.
      [real standing law in Vermont, United States of America]

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
    • Aman Patel
      ... I tried doing what Benji Fisher did: ~/.vimrc au GUIEnter *.php,*.html let bar = expand( ) ... ## The buffer name would be blank when I try to open
      Message 2 of 5 , Jul 7, 2004
      • 0 Attachment
        On Jul 7, 2004, at 4:13 AM, Bram Moolenaar wrote:
        > Aman Patel wrote:
        >
        >> I've recently encountered a situation where the {pattern} argument to
        >> autocmd command doesn't work correctly on the Mac. Here are more
        >> details:
        >>
        >> I put this in my vimrc (it is a common vimrc for my peecee and mac):
        >>
        >> au GUIEnter *.php,*.html,*.css,*.js se co=120 lines=60
        >>
        >> It works on the PC, but not on the Mac. I tried reducing the command
        >> to:
        >>
        >> au GUIEnter * se co=120 lines=60
        >>
        >> And this works on the PC and the Mac. Anyone have any clue on why the
        >> {pattern} argument might not match on the Mac?
        >
        > It works just fine for me. Any idea what you could be doing that is
        > different?

        I tried doing what Benji Fisher did:

        ~/.vimrc
        au GUIEnter *.php,*.html let bar = expand("<afile>")

        :echo "#" . bar . "#"
        ##

        The buffer name would be blank when I try to open a file from Finder or
        the Dock. When I open from command line (terminal) it would work fine.
        On the other hand, the VimEnter autocmd event seems to work just fine
        every-time. That is a good workaround for now.

        Aman
      • Bram Moolenaar
        ... This would mean that when the GUIEnter event is triggered there is no file name yet. If gvim is started from Finder, then how does it get the file name?
        Message 3 of 5 , Jul 7, 2004
        • 0 Attachment
          Aman Patel wrote:

          > I tried doing what Benji Fisher did:
          >
          > ~/.vimrc
          > au GUIEnter *.php,*.html let bar = expand("<afile>")
          >
          > :echo "#" . bar . "#"
          > ##
          >
          > The buffer name would be blank when I try to open a file from Finder or
          > the Dock. When I open from command line (terminal) it would work fine.
          > On the other hand, the VimEnter autocmd event seems to work just fine
          > every-time. That is a good workaround for now.

          This would mean that when the GUIEnter event is triggered there is no
          file name yet.

          If gvim is started from Finder, then how does it get the file name?
          Does this happen in between starting the GUI and triggering the VimEnter
          event? Strange...

          --
          "I love deadlines. I especially like the whooshing sound they
          make as they go flying by."
          -- Douglas Adams

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
          \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
        Your message has been successfully submitted and would be delivered to recipients shortly.