gvim cmdline OSX - macvim from the terminal

macvim doesn't seem to install a 'gvim' command. So opening files from the terminal with gvim doesn't work.

Add this to your .bash_profile
function gvim { /Applications/MacVim.app/Contents/MacOS/Vim -g $*; }

Then you'll need to source your shell, or open new shell tabs. Or paste that line into your current shell. Then you can open your files again with OSX gvim and the terminal.

aaaaaaah. Sigh of relief at being able to open files from the cmd line again :)


Ryan Phillips said…
I have an mvim script installed on my OSX machine. I'm pretty sure macvim installed it.
Lucian said…
I've had to manually put my mvim somewhere on my PATH, but it does come in the macvim .dmg.
illume said…
hrmm... I can't find the 'mvim' on my machine.

find /Applications/MacVim.app -name mvim
find /usr/local/ -name mvim
find /opt/ -name mvim
find /usr/bin/ -name mvim
WadeMealing said…
The mvim binary comes in the dmg, but its not part of the app/installer.
Vinay said…
It should be,

function gvim { /Applications/MacVim.app/Contents/MacOS/Vim -g "$*"; }

to open files with spaces.

Popular posts from this blog

Is PostgreSQL good enough?

Experiments with new low latency PyPy garbage collector in a thread.

🐱‍🏍 — the first pygame 2 community game. Starting now! Are you in?