I like to use the one and only vim editor when I code on linux maschines and of course setup my .vimrc configuration file the same way on a Mac OS X system (Mac or MacBook).

First of all open the terminal and switch to the correct path where the .vimrc config file is:

GOD:/ dude$ cd /usr/share/vim/

Open the .vimrc config file as the super user (sudo)

GOD:vim dude$ sudo vi .vimrc
Password:

The standard out of the box vim configuration is this:

" Configuration file for vim
set modelines=0         " CVE-2007-2438

" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible        " Use Vim defaults instead of 100% vi compatibility
set backspace=2         " more powerful backspacing

" Don't write backup file if vim is being called by "crontab -e"
au BufWrite /private/tmp/crontab.* set nowritebackup nobackup
" Don't write backup file if vim is being called by "chpass"
au BufWrite /private/etc/pw.* set nowritebackup nobackup

Now we crack this file up and add some useful and nice configuration commands. I seperate them in two types 'General' and 'Advanced'

" Configuration file for vim
set modelines=0         " CVE-2007-2438

" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible        " Use Vim defaults instead of 100% vi compatibility
set backspace=2         " more powerful backspacing

" General
set number                      " Show line numbers
set linebreak                   " Break lines at word (requires Wrap lines)
set showbreak=+++               " Wrap-broken line prefix
set textwidth=100               " Line wrap (number of cols)
set showmatch                   " Highlight matching brace
set visualbell                  " Use visual bell (no beeping)

set hlsearch                    " Highlight all search results
set smartcase                   " Enable smart-case search
set ignorecase                  " Always case-insensitive
set incsearch                   " Searches for strings incrementally

set autoindent                  " Auto-indent new lines
set shiftwidth=4                " Number of auto-indent spaces
set smartindent                 " Enable smart-indent
set smarttab                    " Enable smart-tabs
set softtabstop=4               " Number of spaces per Tab

" Advanced
set ruler                       " Show row and column ruler information
syntax on                       ” Syntax Highlighting
set undolevels=1000             " Number of undo levels
set backspace=indent,eol,start  " Backspace behaviour

" Don't write backup file if vim is being called by "crontab -e"
au BufWrite /private/tmp/crontab.* set nowritebackup nobackup
" Don't write backup file if vim is being called by "chpass"
au BufWrite /private/etc/pw.* set nowritebackup nobackup

The vim configuration settings are the same ones I use with a linux system. You can find the vim setting docs everywhere over the internet.