11

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?

peterh
  • 11,875
  • 18
  • 85
  • 108
mko
  • 21,334
  • 49
  • 130
  • 191

2 Answers2

18

Open your $HOME/.vimrc file in MacVim,

:edit $MYVIMRC

write the following lines,

set tabstop=2
set shiftwidth=2

and save.

:wq
Kazuki Sakamoto
  • 13,929
  • 2
  • 34
  • 96
1

As Kazuki Sakamoto said above, you need to edit your $HOME/.vimrc file. What you also need to do is make sure that your $HOME/.gvimrc file has these same settings. I use the janus setup with macvim and the only way I could get it to work was to add those lines to that file as well. Having them in both files should ensure that whether you're using vim in the terminal or macvim, the tab settings will be the same.

levi
  • 85
  • 6