Code:
set nocompatible " Get out of vi-compatible mode.
filetype on " Detect the type of file.
set history=1000 " How many lines of history to remember.
set cf " Enable error files and error jumping.
set ffs=unix " Support Unix file format.
filetype plugin on " Load filetype plugins.
set viminfo+=! " Make sure we can save viminfo.
set isk+=_,$,@,%,#,- " None of these should be word dividers, so make them not be.
" Theme and colors.
set background=dark " Use a dark background.
syntax on " Syntax highlighting on.
colorscheme elflord " Set default color scheme.
" Files and Backups
set backup " Make backup files.
set backupdir=$HOME/.vimfiles/backup " Where to put backup files.
set directory=$HOME/.vimfiles/temp " Set directory for temporary files.
" User Interface
set ruler " Always show current positions along the bottom
set cmdheight=4 " Make command bar 4 high.
set number " Turn on line numbers.
set lz " Do not redraw while running macros (much faster) (LazyRedraw).
set backspace=2 " Make backspace work normally.
set mouse=a " Use mouse everywhere.
set report=0 " Tell me when anything is changed via :...
set shortmess=atl " Shorten messages to avoid 'press a key' prompts.
" Visual Cues
set showmatch " Show matching brackets.
set mat=50 " How many tenths of a second to blink matching brackets.
set so=2 " Keep 2 lines (top/bottom) for scope.
set laststatus=2 " Always show the status line.
" Text Formatting and Layout
set ai " Autoindent.
set si " Smartindent.
set cindent " Do c-style indenting.
set tabstop=4 " Tab spacing (settings below are just to unify it).
set softtabstop=4
set shiftwidth=4
set noexpandtab " Real tabs please!
set nowrap " Do not wrap lines
set smarttab " Use tabs at the start of a line, spaces elsewhere.