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

36453RE: WinXP right-click edit menu

Expand Messages
  • Pritesh Mistry
    Feb 3, 2003
    • 0 Attachment
      Do we really need to use gvimext.dll for this, can we not simply do with the
      following, it works beautifully for me!

      -x-x-
      REGEDIT4

      [HKEY_CLASSES_ROOT\*\Shell\GVim\Command]
      @="gvim.exe \"%1\""

      [HKEY_CLASSES_ROOT\*\Shell\GVim]
      @="&Vim-It"
      -x-x-

      Rgds,
      Pritesh

      -----Original Message-----
      From: Colin Keith [mailto:vim@...]
      Sent: Tuesday, February 04, 2003 11:31 am
      To: vim@...
      Subject: Re: WinXP right-click edit menu


      On Tue, Feb 04, 2003 at 12:06:58AM -0500, Steve Hall wrote:
      > If somebody can clue me, I'll write a Tip that also links the other
      > reg-manipulating tips for viewing source in IE, opening
      > non-associateds, etc.

      I'm not sure if this is what you're looking for, and I don't know the exact
      details, but from poking around in the registry for years the way I
      understand it works is that you register your DLL with the system by giving
      it a class ID (CLSID) (HKCR\CLSID) This ID then stores info about the
      executable (dll's are exe's) you want to call. If you look for
      HKCR\CLSID\{51EEE242-AD87-11d3-9C1E-0090278BBD99} you'll see it refers to
      the gvimext.dll.

      This CLSID is then registered with the file type to say it handles certain
      things. ContextMenuHandlers handle right clicks, PropertySheetHandlers when
      you bring up the properties (oddly enough ;-) so when you
      right-click Windows gets a list of the dll's for that extension, (and the
      default type) and as far as I can see, loads them and asks if they'll
      handle that file type. If they do they appear on your context-menu.

      I assume that it queries all the dll's because if you right-click on a
      self-extracting .exe file you get winzip "Extract .. " options, but if you
      click on just a program .exe you get "add to zip" options.

      The Vim OLE support is handled by registering another CLSID for the
      gvim.exe {0F0BFAE1-4C90-11D1-82D7-0004AC368519}. This points to
      Vim.Application which points to Vim.Application.1 so you can increment the
      OLE app version without forcing everyone to rebuild their apps.

      Personally I always just plonk the vim context-menu handler into the
      extension * so Vim is always on the context menu. But then I also set to
      default action for the "Unknown" class of files. That means I can download
      scripts from the servers at work (where I rarely bother to give them file
      extensions) and open it in Vim :)

      For that:

      [HKEY_CLASSES_ROOT\Unknown\shell\open\command]
      @="C:\\Vim\\vim61\\gvim.exe \"%1\""

      [HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\gvim]
      @="{51EEE242-AD87-11d3-9C1E-0090278BBD99}"


      Oh and as for the "Edit with Vim" Its not in the registry, its in the DLL.
      gvim c:\vim\vim61\gvimext.dll /Edit with

      Its in the text segment at the end of the DLL

      Not much for tip help, but, it might be of some use to you :)

      Oh, and I'd just like to say that I may be up at 1am coding, but thanks to
      Vim its a lot easier on the eyes and to work with :-)

      --
      The next time you moan about spam, remember its there because; YOU "just hit
      delete", YOU won't report the offense, YOU don't demand new laws, YOU buy
      "better spam filtering technology" from the same company whose software is
      run on most open mail relays/proxies. So YOU helped waste US$89b last year.
    • Show all 18 messages in this topic