Mostly just pieced together from other examples and using ideas from others posted on the web. Keeps the current working directory that of the file you're working on, four space tabs, smart indenting.
set showmatch
set expandtab
set tabstop=4
set shiftwidth=4
set title
set autoindent
set smartindent
set nocompatible
set ruler
set incsearch
set number
syntax on
colorscheme slate
" use "[RO]" for "[readonly]" to save space in the message line:
set shortmess+=r
" normally don't automatically format `text' as it is typed, IE only do this
" with comments, at 79 characters:
set formatoptions-=t
set textwidth=79
" Remove the toolbar in gvim
set guioptions-=T
" Make the tab key do actual tab characters for makefiles.
au FileType make setlocal noexpandtab
" tab navigation like firefox
:nmap <C-S-tab> :tabprevious<cr>
:nmap <C-tab> :tabnext<cr>
:map <C-S-tab> :tabprevious<cr>
:map <C-tab> :tabnext<cr>
:imap <C-S-tab> <ESC>:tabprevious<cr>i
:imap <C-tab> <ESC>:tabnext<cr>i
:nmap <C-t> :tabnew<cr>
:imap <C-t> <ESC>:tabnew<cr>
" Omnicompletion
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType c set omnifunc=ccomplete#Complete
" Enable code folding. Do it like this:
"
if version >= 600
set foldenable
set foldmethod=marker
endif
" Set the working directory to the directory of the curren file.
autocmd BufEnter * lcd %:p:h
set guifont=triskweline