~/.gvimrcConfigure ~/.vimrc and
There are two setting files should be known: vimrc and gvimrc. They have two versions: system and user.
vimrc: the main vim configuration file
To get the system vimrc location:
:echo $VIM
To get the user vimrc location:
:echo $HOME
If you have never created user vimrc before, you need to create one by yourself. It is .vimrc, a hidden file.
The user .vimrc will always overwrite the system vimrc. Thus, you only need to change the user .vimrc to configure vim. It will not affect other users if Mac has other users.
gvimrc: the configuration file for Gvim
Gvim is Vim with GUI. It supports cursor, has more color and some other features. We only use gvimrc for gvim specific additions, e.g. theme color.
Here is the command to create .vimrc and .gvimrc from vimc_example.vim and gvimrc_example.vim
:e $VIMRUNTIME/vimrc_example.vim
:saveas ~/.vimrc
:e $VIMRUNTIME/gvimrc_example.vim
:saveas ~/.gvimrc
" is used for comment in .vimrc
You may want to edit .vimrc in Terminal by:
$ open /Applications/TextEdit.app .vimrc
or in MacVim by:
:e .vimrc
So what do you think of it? Do I miss something? Leave your comments below...