You have the option of creating a .vimrc file in your
home directory. This file can customize your editing environment. If you
use a Mac, you should have these lines in your .vimrc.
syntax on set et set tabstop=4
This file runs every time you open a session with vi.
The three lines present in the example enable syntax coloring (you want
this), expand tabs into spaces (for Python sanity), and set your tabstop
to 4 spaces. Note: Type this exactly as shown; do not put
spaces around the = or you will get nastygrams whenever you open
vi.
If you want line numbers by default, just add this line.
set number
If you find yourself using several colon commands at the start of a
session, add them to your .vimrc as well.