views:

111

answers:

3

Hello.

On my Mac OSX 10.6 machine, I started to use MacVIM for vim. Then I noticed my terminal version was different to the MacVIM version (MacVIM was 7.3 and my terminal version 7.2)... I thought they used the same vim?

I need 7.3 for some of the features. So I set about wanting to update the terminal version. I basically cloned it using Mercurial (the perferred way according to the official site) and then did the usual to compile it. This did work and I now have 7.3 in my terminal. But, on some commands when exiting, I can this error:

/bin/bash: q: command not found

shell returned 127

Press ENTER or type command to continue

...I've tried my hardest to try and fix this problem, but trying to reinstall MacVIM, deleting the vim in my /usr/local/bin and compiling again and I just can't get rid of this annoying error.

Can anyone possibly help me? Am I doing this all wrong? ...most of the time I will be using MacVIM, but it'd be nice for me to have it in the Terminal - exactly how I'd have it on my Ubuntu servers.

Any help would be fantastic!

+2  A: 

don't use :!q; you want :q! if you're quitting, or something completely different.

sreservoir
A: 

This is the homebrew formula for vim. Try these settings for "configure" or just install homebrew and install vim from there.

system "./configure", "--prefix=#{prefix}",
                      "--mandir=#{man}",
                      "--enable-gui=no",
                      "--without-x",
                      "--disable-nls",
                      "--enable-multibyte",
                      "--with-tlib=ncurses",
                      "--enable-pythoninterp",
                      "--enable-rubyinterp",
                      "--with-features=huge"
system "make"
system "make install"
abdollar
what's with all the `system`s? why not just use a shell script?
sreservoir
homebrew is a package manager for osx. The system calls above are part of the formula which is a ruby script. See http://mxcl.github.com/homebrew/
abdollar
+2  A: 

I'm not sure on the exact path, but somewhere a few folders deep into the Applications/MacVim.app folder is the vim executable that will also run in a terminal (Use the -g option to launch it in GUI mode).

You should be able to throw this in your .bashrc:

alias vim=/Applications/MacVim.app/<not sure>/vim
too much php
Simple and solved the problem, thanks!
littlejim84