![]() Just add this line (customized to reflect your system) to your ~/.bashrc or ~/.profile or whatever file is run by your shell at startup: alias vim='/path/to/MacVim.app/Contents/MacOS/Vim' I think michaelmichael's answer could be a expanded a bit but the most important is said. You basically have two options: use the mvim CLI wrapper to open MacVim from the terminal or use an alias to MacVim's bundled CLI executable. `$ open -a macvim file.txt` will not work either. Once it's installed, MacVim is where you have put it, plain and simple.īecause it's a full fledged GUI app, MacVim can't really be used as a drop-in replacement for the default Vim in the terminal. It doesn't come preinstalled with your OS so you have to download it from the Internet or install it through homebrew (see michaelmichael's answer). MacVim is a native Mac OS X GUI version of Vim. This way, you can stay in CLI-land and enjoy the power of a powerful/recent/fast Vim. No need to compile anything, no need to put MacVim in a special place, no need to overwrite default programs with symlinks MacVim comes with a CLI executable that you can use in place of Mac OS X's default Vim if you add a single alias to your ~/.bashrc/ ~/.profile. My answer is kind of the opposite of michaelmichael's and I've made it quite a few times: whereis checks the standard binary directories, and may miss files included in your personal path.Īlternately, use Homebrew, as I suggest above and it will manage the location of both files. Which returns the pathnames of the files which would be executed in the current environment. Going forward, you should look for mvim using which rather than whereis. There are three files: the MacVim application, the mvim script, and a README. Plus, I prefer to use Homebrew as a package manager.ĮDIT: Since you say you don't know where MacVim is, you may just want to download the latest tarball for your system and start from scratch. ![]() You may find it a cleaner way to achieve the same goal. The -override-system-vim flag will create mvim symlinks to vi, vim, etc. Just install MacVim with $brew install macvim -override-system-vim. If you want to completely override the system vim, an easy way is to use Homebrew. ![]() Then, just set the alias: alias vim='mvim' The MacVim distro comes with a script called mvim that takes exactly the same arguments as vim. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |