Load Neobundle, configure it, configure plugins
This commit is contained in:
parent
30eb46849b
commit
bd749b79d0
4 changed files with 59 additions and 0 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +1,6 @@
|
||||||
[submodule "bundle/neobundle.vim"]
|
[submodule "bundle/neobundle.vim"]
|
||||||
path = bundle/neobundle.vim
|
path = bundle/neobundle.vim
|
||||||
url = https://github.com/Shougo/neobundle.vim.git
|
url = https://github.com/Shougo/neobundle.vim.git
|
||||||
|
[submodule "bundle/vimproc.vim"]
|
||||||
|
path = bundle/vimproc.vim
|
||||||
|
url = https://github.com/Shougo/vimproc.vim.git
|
||||||
|
|
1
bundle/vimproc.vim
Submodule
1
bundle/vimproc.vim
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 04b45cd80f48f66daed04a1a48a7ea4e7d316086
|
|
@ -13,6 +13,22 @@ endif
|
||||||
|
|
||||||
call neobundle#begin( s:bundles_dir )
|
call neobundle#begin( s:bundles_dir )
|
||||||
|
|
||||||
|
" Load NeoBundle itself, as well as VimProc
|
||||||
NeoBundleFetch 'Shougo/neobundle.vim'
|
NeoBundleFetch 'Shougo/neobundle.vim'
|
||||||
|
NeoBundle 'Shougo/vimproc.vim', {
|
||||||
|
\ 'build' : {
|
||||||
|
\ 'windows' : 'tools\\update-dll-mingw',
|
||||||
|
\ 'cygwin' : 'make -f make_cygwin.mak',
|
||||||
|
\ 'mac' : 'make -f make_mac.mak',
|
||||||
|
\ 'linux' : 'make',
|
||||||
|
\ 'unix' : 'gmake',
|
||||||
|
\ },
|
||||||
|
\ }
|
||||||
|
|
||||||
|
" Load all plugins from bundles-init/*.load
|
||||||
|
let s:binit_dir = g:vim_home . "/bundles-init"
|
||||||
|
for s:plfn in glob( s:binit_dir . "/*.load.vim" , 0 , 1 )
|
||||||
|
execute "source" s:plfn
|
||||||
|
endfor
|
||||||
|
|
||||||
call neobundle#end()
|
call neobundle#end()
|
||||||
|
|
39
config-bits/50-install-bundles.vim
Normal file
39
config-bits/50-install-bundles.vim
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
" Force NeoBundle to check the loaded plugins and install them
|
||||||
|
|
||||||
|
" Save current filetype settings
|
||||||
|
let s:has_ft = exists( "did_load_filetypes" )
|
||||||
|
let s:has_fti = exists( "did_indent_on" )
|
||||||
|
let s:has_ftp = exists( "did_load_ftplugin" )
|
||||||
|
|
||||||
|
" Enable filetype with both indent and plugins
|
||||||
|
if !( s:has_ft && s:has_fti && s:has_ftp )
|
||||||
|
filetype plugin indent on
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Let NeoBundle check for installations
|
||||||
|
NeoBundleCheck
|
||||||
|
|
||||||
|
" Call hooks on reload
|
||||||
|
if !has( "vim_starting" )
|
||||||
|
call neobundle#call_hook( "on_source" )
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Load configuration files for all installed plugins
|
||||||
|
let s:binit_dir = g:vim_home . "/bundles-init"
|
||||||
|
for s:pcfn in glob( s:binit_dir . "/*.cfg.vim" , 0 , 1 )
|
||||||
|
let s:pname = fnamemodify( s:pcfn , ":t:r:r" )
|
||||||
|
if neobundle#is_installed( s:pname )
|
||||||
|
execute "source" s:pcfn
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
" Restore filetype settings
|
||||||
|
if ! s:has_fti
|
||||||
|
filetype indent off
|
||||||
|
endif
|
||||||
|
if ! s:has_ftp
|
||||||
|
filetype plugin off
|
||||||
|
endif
|
||||||
|
if ! s:has_ft
|
||||||
|
filetype off
|
||||||
|
endif
|
Loading…
Reference in a new issue