Skip to content

Instantly share code, notes, and snippets.

@eviltrout
Created June 3, 2014 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eviltrout/812fde534280e38312af to your computer and use it in GitHub Desktop.
Save eviltrout/812fde534280e38312af to your computer and use it in GitHub Desktop.
" =====================================================================
" Initialize: {{{1
set nocp
filetype plugin indent on
set runtimepath^=~/.vim/bundle/ctrlp.vim
syntax on
set wildignore+=*/tmp/*,*/log/*,*/pg_dumps/*,*.so,*.swp,*.zip,*.png,*.jpg,*/public/*,*/chef/*,*/vendor/*,*/node_modules/*,*/fixtures/* " MacOSX/Linux
let g:ctrlp_match_func = {'match' : 'matcher#cmatch' }
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn)$',
\ 'file': '\.pyc$\|\.pyo$\|\.rbc$|\.rbo$\|\.class$\|\.o$\|\~$\',
\ 'link': 'some_bad_symbolic_links',
\ }
set backspace=2
set number
set relativenumber
" Always show line numbers, but only in current window.
:au WinEnter * :setlocal relativenumber
:au WinLeave * :setlocal norelativenumber
au BufNewFile,BufRead *.es6 set filetype=javascript
autocmd Filetype html setlocal ts=2 sts=2 sw=2
autocmd Filetype ruby setlocal ts=2 sts=2 sw=2
autocmd Filetype eruby setlocal ts=2 sts=2 sw=2
set ttyfast " optimize for fast terminals
set lazyredraw " don't redraw while executing macros or that sort of thing
set ruler " use the ruler.
set laststatus=2 " always show the status line
set title " set window title
set noerrorbells " DESTROY ALL BELLS
set vb t_vb= " HATE BELLS
set showmatch " highlight matching brackets
set hlsearch " highlight search term
set autoread " reload files on change externally
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
let &t_Co=256
colors codeschool
execute pathogen#infect()
set tabstop=2 shiftwidth=2 expandtab
let jshint2_save = 1
let g:gitgrepprg="git\\ grep\\ -n"
let g:gitroot="`git rev-parse --show-cdup`"
func GitGrep(...)
let save = &grepprg
set grepprg=git\ grep\ -n\ $*\ `git\ rev-parse\ --show-cdup`
let s = 'grep'
for i in a:000
let s = s . ' ' . i
endfor
exe s
let &grepprg = save
endfun
command -nargs=? G call GitGrep(<f-args>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment