Created
December 20, 2015 18:35
-
-
Save brennancheung/d3d40746b8a2b3417a07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'L9' | |
Plugin 'int3/vim-extradite' | |
Plugin 'scrooloose/syntastic' | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'Xuyuanp/nerdtree-git-plugin' | |
Plugin 'scrooloose/nerdcommenter' | |
Plugin 'kchmck/vim-coffee-script' | |
Plugin 'wavded/vim-stylus' | |
Plugin 'elzr/vim-json' | |
Plugin 'pangloss/vim-javascript' | |
Plugin 'digitaltoad/vim-jade.git' | |
Plugin 'bling/vim-bufferline' | |
Plugin 'airblade/vim-gitgutter' | |
Plugin 'godlygeek/tabular' | |
Plugin 'rking/ag.vim' | |
Plugin 'Shougo/vimproc.vim' | |
Plugin 'Shougo/neomru.vim' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'nathanaelkane/vim-indent-guides' | |
Plugin 'SirVer/ultisnips' | |
Plugin 'Shougo/unite.vim' | |
Plugin 'terryma/vim-expand-region' | |
Plugin 'bling/vim-airline' | |
Plugin 'flazz/vim-colorschemes' | |
Plugin 'mattn/emmet-vim' | |
Plugin 'nono/vim-handlebars' | |
" Plugin 'mustache/vim-mustache-handlebars' | |
call vundle#end() | |
filetype plugin indent on | |
set tabstop=4 softtabstop=4 shiftwidth=4 expandtab | |
" set tabstop=2 softtabstop=2 shiftwidth=2 expandtab | |
set number autoindent ignorecase smartcase showcmd showmode ruler hlsearch nowrap | |
set textwidth=0 wrapmargin=0 " turn off annoying auto wrapping | |
set noeb vb t_vb= " get rid of annoying beeping | |
set noswapfile | |
set nobackup | |
if has("gui_running") | |
" Color Scheme | |
set background=dark | |
" colorscheme candyman | |
colorscheme hybrid | |
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h12 | |
let g:airline_powerline_fonts = 1 | |
set guioptions-=r | |
set guioptions-=L | |
endif | |
" Power user shit | |
let mapleader = "\<Space>" | |
nnoremap <Leader>b :Gblame<cr> | |
nnoremap <Leader>c :CoffeeWatch vert<cr><C-w>l | |
nnoremap <Leader>x :q<cr> | |
map <C-s> :vsp<cr><C-w>l | |
map <C-v> :sp<cr><C-w>j | |
" Airline | |
set laststatus=2 | |
" Having a hard time finding the filename for the window with so much crap | |
" everywhere. Simplify to make it easier to see. | |
"let g:airline#extensions#tabline#enabled = 0 | |
"let g:airline_section_a = '%#__accent_bold#%{airline#util#wrap(airline#parts#mode(),0)}%#__restore__#%{airline#util#append(airline#parts#paste(),0)}%{airline#util#append("",0)}%{airline#util#append(airline#parts#iminsert(),0)}' | |
let g:airline_section_a = '' | |
"let g:airline_section_b = '%{airline#util#wrap(airline#extensions#hunks#get_hunks(),0)}%{airline#util#wrap(airline#extensions#branch#get_head(),0)}' | |
"let g:airline_section_b = '%{airline#util#wrap(airline#extensions#branch#get_head(),0)}' | |
let g:airline_section_b = '' | |
let g:airline_section_c = '%t' " filename | |
let g:airline_section_x = '' " tagbar, filetype, virtualenv | |
let g:airline_section_y = '' " fileencoding, fileformat | |
" Unite | |
let g:unite_source_history_yank_enable = 1 | |
let g:unite_source_file_rec_max_cache_files = 200000 | |
let g:unite_source_rec_async_command='ag --nocolor --nogroup --hidden -g ""' | |
let g:unite_source_grep_command='ag' | |
let g:unite_source_grep_default_opts='-i --line-numbers --nocolor --nogroup --hidden -p /Users/brennan/.agignore' | |
call unite#filters#matcher_default#use(['matcher_fuzzy']) | |
"call unite#custom#source('file_mru,file_rec,file_rec/async,grepocate','max_candidates', 0) | |
autocmd FileType unite call s:unite_settings() | |
function! s:unite_settings() | |
imap <buffer> <C-j> <Plug>(unite_select_next_line) | |
imap <buffer> <C-k> <Plug>(unite_select_previous_line) | |
endfunction | |
nnoremap <Leader>a :UniteBookmarkAdd<cr><cr><cr> | |
nnoremap <Leader>s :Unite -no-split -buffer-name=bookmarks -start-insert bookmark<cr> | |
nnoremap <Leader>d :Unite -no-split -buffer-name=buffer -start-insert buffer<cr> | |
nnoremap <Leader>y :Unite -no-split -buffer-name=yanks history/yank<cr> | |
nnoremap <Leader><Space> :Unite -no-split -buffer-name=filenav -start-insert bookmark buffer file_rec/async:!<cr> | |
nnoremap <Leader>f :Unite -no-split -buffer-name=filenav -auto-preview -start-insert -winheight=40 bookmark buffer file_rec/async:!<cr> | |
nnoremap <Leader>g :Unite -no-split -no-quit -auto-preview -winheight=40 -start-insert grep:.<cr> | |
nnoremap <Leader>r <Plug>(unit_redraw) | |
noremap <Leader>2 :set tabstop=2 softtabstop=2 shiftwidth=2 expandtab<cr> | |
noremap <Leader>4 :set tabstop=4 softtabstop=4 shiftwidth=4 expandtab<cr> | |
" Unite / Angular | |
nnoremap <Leader>t :UniteWithBufferDir -no-split -buffer-name=templates -start-insert -input=.jade file<cr> | |
nnoremap <Leader>c :UniteWithBufferDir -no-split -buffer-name=controllers -start-insert -input=_ctrl.coffee file<cr> | |
" NERDTree | |
let NERDTreeQuitOnOpen = 1 | |
let g:NERDTreeWinSize = 80 | |
" Open NERDTree in the directory of the current file (or /home if no file is open) | |
nmap <silent> <C-n> :call NERDTreeToggleInCurDir()<cr> | |
function! NERDTreeToggleInCurDir() | |
" If NERDTree is open in the current buffer | |
if (exists("t:NERDTreeBufName") && bufwinnr(t:NERDTreeBufName) != -1) | |
exe ":NERDTreeClose" | |
else | |
exe ":NERDTreeFind" | |
endif | |
endfunction | |
" NERDCommenter | |
let NERDCreateDefaultMappings = 0 | |
let NERDSpaceDelims = 1 | |
nmap <C-_> <Plug>NERDCommenterToggle<cr> | |
vmap - <Plug>NERDCommenterToggle<cr> | |
" vim-indent-guides ( default binding is <Leader>ig ) | |
nnoremap <C-i> :IndentGuidesToggle<cr> | |
" vim-expand-region | |
vmap v <Plug>(expand_region_expand) | |
vmap <C-v> <Plug>(expand_region_expand) | |
nnoremap <Leader>e v<Plug>(expand_region_expand)<Plug>(expand_region_expand) | |
" Tabularize | |
vmap <silent> = :Tabularize /=<cr> | |
vmap <silent> ; :Tabularize /:\zs<cr> | |
" Extradite | |
let g:extradite_width = 200 | |
nnoremap <Leader>z :Extradite!<cr> | |
syntax on | |
set cursorline | |
set scrolloff=5 | |
" Make window navigation easier | |
map <C-h> <C-W>h | |
map <C-j> <C-W>j | |
map <C-k> <C-W>k | |
map <C-l> <C-W>l | |
set nottyfast |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment