Skip to content

Commit ce9b834

Browse files
committedJul 25, 2015
add vundle & YouCompleteMe
Signed-off-by: badwtg1111 <[email protected]>
1 parent 1f68cce commit ce9b834

File tree

1 file changed

+48
-14
lines changed

1 file changed

+48
-14
lines changed
 

‎.vimrc

+48-14
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,20 @@ endif
2020
" Required:
2121
call neobundle#begin(expand('~/.vim/bundle/'))
2222

23+
let g:neobundle#install_process_timeout = 1500
24+
2325
" Let NeoBundle manage NeoBundle
2426
" Required:
2527
NeoBundleFetch 'Shougo/neobundle.vim'
2628

29+
"NeoBundle 'Valloric/YouCompleteMe', {
30+
"\ 'build' : {
31+
"\ 'mac' : './install.sh --clang-completer --system-libclang --omnisharp-completer',
32+
"\ 'unix' : './install.sh --clang-completer --system-libclang --omnisharp-completer --gocode-completer',
33+
"\ 'windows' : './install.sh --clang-completer --system-libclang --omnisharp-completer',
34+
"\ 'cygwin' : './install.sh --clang-completer --system-libclang --omnisharp-completer'
35+
"\ }
36+
"\ }
2737

2838
NeoBundle 'Shougo/unite.vim'
2939
NeoBundle 'Shougo/neomru.vim'
@@ -189,6 +199,7 @@ NeoBundle 'godlygeek/tabular'
189199
NeoBundle 'plasticboy/vim-markdown'
190200
NeoBundle 'ashisha/image.vim'
191201
NeoBundle 'chrisbra/vim-diff-enhanced'
202+
NeoBundle 'gmarik/Vundle.vim'
192203

193204
" My Bundles here:
194205
" Refer to |:NeoBundle-examples|.
@@ -209,19 +220,28 @@ NeoBundleCheck
209220
"}}}
210221

211222

212-
"------------------------------------------------------------------------------
213-
"for Vundle {{{
214-
"set nocompatible " be iMproved, required
215-
"filetype off " required
223+
" Vundle.vim {{{
224+
set nocompatible " be iMproved, required
225+
filetype off " required
226+
227+
" Setup RTP:
228+
let s:vimfiles = ""
229+
if has("win32") || has("win64")
230+
let s:vimfiles = "$VIM/vimfiles/"
231+
else
232+
let s:vimfiles = "~/.vim/"
233+
endif
234+
216235

217236
" set the runtime path to include Vundle and initialize
237+
let &runtimepath .= ',' . expand(s:vimfiles . "bundle/Vundle.vim/")
218238
"set rtp+=~/.vim/bundle/Vundle.vim
219239
"call vundle#begin()
220240
" alternatively, pass a path where Vundle should install plugins
221-
"call vundle#begin('~/some/path/here')
241+
call vundle#begin(expand(s:vimfiles . "bundle/"))
222242

223243
" let Vundle manage Vundle, required
224-
"Plugin 'gmarik/Vundle.vim'
244+
Plugin 'gmarik/Vundle.vim'
225245

226246
" The following are examples of different formats supported.
227247
" Keep Plugin commands between vundle#begin/end.
@@ -239,22 +259,28 @@ NeoBundleCheck
239259
" Avoid a name conflict with L9
240260
"Plugin 'user/L9', {'name': 'newL9'}
241261

262+
Plugin 'Valloric/YouCompleteMe'
263+
264+
265+
266+
267+
242268
" All of your Plugins must be added before the following line
243-
"call vundle#end() " required
244-
"filetype plugin indent on " required
269+
call vundle#end() " required
270+
filetype plugin indent on " required
245271
" To ignore plugin indent changes, instead use:
246272
"filetype plugin on
247273
"
248274
" Brief help
249-
" :PluginList - list configured plugins
250-
" :PluginInstall(!) - install (update) plugins
251-
" :PluginSearch(!) foo - search (or refresh cache first) for foo
252-
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins
275+
" :PluginList - lists configured plugins
276+
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
277+
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
278+
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
253279
"
254280
" see :h vundle for more details or wiki for FAQ
255281
" Put your non-Plugin stuff after this line
256-
" }}}
257-
"--------------------------------------------------------------------------------
282+
"}}} end Vundle.vim
283+
258284

259285

260286
" Setting colorscheme
@@ -1695,3 +1721,11 @@ nnoremap sf :CtrlPF<Cr>
16951721
"}}}
16961722

16971723
nnoremap va :colo adrian<CR>
1724+
1725+
" for YouCompleteMe {{{
1726+
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
1727+
let g:ycm_collect_identifiers_from_tags_files = 1
1728+
let g:ycm_seed_identifiers_with_syntax = 1
1729+
let g:ycm_confirm_extra_conf = 0
1730+
" }}} end YouCompleteMe
1731+

0 commit comments

Comments
 (0)
Please sign in to comment.