1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:50:04 +08:00
SpaceVim/vimrc

29 lines
1.1 KiB
VimL
Raw Normal View History

2017-12-12 16:32:21 +08:00
"=============================================================================
" vimrc --- Entry file for vim
2021-11-13 16:37:24 +08:00
" Copyright (c) 2016-2021 Shidong Wang & Contributors
2020-09-19 16:19:58 +08:00
" Author: Shidong Wang < wsdjeg@outlook.com >
2017-12-12 16:32:21 +08:00
" URL: https://spacevim.org
2018-02-15 22:25:03 +08:00
" License: GPLv3
2017-12-12 16:32:21 +08:00
"=============================================================================
" Note: Skip initialization for vim-tiny or vim-small.
if 1
2019-10-08 22:24:03 +08:00
let g:_spacevim_if_lua = 0
if has('lua')
" add ~/.SpaceVim/lua to lua package path
if has('win16') || has('win32') || has('win64')
let s:plugin_dir = fnamemodify(expand('<sfile>'), ':h').'\lua'
let s:str = s:plugin_dir . '\?.lua;' . s:plugin_dir . '\?\init.lua;'
else
let s:plugin_dir = fnamemodify(expand('<sfile>'), ':h').'/lua'
let s:str = s:plugin_dir . '/?.lua;' . s:plugin_dir . '/?/init.lua;'
endif
2019-10-11 23:07:03 +08:00
silent! lua package.path=vim.eval("s:str") .. package.path
if empty(v:errmsg)
2019-10-08 22:24:03 +08:00
let g:_spacevim_if_lua = 1
2019-10-11 23:07:03 +08:00
endif
2019-10-08 22:24:03 +08:00
endif
2021-01-02 17:58:45 +08:00
execute 'source' fnamemodify(expand('<sfile>'), ':h').'/main.vim'
endif
2017-03-06 23:26:26 +08:00
" vim:set et sw=2