Clone this wiki locally
How to install MacVim?
MacVim.dmg from latest binary release page, open the
.dmg file, and copy
How do I save configuration settings?
All settings should be saved in a file named
.gvimrc which must be located in
your home folder (abbreviated
~/). Note that you have to create this file if
one does not already exist. Your home folder is the one called
name is your login name. Type
:h vimrc-intro for more information on
Vim configuration files.
How can I change the default font?
Add the line
set guifont=Monaco:h14 to your
.gvimrc to set Monaco as the default font with a size of 14.
How can I set the default size of new windows?
Add the line
set lines=40 to your
.gvimrc to make 40 the default number of
rows. To set the default number of columns to 100 add the line
If you want the window as big as possible, you can set these options to very
large values or you can type
:set lines? and
:set columns? after having
manually maximized the window to find out how big it is and then add these
values to your
Note that the dimensions of the first window you open are automatically saved and used for every window you open thereafter.
How do I maximize the window horizontally as well as vertically?
Hold down Cmd when clicking the green zoom button. If you want this to be the default behavior, open Terminal and enter
$ defaults write org.vim.MacVim MMZoomBoth 1
How to use Python/Ruby/Lua interface in MacVim?
The easiest way is using Homebrew https://brew.sh/. Install Homebrew and
brew install python3,
brew install ruby, or
brew install lua.
You can use any distribution of Python/Ruby/Lua dylib binaries as long as those versions are the same as the MacVim binary supported version. You may need to set up your .vimrc like following.
set pythonthreedll=/opt/Python3.6.3/Frameworks/Python.framework/Versions/3.6/Python set rubydll=/opt/Ruby2.4.1/lib/libruby.2.4.dylib set luadll=/opt/Lua5.2.1/lib/liblua.dylib
How do I configure Xcode to open files in MacVim?
In Xcode, open the Preferences and click the "File Types" tab, then expand "file -> text". Under the "text" item there is an entry called "sourcecode"; click the second column (Preferred Editor) of this entry and choose "External Editor -> Other". Navigate to MacVim in the dialog that pops up.
The "external editor" support in Xcode is very limited. Basically all the above change does is to open source code files in MacVim. You can also double click on build errors to open MacVim on the line where the error was reported.
How can I make the toolbar stay hidden after a restart?
Add the line
set guioptions-=T to your
How can I prevent Finder file labels from disappearing when saving a file?
Add the line
set backupcopy=yes to your
.gvimrc file. Type
:h 'backupcopy' for more information on why this is necessary.
How can I open files from Terminal?
mvim script (which is located in the
:h macvim-start for more information.
How can I use MacVim to edit Git commit messages?
Add the following line to the file
export EDITOR='mvim -f --nomru -c "au VimLeave * !open -a Terminal"'
--nomru switch ensures that the commit message is not added to the Most
Recently Used file menu (requires Snapshot 57 or later). The
-c .. switch
ensures that Terminal gets focus again after closing the commit message. (Note
that you need to put the
mvim script path in your PATH environment for this to work.)
How can I disable autoupdate (Sparkle)?
Open Terminal and enter
$ defaults write org.vim.MacVim SUEnableAutomaticChecks -bool false
How can I build MacVim by myself?
Black screen on Full Screen?
Execute the following command in Terminal.app if you're using
Use Core Text renderer and
Prefer native full-screen support in
$ defaults write org.vim.MacVim MMUseCGLayerAlways -bool YES
How can I use Python 2.x and Python 3.x at the same time?
My question is not answered in this FAQ. Where can I ask for help?
Please consult the Troubleshooting guide before asking for help! After doing so you may post your question to the vim_mac Google Group if it is MacVim related. General questions about using Vim should be posted to the vim_use Google Group.
Note that you do not need to subscribe to email notifications when signing up for either of these groups. You can read the groups online if you would rather keep your inbox clean. These groups are moderated so your first post may take up to a day before it arrives to the group (subsequent posts should show up within a few minutes).
Please read the guidelines before posting to either of these groups.