-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
182 lines (144 loc) · 4.36 KB
/
vimrc
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
set nocompatible " be iMproved
"filetype off " required!
syntax on
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Bundle 'tpope/vim-rails.git'
Plugin 'L9'
Bundle 'Valloric/YouCompleteMe'
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'FuzzyFinder'
Bundle 'AutoClose'
Bundle 'https://github.com/vim-scripts/EasyMotion.git'
Bundle 'https://github.com/vim-scripts/taglist.vim.git'
Bundle "git://github.com/sophacles/vim-bundle-sparkup.git"
Bundle 'https://github.com/vim-scripts/php.vim-html-enhanced.git'
Bundle "https://github.com/scrooloose/nerdtree.git"
Bundle 'https://github.com/ervandew/supertab.git'
Bundle 'git://github.com/scrooloose/nerdcommenter.git'
Bundle 'https://github.com/altercation/vim-colors-solarized.git'
Bundle 'git://github.com/kien/ctrlp.vim.git'
Bundle 'https://github.com/Shougo/neocomplcache.git'
Bundle 'https://github.com/kchmck/vim-coffee-script.git'
Bundle 'git://github.com/majutsushi/tagbar.git'
Bundle 'git://github.com/vim-scripts/EasyGrep.git'
Bundle 'git://github.com/tpope/vim-surround.git'
Bundle 'git://github.com/mattn/gist-vim.git'
Bundle 'vim-ruby/vim-ruby'
Bundle 'thoughtbot/vim-rspec'
Plugin 'mileszs/ack.vim'
call vundle#end() " required
filetype plugin indent on " required
syntax on
if has('gui_running')
syntax enable
set background=light
colorscheme solarized
endif
" ---------------------------------------------------------------------------
" General
" ---------------------------------------------------------------------------
" Set up syntastic
""let g:syntastic_echo_current_error=1
""let g:syntastic_enable_signs=1
""let g:syntastic_enable_highlighting = 1
""let g:syntastic_auto_loc_list=1
""let g:syntastic_auto_jump=1
" Set up status line
set laststatus=2
" Broken down into easily includeable segments
set statusline=%<%f\ " Filename
set statusline+=%w%h%m%r " Options
set statusline+=%{fugitive#statusline()} " Git Hotness
set statusline+=\ [%{&ff}/%Y] " filetype
set statusline+=\ [%{getcwd()}] " current dir
set statusline+=%#warningmsg#
"set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
set statusline+=%=%-14.(%l,%c%V%)\ %p%% " Right aligned file nav info
" Setup tabs
set tabstop=4
set shiftwidth=4
set softtabstop=4
let mapleader = ","
let g:mapleader = ","
set cursorline
set ruler
set ttyfast
" Add coloring for easymotion..
hi link EasyMotionTarget ErrorMsg
hi link EasyMotionShade Comment
"set fugitve into the mixgitive links
nnoremap <silent> <leader>gs :Gstatus<CR>
nnoremap <silent> <leader>gd :Gdiff<CR>
nnoremap <silent> <leader>gc :Gcommit<CR>
nnoremap <silent> <leader>gb :Gblame<CR>
nnoremap <silent> <leader>gl :Glog<CR>
nnoremap <silent> <leader>gp :Git push<CR>
" turn off tabs
set nolist
" save buffer when switching out of it
set autowrite
" quickly switch between buffers
nnoremap <leader><leader> <c-^>
" remap escape
imap jj <ESC>
" Auto format
map === mmgg=G`m^zz
"close buffer
nmap <leader>d :bd<CR>
" Toggle taglist
nmap <leader> l :TagbarToggle<CR>
" close all buffers
nmap <leader>D :bufdo bd<CR>
"saving and exit
nmap <leader>q :wqa!<CR>
nmap <leader>w :w!<CR>
nmap <leader><Esc> :q!<CR>
" Nerd Tree Settings
let NERDTreeShowBookmarks = 0
let NERDChristmasTree = 1
let NERDTreeWinPos = "left"
let NERDTreeHijackNetrw = 1
let NERDTreeQuitOnOpen = 1
let NERDTreeWinSize = 50
" open file browser
map <leader>p :NERDTreeToggle<cr>
"tags
set tags=./tags;
set tags+=gems.tags
map <leader>L :TlistToggle <cr>
let Tlist_Use_Right_Window = 1
let Tlist_WinWidth = 60
"
"autocomplete
set complete=.,w,b,u,t,i
"find buffer
nmap <silent> <leader>b :FufBuffer<CR>
" View routes or Gemfile in large split
map <leader>gr :topleft :split config/routes.rb<cr>
map <leader>gg :topleft 100 :split Gemfile<cr>
" Skip to Model, View or Controller
map <Leader>m :Emodel
map <Leader>v :Eview
map <Leader>c :Econtroller
" Set up Rails Test
let g:rubytest_in_quickfix = 1
set visualbell
set guifont=Source\ Code\ Pro:h14
set guioptions-=T guioptions-=e guioptions-=L guioptions-=r
set shell=bash
set number
set ignorecase
set nowrap
set nolist
set incsearch
set hlsearch
let g:ackprg = 'ag --nogroup --nocolor --column'
if filereadable(expand('~/.vimrc.local'))
source ~/.vimrc.local
endif