2017-12-12 16:32:21 +08:00
|
|
|
"=============================================================================
|
|
|
|
" main.vim --- Main file of SpaceVim
|
|
|
|
" Copyright (c) 2016-2017 Shidong Wang & Contributors
|
|
|
|
" Author: Shidong Wang < wsdjeg at 163.com >
|
|
|
|
" URL: https://spacevim.org
|
2018-02-15 22:25:03 +08:00
|
|
|
" License: GPLv3
|
2017-12-12 16:32:21 +08:00
|
|
|
"=============================================================================
|
|
|
|
|
2018-02-22 21:15:46 +08:00
|
|
|
" Detect root directory of SpaceVim
|
|
|
|
let g:_spacevim_root_dir = fnamemodify(expand('<sfile>'),
|
2017-08-16 06:09:25 +08:00
|
|
|
\ ':p:h:gs?\\?'.((has('win16') || has('win32')
|
|
|
|
\ || has('win64'))?'\':'/') . '?')
|
2018-02-22 21:15:46 +08:00
|
|
|
lockvar g:_spacevim_root_dir
|
2016-12-26 21:11:19 +08:00
|
|
|
try
|
2018-02-22 21:15:46 +08:00
|
|
|
call SpaceVim#begin()
|
2016-12-26 21:11:19 +08:00
|
|
|
catch
|
2018-02-22 21:15:46 +08:00
|
|
|
" Update the rtp only when SpaceVim is not contained in runtimepath.
|
|
|
|
execute 'set rtp +=' . fnamemodify(g:_spacevim_root_dir, ':p:h:h')
|
|
|
|
call SpaceVim#begin()
|
2016-12-26 21:11:19 +08:00
|
|
|
endtry
|
|
|
|
|
2018-04-21 22:58:23 +08:00
|
|
|
call SpaceVim#custom#load()
|
2016-12-28 21:36:11 +08:00
|
|
|
|
|
|
|
call SpaceVim#end()
|
2017-08-16 06:09:25 +08:00
|
|
|
" vim:set et sw=2 cc=80:
|