4554Re: Vim with "Open With"
- Jul 30, 2007If 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.
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
/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.
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?
Ted Pavlic <ted@...>
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
- << Previous post in topic Next post in topic >>