-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.vim
70 lines (50 loc) · 1.67 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
"======================================================================
"
" init.vim - initialize config
"
" Created: 2018-07-23
" From: https://github.com/starifly/FlyVim
"
"======================================================================
let mapleader = "\\"
let maplocalleader = "\<Space>"
if empty($FlyVim_Dir)
let $FlyVim_Dir = "$HOME/.FlyVim"
endif
if empty($VIMHOME)
let $VIMHOME = "$HOME/.vim"
endif
" Platform
let g:FlyVim = get(g:, 'FlyVim', {})
let g:FlyVim.os = {}
let g:FlyVim.os.mac = has('macunix')
let g:FlyVim.os.linux = has('unix') && !has('macunix') && !has('win32unix')
let g:FlyVim.os.windows = has('win32') || has('win64')
let g:FlyVim.nvim = has('nvim') && exists('*jobwait') && !g:FlyVim.os.windows
let g:FlyVim.vim8 = exists('*job_start')
let g:FlyVim.timer = exists('*timer_start')
command! -nargs=1 LoadScript exec 'so '.$FlyVim_Dir.'/'.'<args>'
set runtimepath+=$FlyVim_Dir/core
" set runtimepath+=$FlyVim_Dir/core/after
" 将 ~/.vim 目录加入 runtimepath (有时候 vim 不会自动帮你加入)
" set rtp+=$HOME/.vim
if g:FlyVim.os.windows
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after
endif
"----------------------------------------------------------------------
" 模块加载
"----------------------------------------------------------------------
" Functions
LoadScript personal/functions.vim
" 加载基础配置
LoadScript personal/basic.vim
" 加载扩展配置
LoadScript personal/config.vim
" 插件加载
LoadScript personal/plugins.vim
" 界面样式
LoadScript personal/style.vim
" 自定义按键
LoadScript personal/keymaps.vim
" Plugin Configuration
LoadScript mp/plugin-config.vim