Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 201 lines (176 sloc) 4.739 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
" security
set secure
set nomodeline

" start Neobundle
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim/
call neobundle#rc(expand("~/.vim/bundle"))
NeoBundleFetch "Shougo/neobundle.vim"

" plugins with no config
NeoBundle "sjl/vitality.vim"
NeoBundle "sheerun/vim-polyglot"
NeoBundle "editorconfig/editorconfig-vim"
NeoBundle "flazz/vim-colorschemes"
NeoBundle "tpope/vim-commentary"
NeoBundle "tpope/vim-endwise"
NeoBundle "tpope/vim-fugitive"
NeoBundle "tpope/vim-repeat"
NeoBundle "bling/vim-bufferline"
NeoBundle "kshenoy/vim-signature"

" reasonable defaults
set backspace=indent,eol,start
set autoread
set autochdir
set history=1000
set viminfo^=!
nnoremap Y y$
nnoremap 0 ^
nnoremap - $
set wildignore+=*.o,*.out,*.obj,.git,*.rbc,*.rbo,*.class,.svn,*.gem
set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz
set wildignore+=*/vendor/gems/*,*/vendor/cache/*,*/.bundle/*,*/.sass-cache/*
set wildignore+=*.swp,*~,._*
if has('cryptmethod')
  set cryptmethod=blowfish
endif
set mouse=a

" indenting
set autoindent
set shiftround

" better <Esc>
set ttimeout
set ttimeoutlen=50

" search
set ignorecase
set smartcase
set incsearch
set hlsearch
set gdefault

" display stuff
set laststatus=2
set ruler
set showcmd
set number
set title
set noerrorbells
set visualbell
set t_Co=256
if has("syntax")
  syntax on
  colorscheme wombat256mod
  set synmaxcol=1000
endif
set nolist
set listchars=tab:▸\ ,eol,trail:·,nbsp:·
if has("gui_running")
  set guifont=Source\ Code\ Pro:h14
  set antialias
  set guioptions-=T
  set guioptions-=r
  set guioptions-=L
  highlight Cursor guifg=black guibg=grey
  set guicursor=n-c-v:block-Cursor-blinkon0
  set guicursor+=i:ver10-Cursor
endif

" wildin'
set nowildmenu

" cursor position
set cursorline
set scrolloff=4
set sidescroll=1
set sidescrolloff=15

" better wrapping
set wrap linebreak
set showbreak=" "

" switch to a tab
set switchbuf=usetab

" Git commit messages with spelling and automatic insert mode
if has('spell')
  au BufNewFile,BufRead COMMIT_EDITMSG setlocal spell
endif
au BufNewFile,BufRead COMMIT_EDITMSG call feedkeys('ggi', 't')

" leader stuff
let mapleader = "\<Space>"
nnoremap <Leader>h :noh<CR>
nmap <Leader><Leader> :w<CR>:noh<CR>

" better vertical movement
vmap j gj
vmap k gk
nmap j gj
nmap k gk

" these trip me up
nnoremap Q <nop>

" change buffers
set hidden
nnoremap <Leader>1 :b1<CR>
nnoremap <Leader>2 :b2<CR>
nnoremap <Leader>3 :b3<CR>
nnoremap <Leader>4 :b4<CR>
nnoremap <Leader>5 :b5<CR>
nnoremap <Leader>6 :b6<CR>
nnoremap <Leader>7 :b7<CR>
nnoremap <Leader>8 :b8<CR>
nnoremap <Leader>9 :b9<CR>

" not sure why this was happening...
nnoremap <Esc> <nop>

" Airline
NeoBundle "bling/vim-airline"
let g:airline_theme="powerlineish"
let g:airline_left_sep = ""
let g:airline_right_sep = ""
let g:airline_section_b = ""
let g:airline_section_x = ""
let g:airline_section_y = ""

" ctrl-p
NeoBundle "kien/ctrlp.vim"
let g:ctrlp_user_command = [".git", "cd %s && git ls-files . -co --exclude-standard", "find %s -type f"]
let g:ctrlp_use_caching = 0
let g:ctrlp_clear_cache_on_exit = 0

" NerdTree
NeoBundle "scrooloose/nerdtree"
map <Leader>k :NERDTreeToggle<CR>
autocmd vimenter * if !argc() | NERDTree | endif
autocmd BufEnter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary")

" Syntastic
NeoBundle "scrooloose/syntastic"
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_enable_signs = 1
let g:syntastic_auto_loc_list = 2
let g:syntastic_cpp_check_header = 1
let g:syntastic_cpp_no_include_search = 1
let g:syntastic_javascript_checkers = ["jshint"]
let g:syntastic_javascript_jshint_conf = "$HOME/.jshintrc"
let g:syntastic_html_jshint_conf = "$HOME/.jshintrc"
let g:syntastic_cpp_compiler = "g++"
let g:syntastic_cpp_compiler_options = " -std=c++11"
let g:syntastic_java_checkers = []
if has("unix")
let g:syntastic_error_symbol = "★"
let g:syntastic_style_error_symbol = ">"
let g:syntastic_warning_symbol = "!"
let g:syntastic_style_warning_symbol = ">"
else
let g:syntastic_error_symbol = "!"
let g:syntastic_style_error_symbol = ">"
let g:syntastic_warning_symbol = "."
let g:syntastic_style_warning_symbol = ">"
endif

" autocomplete
NeoBundle "Shougo/neocomplcache"
NeoBundle "Shougo/neosnippet"
NeoBundle "honza/vim-snippets"
NeoBundle "Shougo/echodoc.vim"
let g:acp_enableAtStartup = 0
let g:neocomplcache_enable_at_startup = 1
let g:neocomplcache_enable_smart_case = 1
let g:neocomplcache_min_syntax_length = 2
let g:neocomplcache_enable_auto_select = 1
let g:neocomplcache_max_list = 12

" finish up Neobundle
filetype plugin indent on
NeoBundleCheck

" ~/.vimrc_local if you have it
if filereadable(expand("~/.vimrc_local"))
source ~/.vimrc_local
endif
Something went wrong with that request. Please try again.