I am not sure I understand correctly from the readme file how to install vim onto my mac. After installation, I still cannot seem to open files while typing gvim HelloWorld.c
into terminal. How can I permanently fix the gvim
command for terminal to recognize all the time?
Asked
Active
Viewed 2,021 times
1

common sense
- 3,775
- 6
- 22
- 31

Epsilon
- 13
- 3
-
Does this help? http://stackoverflow.com/questions/2056137/how-to-run-mvim-macvim-from-terminal – pah May 08 '14 at 04:22
1 Answers
1
Mac OS X already ships with a slightly underpowered but perfectly working vim build so you only have to issue that command in your terminal:
$ vim filename
MacVim is a more featureful version that comes with a GUI and a CLI executable. Is that what you installed?
The archive you downloaded contains MacVim.app and a shell script called mvim
.
If you don't plan to use Vim in or from your terminal, you don't need that mvim
script at all.
If you do, the simplest solution is to put that script somewhere in your $PATH
. To do so, check the value of $PATH
with the following command:
$ echo $PATH
and copy the script into one of the listed directories:
$ cp /path/to/mvim /some/directory/mvim
After that's done, you can call the MacVim GUI from your terminal with:
$ mvim filename
or the MacVim CLI with:
$ mvim -v filename

romainl
- 186,200
- 21
- 280
- 313