1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:40:06 +08:00
SpaceVim/config/main.vim

39 lines
1.1 KiB
VimL
Raw Normal View History

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-05-02 20:26:58 +08:00
" Enable nocompatible
if has('vim_starting')
if &compatible
set nocompatible
endif
2018-07-28 10:58:12 +08:00
" python host
if !empty($PYTHON_HOST_PROG)
let g:python_host_prog = $PYTHON_HOST_PROG
endif
if !empty($PYTHON3_HOST_PROG)
let g:python3_host_prog = $PYTHON3_HOST_PROG
endif
2018-05-02 20:26:58 +08:00
endif
" 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'))?'\':'/') . '?')
lockvar g:_spacevim_root_dir
2016-12-26 21:11:19 +08:00
try
call SpaceVim#begin()
2016-12-26 21:11:19 +08:00
catch
" Update the rtp only when SpaceVim is not contained in runtimepath.
2018-06-03 21:38:44 +08:00
let &runtimepath .= ',' . fnamemodify(g:_spacevim_root_dir, ':p:h:h')
call SpaceVim#begin()
2016-12-26 21:11:19 +08:00
endtry
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: