set nocompatible " Use Vim settings, rather then Vi settings (much better!). set backspace=indent,eol,start " allow backspacing over everything in insert mode set noautoindent " always set autoindenting off (turning this on WILL mess up pasting, but is still cool) set backupdir=~/.vim/tmp// " store backups here (// means use full path to files) set directory=~/.vim/tmp// " store swap files here (// means use full path to files) set nobackup " do not keep a backup file, use versions instead set history=50 " keep 50 lines of command line history set ruler " show the cursor position all the time set showcmd " display incomplete commands set incsearch " do incremental searching set nohlsearch " don't highlight my searching please set shiftwidth=4 " number of spaces to autoindent set tabstop=4 " we want tabs to be this many spaces set softtabstop=4 set expandtab " Expand my tabs set smarttab set noerrorbells " Hearing beep every 2 seconds isn't my idea of fun set showmatch " Show matching brackets, sure, why not set showmode " Make sure we know whether we're INSERT-ing or REPLACE-ing set laststatus=2 "set statusline=[%n]\ %f\ %(\ %M%R%H)%) " ack is better than grep... duh set grepprg=ack\ --nocolor\ --nogroup\ '$*'\ *\ /dev/null " color information set background=dark " My ssh session background is black colorscheme calmar256-dark " http://www.vim.org/scripts/script.php?script_id=1807 let mapleader="," " I forget why I added this " not sure if these mappings for the numpad are needed any longer map! Oq 1 map! Or 2 map! Os 3 map! Ot 4 map! Ou 5 map! Ov 6 map! Ow 7 map! Ox 8 map! Oy 9 map! Op 0 map! Ol + map! On . map! OM " Abbreviations for my common typos cab Q! q! cab WQ wq cab Wq wq augroup blah " automatically source the .vimrc file if I change it " the bang (!) forces it to overwrite this command rather than stack it au! BufWritePost .vimrc source % " Automatically source in my blank html file template locally. au BufNewFile *.htm 0r ~/.vim/blank.htm au BufNewFile *.html 0r ~/.vim/blank.htm " same for Perl scripts except position the cursor at the bottom ready to start typing. au BufNewFile *.t 0r ~/.vim/skeleton.pl|normal G au BufNewFile *.pl 0r ~/.vim/skeleton.pl|normal G au BufNewFile *.pm 0r ~/.vim/skeleton.pm|normal gg " cursor at top augroup END call pathogen#infect() syntax on filetype plugin indent on