How to change default indentation in macvim

Hey guys i'm learning to configure macvim

now my input indent is 4 characters, I want to change it to 2, what should I add to the macvim configuration file?

And is there any beginner guide to learn how to configure mac vim thanks

+8
macvim
source share
2 answers

Open the $ HOME / .vimrc file in MacVim,

:edit $MYVIMRC 

write the following lines

 set tabstop=2 set shiftwidth=2 

and save.

 :wq 
+15
source share

As said above, Kazuki Sakamoto, you need to edit the $ HOME / .vimrc file. What you also need to do is make sure your $ HOME / .gvimrc file has the same settings. I am using janus setup with macvim and the only way to get it working is to add these lines to this file. Their presence in both files should ensure that if you use vim in a terminal or macvim, the tab settings will be the same.

+1
source share

All Articles