-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vim
47 lines (35 loc) · 1.18 KB
/
init.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"===============================================================================
" init.vim - initialize config
"
" Create by Heng on 2021/02/23, clone from skywind300/vim-init
" Last Modified: 2021/02/23
"===============================================================================
" 防止重复加载
if get(s:, 'loaded', 0) != 0
finish
else
let s:loaded = 1
endif
" 取得本文件所在的目录
let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h')
" 定义一个命令来加载文件
command! -nargs=1 LoadScript exec 'so '.s:home.'/'.'<args>'
" 将项目目录加入 runtimepath
exec 'set rtp+='.s:home
" 将 ~/.vim 目录加入 runtimepath (有时候 vim 不会自动帮你加入)
set rtp+=~/.vim
"-------------------------------------------------------------------------------
" 模块加载
"-------------------------------------------------------------------------------
" 加载基础配置
LoadScript init/init-basic.vim
" 加载扩展配置
LoadScript init/init-config.vim
" 设定 tabsize
LoadScript init/init-tabsize.vim
" 插件加载
LoadScript init/init-plugins.vim
" 界面样式
LoadScript init/init-style.vim
" 自定义按键
LoadScript init/init-keymaps.vim