-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvimrc
More file actions
42 lines (34 loc) · 874 Bytes
/
vimrc
File metadata and controls
42 lines (34 loc) · 874 Bytes
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
let mapleader="\<Space>"
let s:vim_home='~/.vim/'
" init
if empty(glob("~/.vim/autoload/plug.vim"))
echo "Installing vim-plug..."
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo "Run :PlugInstall to install plugins"
endif
" plugin
"syn sync fromstart
set nocompatible
filetype off
let s:plug_files = [
\ "layers/common/*.vim",
\ "layers/language/*.vim",
\ ]
call plug#begin('~/.vim/plugged')
let g:plug_threads = 8
let g:plug_timeout = 3600
for files in s:plug_files
exec "runtime! " . files
endfor
call plug#end()
let s:user_files = [
\ "layers/user/*.vim",
\ ]
function! LoadUserFiles()
for files in s:user_files
exec "runtime! " . files
endfor
endfunction
" 调用函数在 Vim 启动后加载用户文件
autocmd VimEnter * call LoadUserFiles()