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

4554Re: Vim with "Open With"

Expand Messages
  • Ted Pavlic
    Jul 30, 2007
    • 0 Attachment
      If you ever do figure out how to get Vim in the "Open With" menu, you
      may not like it. For example, my user paths aren't loaded when I load
      Vim via the Finder. If I want to run a compiler that's not in a standard
      folder (like LaTeX), this is pretty annoying.

      So here's another option. Try out OnMyCommand. If you're a Vim user,
      then you'll probably appreciate this app for lots more reasons.

      http://free.abracode.com/cmworkshop/on_my_command.html

      OMC adds contextual menu items that truly are contextual. That is, you
      use the program "OMCEdit" to add menu items that pop up based on what
      you're clicking on. Those menu items can call UNIX commands or execute
      AppleScript or do lots of other useful things.

      I use an "Open File with Vim" item that is activated on a File or Folder
      click (that is not the Finder window). It's "Execution Mode" is "Silent
      (popen)" and it escapes special characters with backslash. When I
      right-click an item in the Finder and then select this menu item, it
      executes:

      /bin/bash --login -c "cd __OBJ_PARENT_PATH__ && vi __OBJ_NAME__"

      I have a similar menu item called "New File in Vim" that is nearly the
      same, except that it activates on a Finder window and executes this:

      /bin/bash --login -c "cd __OBJ_PATH__ && vi"

      That is, it changes to the folder selected in the Finder and then opens
      vi. This lets me create new files pretty easily.

      So that's how I solve the problem.

      --Ted

      Ron Olson wrote:
      > Hi all-
      >
      > No matter how I try, I can't seem to get Vim registered in such a way so
      > that if I right-click on a file, it shows up in the "Open With" menu
      > item. Is there any known specific way to make this work?
      >
      > Thanks,
      >
      > Ron
      >
      > >

      --
      Ted Pavlic <ted@...>

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 14 messages in this topic