1 TODO:
2 set nocompatible
3 set t_Co=256
4 syntax on
5 filetype off
6
7 set rtp+=~/.vim/bundle/Vundle.vim
8 call vundle#begin()
9
10
11 Plugin 'gmarik/Vundle.vim'
12
13
14 Plugin 'https://github.com/Valloric/YouCompleteMe'
15
16
17
18
19
20 Plugin 'https://github.com/vim-scripts/YankRing.vim'
21
22
23 Plugin 'https://github.com/sirver/UltiSnips'
24
25 Plugin 'https://github.com/honza/vim-snippets'
26
27
28 Plugin 'https://github.com/bling/vim-bufferline'
29
30 Plugin 'https://github.com/itchyny/lightline.vim'
31
32 Plugin 'https://github.com/tpope/vim-fugitive'
33
34
35 Plugin 'https://github.com/kien/rainbow_parentheses.vim'
36
37 au VimEnter * RainbowParenthesesToggle
38 au Syntax * RainbowParenthesesLoadRound
39 au Syntax * RainbowParenthesesLoadSquare
40 au Syntax * RainbowParenthesesLoadBraces
41
42
43
44 let g:rbpt_colorpairs = [
45 \ ['brown', 'RoyalBlue3'],
46 \ ['Darkblue', 'SeaGreen3'],
47 \ ['darkgray', 'DarkOrchid3'],
48 \ ['darkgreen', 'firebrick3'],
49 \ ['darkcyan', 'RoyalBlue3'],
50 \ ['darkred', 'SeaGreen3'],
51 \ ['darkmagenta', 'DarkOrchid3'],
52 \ ['brown', 'firebrick3'],
53 \ ['gray', 'RoyalBlue3'],
54 \ ['darkmagenta', 'DarkOrchid3'],
55 \ ['Darkblue', 'firebrick3'],
56 \ ['darkgreen', 'RoyalBlue3'],
57 \ ['darkcyan', 'SeaGreen3'],
58 \ ['darkred', 'DarkOrchid3'],
59 \ ['red', 'firebrick3'],
60 \ ]
61
62 if has("gui_running")
63
64 Plugin 'jaxbot/semantic-highlight.vim'
65 else
66
67 Plugin 'file:///home/hpatel/.vim/bundle/taghighlight'
68
69
70 Plugin 'file:///home/hpatel/.vim/bundle/easycolour'
71
72
73 set background=dark
74 endif
75
76
77
78 call vundle#end()
79
80 if has("gui_running")
81 set guifont=Inconsolata\ 12
82 colo molokai
83 else
84 colo bandit
85 endif
86
87 filetype plugin indent on
88 set tabstop=4
89 set shiftwidth=4
90 set backspace=indent,eol,start
91 set statusline=%<%f\%h%m%r%=%-20.(line=%l\ \ col=%c%V\ \ totlin=%L%)\ \ \%h%m%r%=%-40(bytval=0x%B,%n%Y%)\%P
92
93
94 cnoremap help tab help
95
96 map <silent> <C-Right> :bnext<CR>
97 map <silent> <C-Left> :bprev<CR>
98 map <silent> <C-h> :bprev<CR>
99 map <silent> <C-l> :bnext<CR>
100
101
102
103 map <silent> <UP> g<UP>
104 map <silent> <DOWN> g<DOWN>
105 map <silent> j gj
106 map <silent> k gk
107
108 noremap <Up> <NOP>
109 noremap <Down> <NOP>
110 noremap <Left> <NOP>
111 noremap <Right> <NOP>
112
113
114 set noerrorbells
115 set novisualbell
116
117
118 set wildmenu
119
120 set wildignore=*.o,*.so,*.pyc
121
122
123
124
125
126
127
128
129 :cnoremap s/ s/\v
130
131
132 autocmd BufReadPost *
133 \ if line("'\"") > 0 && line("'\"") <= line("$") |
134 \ exe "normal! g`\"" |
135 \ endif
136
137
138 map <silent> ss :setlocal spell!<cr>
139
140
141 set list
142 set listchars=tab:>-,trail:-
143
144
145
146
147
148
149 set scrolloff=10
150
151
152 set showcmd
153
154
155
156 set ignorecase
157 set smartcase
158
159
160
161 let g:syntastic_auto_loc_list=1
162
163
164 let g:syntastic_enable_signs=1
165
166 let g:syntastic_check_on_open=1
167
168
169 let g:UltiSnipsExpandTrigger="<c-j>"
170 let g:UltiSnipsListSnippets="<c-tab>"
171 let g:UltiSnipsJumpForwardTrigger="<c-j>"
172 let g:UltiSnipsJumpBackwardTrigger="<c-k>"
173
174
175 nnoremap <silent> <F4> :YRShow<CR>
176
177
178 let g:bufferline_echo = 1
179
180
181 set laststatus=2
182 let g:lightline = {
183 \ 'colorscheme': 'wombat',
184 \ 'active': {
185 \ 'left': [ [ 'mode', 'paste' ],
186 \ [ 'fugitive', 'readonly', 'filename', 'modified' ] ]
187 \ },
188 \ 'component': {
189 \ 'readonly': '%{&filetype=="help"?"":&readonly?"ReadOnly":""}',
190 \ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
191 \ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'
192 \ },
193 \ 'component_function': {
194 \ 'fugitive': 'MyFugitive'
195 \ },
196 \ 'component_visible_condition': {
197 \ 'readonly': '(&filetype!="help"&& &readonly)',
198 \ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))',
199 \ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())'
200 \ },
201 \ 'separator': { 'left': '>>', 'right': '<<' },
202 \ 'subseparator': { 'left': '>', 'right': '<' }
203 \ }
204
205 function! MyFugitive()
206 if exists("*fugitive#head")
207 let _ = fugitive#head()
208 return strlen(_) ? '⎇ '._ : ''
209 endif
210 return ''
211 endfunction
212
213
214
215
216
217 augroup FastEscape
218 autocmd!
219 au InsertEnter * set timeoutlen=0
220 au InsertLeave * set timeoutlen=1000
221 augroup END
222
223
224 set noshowmode
225
226
227
228
229
230
231 set number
232 set relativenumber
233 nnoremap <silent> <F5> :set relativenumber!<CR>
234
235
236 set nofoldenable
237
238
239 if has('mouse')
240 set mouse=a
241 endif
242
243
244 inoremap <silent><C-S> <C-O>:update<CR>
245 nnoremap <silent><C-S> :update<CR>
246 noremap <silent>; :
247 set nowrap
248
249 nnoremap Y y$
250