Skip to content

Instantly share code, notes, and snippets.

@miwillhite
Created April 24, 2012 16:40
Show Gist options
  • Save miwillhite/2481319 to your computer and use it in GitHub Desktop.
Save miwillhite/2481319 to your computer and use it in GitHub Desktop.
if has("autocmd")
" Enable filetype detection
filetype plugin indent on
" Restore cursor position
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
endif
if &t_Co > 2 || has("gui_running")
" Enable syntax highlighting
syntax on
endif
" never forget yo'self
set history=1000
" hard tabs are for noobs
set softtabstop=2
" ...
set shiftwidth=2
" ...
set tabstop=2
" ... I have no idea
set expandtab
" line numbers I assume
set number
" highlight my searches
set hlsearch
" ...
autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/
" highlight that nasty whitespace, keep me files clean
highlight ExtraWhitespace ctermbg=red guibg=red
" easy plugins
call pathogen#infect()
" get yo swp outta ma face
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
" yay for highlighting
let vimclojure#HighlightBuiltins=1
" who doesn't like rainbows?
let vimclojure#ParenRainbow=1
" kill highlighting by returning the carriage
nnoremap <CR> :nohlsearch<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment