-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.vim
More file actions
43 lines (33 loc) · 1.21 KB
/
init.vim
File metadata and controls
43 lines (33 loc) · 1.21 KB
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
"" Initialization. This should be the first file nvim sources.
" Pointer to the user's nvim runtime path (e.g. ~/.config/nvim):
let g:nvim_rp = split(&runtimepath, ',')[0]
" Create the store directory if it doesn't exist:
let g:storedir = expand(g:nvim_rp . '/store')
if !isdirectory(g:storedir)
call mkdir(g:storedir)
endif
" Check if vim-plug is installed and install it if it isn't:
if !filereadable(g:nvim_rp . '/autoload/plug.vim')
execute '!curl -fLo ' . g:nvim_rp . '/autoload/plug.vim --create-dirs '
\ 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
endif
" Execute user-defined pre-init autocommands:
if exists("#User#InitPre")
doautocmd User InitPre
endif
" Load plugins' configuration files:
for path in split(globpath(g:nvim_rp . '/config', '*.vim'), "\n")
execute 'source' fnameescape(path)
endfor
" Load plugins:
execute 'source ' . g:nvim_rp . '/plugins.vim'
" Load global configuration:
execute 'source ' . g:nvim_rp . '/rc.vim'
" Load keymaps:
execute 'source ' . g:nvim_rp . '/keymaps.vim'
" Load extra stuff:
execute 'source ' . g:nvim_rp . '/extras.vim'
" Execute user-defined post-init autocommands:
if exists("#User#InitPost")
doautocmd User InitPost
endif