Created
June 9, 2015 18:23
-
-
Save codedmart/6d863f05a641e0929a6d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'kien/ctrlp.vim' | |
| Plugin 'Valloric/ListToggle' | |
| Plugin 'mileszs/ack.vim' | |
| Plugin 'rking/ag.vim' | |
| Plugin 'danchoi/ruby_bashrockets.vim' | |
| Plugin 'duff/vim-bufonly' | |
| Plugin 'Valloric/YouCompleteMe' | |
| Plugin 'leshill/vim-json' | |
| Plugin 'bling/vim-airline' | |
| Plugin 'edkolev/tmuxline.vim' | |
| Plugin 'christoomey/vim-tmux-navigator' | |
| Plugin 'tommcdo/vim-exchange' | |
| Plugin 'sirver/ultisnips' | |
| Plugin 'honza/vim-snippets' | |
| Plugin 'spiroid/vim-ultisnip-scala' | |
| Plugin 'scrooloose/nerdcommenter' | |
| Plugin 'scrooloose/nerdtree' | |
| Plugin 'scrooloose/syntastic' | |
| Plugin 'xolox/vim-session' | |
| Plugin 'xolox/vim-misc' | |
| Plugin 'vim-ruby/vim-ruby' | |
| Plugin 'vim-scripts/yaml.vim' | |
| Plugin 'tpope/vim-fugitive' | |
| Plugin 'tpope/vim-dispatch' | |
| Plugin 'tpope/vim-git' | |
| Plugin 'tpope/vim-haml' | |
| Plugin 'tpope/vim-markdown' | |
| Plugin 'tpope/vim-rails' | |
| Plugin 'tpope/vim-rake' | |
| Plugin 'tpope/vim-bundler' | |
| Plugin 'tpope/vim-repeat' | |
| Plugin 'tpope/vim-surround' | |
| Plugin 'tpope/vim-unimpaired' | |
| Plugin 'airblade/vim-gitgutter' | |
| Plugin 'vim-scripts/Align' | |
| Plugin 'bronson/vim-trailing-whitespace' | |
| Plugin 'edsono/vim-matchit' | |
| Plugin 'sjl/gundo.vim' | |
| Plugin 'henrik/vim-qargs' | |
| Plugin 'terryma/vim-multiple-cursors' | |
| Plugin 'nono/vim-handlebars' | |
| Plugin 'groenewege/vim-less' | |
| Plugin 'jiangmiao/auto-pairs' | |
| Plugin 'pangloss/vim-javascript' | |
| Plugin 'mxw/vim-jsx' | |
| Plugin 'leafgarland/typescript-vim' | |
| Plugin 'jason0x43/vim-js-indent' | |
| Plugin 'mattn/emmet-vim' | |
| Plugin 'embear/vim-localvimrc', {'v': '2.2.0'} | |
| Plugin 'fatih/vim-go' | |
| Plugin 'derekwyatt/vim-scala' | |
| Plugin 'derekwyatt/vim-sbt' | |
| Plugin 'dag/vim2hs' | |
| Plugin 'raichoo/haskell-vim' | |
| Plugin 'rizzatti/dash.vim' | |
| Plugin 'spwhitt/vim-nix' | |
| "colorschemes | |
| Plugin 'chriskempson/base16-vim' | |
| Plugin 'morhetz/gruvbox' | |
| Plugin 'nanotech/jellybeans.vim' | |
| Plugin 'altercation/vim-colors-solarized' | |
| Plugin 'jpo/vim-railscasts-theme' | |
| call vundle#end() | |
| filetype plugin indent on | |
| " -------------------- General -------------------- " | |
| set t_Co=256 | |
| set secure "locks down the exrc setting | |
| set exrc "enable cwd .vimrc files | |
| set encoding=utf8 | |
| syntax on | |
| set wrap | |
| set linebreak | |
| set textwidth=0 | |
| set wrapmargin=0 | |
| set formatoptions+=l | |
| set nofoldenable | |
| set backspace=indent,eol,start | |
| set tabstop=4 | |
| set softtabstop=4 | |
| set shiftwidth=4 | |
| set expandtab | |
| set autoindent | |
| set cinoptions=(s,m1,)200,j1,J1 | |
| set vb | |
| set t_vb="" | |
| set t_ut= | |
| set history=1000 | |
| set undofile | |
| set undodir=/tmp | |
| set backup | |
| set swapfile | |
| set backupdir=/tmp | |
| set directory=/tmp | |
| set complete=.,w,k,b,u,t,i | |
| set completeopt=menu | |
| "set shellcmdflag=-ic | |
| let $BASH_ENV = "~/.bash_aliases" | |
| let mapleader="," | |
| " -------------------- Layout -------------------- " | |
| set number | |
| set laststatus=2 | |
| set ruler | |
| autocmd BufReadPost fugitive://* set bufhidden=delete | |
| set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P | |
| set listchars=tab:▶━,trail:⌴,extends:▶,precedes:◀ | |
| set splitbelow | |
| set splitright | |
| set background=dark | |
| "colorscheme solarized | |
| "colorscheme railscasts | |
| " jellybeans | |
| "let g:jellybeans_overrides = { | |
| "\ 'Normal': { 'guibg': '444444'}, | |
| "\} | |
| "colorscheme jellybeans | |
| "let g:jellybeans_use_lowcolor_black = 0 | |
| " gruvbox | |
| "colorscheme gruvbox | |
| "if !has("gui_running") | |
| "let g:gruvbox_italic=0 | |
| "endif | |
| " Base-16 Eighties | |
| colorscheme base16-eighties | |
| let base16colorspace=256 " Access colors present in 256 colorspace | |
| " Tomorrow | |
| "colorscheme tomorrow-night-eighties | |
| syn on | |
| silent! set colorcolumn=120 | |
| function! SyntaxItem() | |
| return synIDattr(synID(line("."),col("."),1),"name") | |
| endfunction | |
| function! ChangeToSingleQuotes() | |
| :%s/\"\([^"]*\)\"/'\1'/g | |
| endfunction | |
| function! ChangeToDoubleQuotes() | |
| :%s/\'\([^']*\)\'/"\1"/g | |
| endfunction | |
| nnoremap <leader>' :call ChangeToSingleQuotes()<cr> | |
| nnoremap <leader>" :call ChangeToDoubleQuotes()<cr> | |
| " -------------------- Plugins -------------------- " | |
| let g:localvimrc_ask=0 | |
| let g:syntastic_quiet_messages = {'level': 'warnings'} | |
| let g:syntastic_always_populate_loc_list = 1 | |
| "let g:SuperTabNoCompleteAfter=['^', ',', '\s'] | |
| let g:syntastic_html_tidy_ignore_errors=[" proprietary attribute \"ng-"] | |
| "let g:syntastic_typescript_tsc_args="-m commonjs -t ES5" | |
| let g:syntastic_typescript_checkers=['tsc', 'tslint'] | |
| let g:syntastic_typescript_tslint_exec="/Users/bmartin/.nvm/v0.10.32/bin/tslint" | |
| let g:syntastic_javascript_checkers = ['jsxhint'] | |
| let g:syntastic_aggregate_errors = 1 | |
| let g:syntastic_error_symbol = '✗' | |
| let g:syntastic_style_error_symbol = '✠' | |
| let g:syntastic_warning_symbol = '∆' | |
| let g:syntastic_style_warning_symbol = '≈' | |
| silent! sign define SyntasticError text=!> | |
| silent! sign define SyntasticWarning text=W> | |
| "map <Leader>s :SyntasticToggleMode<CR> | |
| " ListToggle | |
| let g:lt_location_list_toggle_map = '<leader>l' | |
| let g:lt_quickfix_list_toggle_map = '<leader>q' | |
| " Fugative | |
| map <silent> <Leader>s :Gstatus<CR> | |
| " Ctrlp | |
| nnoremap <leader>b :CtrlPBuffer<cr> | |
| nnoremap <leader>r :CtrlPMRU<cr> | |
| nnoremap <leader>m :CtrlPMixed<cr> | |
| let g:ctrlp_custom_ignore = { | |
| \ 'dir': '\.git$\|\.hg$\|dist\|node_modules' | |
| \ } | |
| " UltiSnips | |
| let g:UltiSnipsExpandTrigger ="<tab>" | |
| let g:UltiSnipsJumpForwardTrigger = "<tab>" | |
| let g:UltiSnipsJumpBackwardTrigger = "<s-tab>" | |
| " Enable tabbing through list of results | |
| function! g:UltiSnips_Complete() | |
| call UltiSnips#ExpandSnippet() | |
| if g:ulti_expand_res == 0 | |
| if pumvisible() | |
| return "\<C-n>" | |
| else | |
| call UltiSnips#JumpForwards() | |
| if g:ulti_jump_forwards_res == 0 | |
| return "\<TAB>" | |
| endif | |
| endif | |
| endif | |
| return "" | |
| endfunction | |
| au InsertEnter * exec "inoremap <silent> " . g:UltiSnipsExpandTrigger . " <C-R>=g:UltiSnips_Complete()<cr>" | |
| " Expand snippet or return | |
| let g:ulti_expand_res = 0 | |
| function! Ulti_ExpandOrEnter() | |
| call UltiSnips#ExpandSnippet() | |
| if g:ulti_expand_res | |
| return '' | |
| else | |
| return "\<return>" | |
| endfunction | |
| " Set <space> as primary trigger | |
| inoremap <return> <C-R>=Ulti_ExpandOrEnter()<CR> | |
| let g:UltiSnipsEditSplit="vertical" | |
| " Whitespace mappings | |
| nnoremap <leader>fw :FixWhitespace<cr> | |
| " Airline | |
| if !exists('g:airline_symbols') | |
| let g:airline_symbols = {} | |
| endif | |
| let g:airline_theme = 'base16' | |
| let g:airline#extensions#branch#enabled = 1 | |
| let g:airline#extensions#syntastic#enabled = 1 | |
| " vim-powerline symbols | |
| "let g:airline_left_sep = '▶' | |
| "let g:airline_left_alt_sep = '»' | |
| "let g:airline_right_sep = '◀' | |
| "let g:airline_right_alt_sep = '«' | |
| let g:airline_left_sep = '⮀' | |
| let g:airline_left_alt_sep = '⮁' | |
| let g:airline_right_sep = '⮂' | |
| let g:airline_right_alt_sep = '⮃' | |
| let g:airline_symbols.branch = '⭠' | |
| let g:airline_symbols.readonly = '⭤' | |
| let g:airline_symbols.liner = '⭡'" | |
| " Tmuxline | |
| let g:tmuxline_preset = { | |
| \'a' : '#S', | |
| \'win' : '#I #W', | |
| \'cwin' : '#I #W', | |
| \'z' : '%b %d %Y %l:%M %p'} | |
| "let g:tmuxline_preset = { | |
| "\'a' : '#S', | |
| "\'b' : '#W', | |
| "\'c' : '#H', | |
| "\'win' : '#I #W', | |
| "\'cwin' : '#I #W', | |
| "\'x' : '%a', | |
| "\'y' : '%R', | |
| "\'z' : '#H'} | |
| let g:tmuxline_powerline_separators = 0 | |
| "let g:tmuxline_separators = { | |
| "\ 'left' : '▶', | |
| "\ 'left_alt': '»', | |
| "\ 'right' : '◀', | |
| "\ 'right_alt' : '«', | |
| "\ 'space' : ' '} | |
| " Sessions | |
| set ssop+=buffers,tabpages | |
| let g:session_autosave = 'yes' | |
| let g:session_directory = '~/.vim/sessions' | |
| " Change which file opens after executing :Rails command | |
| let g:rails_default_file = 'Gemfile' | |
| " NERDTree mappings | |
| nnoremap <leader>N :NERDTree<cr> | |
| nnoremap <leader>n :NERDTreeToggle<cr> | |
| nnoremap <leader>nf :NERDTreeFind<cr> | |
| " Ack.vim mappings | |
| nmap <Leader>a :Ag<space> | |
| "nnoremap <leader>fi :Ack --ruby | |
| "nnoremap <leader>f/ :AckFromSearch --ruby<cr> | |
| "nnoremap <leader>fq :cclose<cr> | |
| "nnoremap <leader>fo :copen<cr> | |
| " Hashrocket | |
| nnoremap <leader>hr :Hashrockets<cr> | |
| nnoremap <leader>hr :Bashrockets<cr> | |
| vnoremap <leader>hr :Hashrockets<cr> | |
| vnoremap <leader>hr :Bashrockets<cr> | |
| iabbrev hh => | |
| " Gundo | |
| nnoremap <leader>g :GundoToggle<CR> | |
| " -------------------- Search -------------------- " | |
| set hlsearch | |
| set incsearch | |
| set smartcase | |
| set ignorecase | |
| " -------------------- General -------------------- " | |
| set mouse=a | |
| set hidden | |
| set scrolloff=5 | |
| set scrolljump=5 | |
| set sidescrolloff=10 | |
| set sidescroll=1 | |
| set wildmenu | |
| set showmatch | |
| set matchtime=2 | |
| set cursorline | |
| "set cursorcolumn | |
| " -------------------- Custom Mappings -------------------- " | |
| nnoremap <silent> <Tab> :wincmd w<cr> | |
| nnoremap <silent> <S-Tab> :wincmd W<cr> | |
| " Move around splits with <c-hjkl> | |
| nnoremap <c-j> <c-w>j | |
| nnoremap <c-k> <c-w>k | |
| nnoremap <c-h> <c-w>h | |
| nnoremap <c-l> <c-w>l | |
| " Bubble single lines | |
| nmap <C-Up> [e | |
| nmap <C-Down> ]e | |
| " Bubble multiple lines | |
| vmap <C-Up> [egv | |
| vmap <C-Down> ]egv | |
| " Copy & Paste stuff | |
| let &t_SI .= "\<Esc>[?2004h" | |
| let &t_EI .= "\<Esc>[?2004l" | |
| inoremap <special> <expr> <Esc>[200~ XTermPasteBegin() | |
| function! XTermPasteBegin() | |
| set pastetoggle=<Esc>[201~ | |
| set paste | |
| return "" | |
| endfunction | |
| vnoremap <C-C> "+y | |
| noremap <C-D> <ESC>"+gP | |
| inoremap <C-D> <ESC>"+gPi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment