
There’s a comment for the most important commands, so that you can understand what these lines do if you are interested. You might see a blank file if you have never edited Vim’s configuration before. Therefore, type vim ~/.vimrc to start editing your configuration. The Vim (or MacVim) configuration file is located in ~/.vimrc. Vim is highly configurable, but here I will describe what I believe is the most useful setup for new users and C/C++ developers. The rest of the instructions work for Vim and MacVim, so I will use Vim to refer to both (simply replace vim for mvim if you want to use MacVim). Now that you have Vim (and/or MacVim) installed in your system, the next thing you should do is to set it up to adapt it to your needs. Now you should be able to start a new document with MacVim by typing:.Like this (you will have to enter your machine password): Copy the mvim binary to your PATH so that you can open MacVim from any directory in your computer.Open the Terminal (commonly located in /Applications/Utilities/Terminal.app, but I suggest you put it in your Dock) and go to the MacVim Snapshot folder you just downloaded.Decompress it (double click) and drag MacVim.app to your Applications folder.Get the latest snapshot of MacVim from here (make sure you have the correct OSX version).

Skip the next steps if you want to use the regular Vim instead.

MacVim adds a graphical interface to Vim that can help newcomers (only for OSX users, others should consider GVim). Vim is probably the most powerful text editor that humans have ever created, so you should consider using it even if its learning curve is a bit steep. This post is meant to be a little guide to setting up Vim (or MacVim) as your next favorite C/C++ IDE.
