My Vimrc

Posted on January 27, 2012 | Filed under config , vimrc

simply my .vimrc file:

set ts=2
set autoindent
set number
set showmode
set shiftwidth=2
set tabstop=2
set expandtab
set ruler
set hlsearch
syntax on
filetype on
filetype plugin on
autocmd BufWritePre * :%s/\s\+$//e

" remove trailing commas in object-literal, array, and func-call
au BufWritePre *.js mark` | silent!%s/,\(\_s*[}\])]\)/\1/g | norm``


highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
set cursorline

" easy vertical resize using + and - keys
if bufwinnr(1)
  map + +
  map - -
endif