How to change default indent in macvim?

mko picture mko · Feb 24, 2011 · Viewed 10.4k times · Source

I am learning to configure the macvim.

Now my tab indent is 4 character, I want to change it to 2. What should I add to the macvim configure file?

Is there any beginner guide for me to learn configure mac vim?

Answer

Kazuki Sakamoto picture Kazuki Sakamoto · Feb 24, 2011

Open your $HOME/.vimrc file in MacVim,

:edit $MYVIMRC

write the following lines,

set tabstop=2
set shiftwidth=2

and save.

:wq