How to run GVim from Vimperator on Mac OS X

Published at 11, September 2009, author art. Tags: shell, vim

I started to use Vimperator for navigation through the Web, but one of it's useful feature — call for external editor (via shortcut Ctrl-i), to edit textareas, does not work with GVim, if GVim was installed from MacPorts.

The problem is in the /opt/local/bin/gvim script, which actually fork GVim and obey any options like --nofork.

Here is a small script, which start GVim with 'nofork' options. Place it somewhere in ~/usr/bin.

#!/bin/sh
binary="/Applications/MacPorts/Vim.app/Contents/MacOS/Vim"
exec "$binary" -g -f ${1:+"$@"}

Next setup Vimperator 'editor' option:

:set editor=~/usr/bin/gvim_nofork

Comments

Subscribe on this post's comments

No comments. Wanna be first?

First, identify yourself and come back to leave comments.

If you wish to leave comment, please, identify yourself and then come back to this page.