Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run mvim (MacVim) from Terminal?

I have MacVim installed and I am trying to set it up as the editor for Git (version control), but I can't run 'mvim' from the command line as it isn't recognised. How do I setup mvim so I can run it from Terminal?

like image 707
Fred Avatar asked Jan 13 '10 11:01

Fred


People also ask

How do I open MacVim in terminal?

Try to reinstall your macvim with option --with-override-system-vim. it will create vi and vim command under /usr/local/bin/ and if you want to open a file from terminal using macvim, just type vi file or vim file . These two commands acted as mvim -v . That's all.

How do I run a MacVim file?

Just select the file and hit Cmd-i, then go to the "Open with" tab, select app and hit "Change all...". This will change the default application for that file and the open command will work as you wish. Then you can type edit filename in Terminal and the file will open in MacVim.

How do I use MacVim on my Mac?

How do I setup mvim so I can run it from Terminal? Try vim from the command-line. Disclaimer: this would work for Linux so I suppose it is similar on a Mac. Try to see the path (use " echo $PATH ") and add the folder to the MacVim executable to it if it's not there already (use " export PATH=$PATH:path/to/folder ").


2 Answers

I don't think I'd to add anything to the path, did

brew install macvim  mvim -v 

should then open macvim in the terminal, you can also go ahead and alias that

alias vim='mvim -v' 
like image 98
Swapneel Patil Avatar answered Sep 25 '22 17:09

Swapneel Patil


There should be a script named mvim in the root of the .bz2 file. Copy this somewhere into your $PATH ( /usr/local/bin would be good ) and you should be sorted.

like image 39
Gordon Robertson Avatar answered Sep 21 '22 17:09

Gordon Robertson