How do I set indent space from 8-char to 3-char in vi?

A

AlexN

Guest
How do I set indent space from 8-char to 3-char in vi? The default 8-char when I use "Tab" key in annoying. In Linux, I can edit the /etc/vimrc, but there is no such file on MacOS X...or I just couldn't find it.

Anyone know?


Thanks
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
Have you tried to create one and see what happens? It has been a long time and i would need to look that one up.
 
OP
S

supenguin

Guest
vimrc

I never mess with the system vimrc. Just create one in your home directory called .vimrc At least that's how I do it in Linux. Not sure on the Mac. I just used Text Wrangler. You also may want to do "locate vimrc" on the command line to see where its keeping that file.

-Kenny
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
Creating a .vimrc file in your home directory/folder is a better idea.
 
OP
A

AlexN

Guest
Creating a .vimrc file myself? Will vi takes it? Do you know where this file is located?
 
OP
S

supenguin

Guest
Just create a new file called .vimrc in your home directory. Its just a plain text file. vim will use the system settings for everything except for what's in that file.

-Kenny
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top