~ foca
/.vimrc
Set a few nice options (incsearch, ignorecase, line numbers, showmatch, ...), load matchit, and declare filetype dependent indent settings
set nocompatible
set nobackup
set directory=~/.vim/swap
set number
set cindent
set showmatch
set autoindent
set incsearch
set ignorecase
set hlsearch
set encoding=utf8
set tenc=utf8
set fileencoding=utf8
syntax on
filetype plugin indent on
" Auto match brackets
inoremap { {}<Esc>i
inoremap ( ()<Esc>i
inoremap [ []<Esc>i
inoremap " ""<Esc>i
inoremap ' ''<Esc>i
" Load matchit (% to bounce from do to end, etc.)
runtime! macros/matchit.vim
augroup myfiletypes
" Clear old autocmds in group
autocmd!
autocmd BufRead,BufNewFile *.haml setfiletype haml
autocmd BufRead,BufNewFile *.sass setfiletype sass
autocmd FileType ruby,eruby,yaml,html,haml,sass,css,js,vim set sw=2 sts=2 et
autocmd FileType ruby,eruby,haml imap <buffer> <CR> <C-R>=RubyEndToken()<CR>
autocmd FileType php set sw=4 sts=4 et
augroup END