forked from skywind3000/vim-init
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
53 lines (37 loc) · 1.14 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
48
49
50
"======================================================================
"
" init.vim - initialize config
"
" Created by skywind on 2018/05/30
" Last Modified: 2018/05/30 18:26:34
"
"======================================================================
" 防止重复加载
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>'
" 将 vim-init 目录加入 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