Previously I had gVim running and working; however, my hard drive crashed so everythin'g got erased. Anyways, I am trying to run gVim to open files "-bash: gVim: command not found. I installed X11 and MacVim and did everything that i did before but it just wont open my file. When i open my file with vim it works, but i would prefer gVim.
Any suggestions on how to get givm to work??
I’m a hard-core gvim user (i.e., I prefer gvim to vi, vim, mvim, and other text editors that are available on Mac). I’ve searched online for “How to install gvim on Mac?”, and have found many answers. The one answer that works best for me is as follows. Assuming you have brew available, on a terminal, type:
brew install macvim
You may be asked to fix some errors. Just follow the onscreen instructions, which may include running commands: brew unlink vim, brew unlink macvim, etc.
Once your macvim has been installed, type the following command:
brew link macvim
If this is successful, then gvim should have been installed, and you can verify this by typing:
which gvim
You should see:
/usr/local/bin/gvim
as the screen output.
I'm not sure you know what you are doing.
MacVim has nothing to do with X11 at all so… are you trying to run GVim — the GTK front end of Vim — under X11 (to mimic a Linux desktop, maybe) or do you simply want to run some GUI Vim (GVim or MacVim, whatever).
If you really want GVim, you can install it (and its dependencies) from source but, judging by your question I don't think you should take that path.
If you only want a GUI Vim, the MacVim download comes with a mvim script that you can put anywhere in your $PATH. $ mvim filename will work just like $ gvim filename on Linux.
You can even rename that script to gvim if you absolutely need a gvim command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With