diff options
Diffstat (limited to 'vim/init.vim')
-rw-r--r-- | vim/init.vim | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/vim/init.vim b/vim/init.vim new file mode 100644 index 0000000..20a1c74 --- /dev/null +++ b/vim/init.vim | |||
@@ -0,0 +1,44 @@ | |||
1 | " Avoid load this script twice | ||
2 | if get(s:, 'loaded', 0) != 0 | ||
3 | finish | ||
4 | else | ||
5 | let s:loaded = 1 | ||
6 | endif | ||
7 | |||
8 | " Get current dir | ||
9 | " let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h') | ||
10 | let s:home = '~/helper/vim' | ||
11 | |||
12 | " Load script in current dir | ||
13 | " command! -nargs=1 LoadScript exec 'source '.s:home.'/'.'<args>' | ||
14 | |||
15 | " Add current dir into runtimepath | ||
16 | execute 'set runtimepath+='.s:home | ||
17 | |||
18 | |||
19 | "---------------------------------------------------------------------- | ||
20 | " Locad Modules | ||
21 | "---------------------------------------------------------------------- | ||
22 | |||
23 | " Basic configuration | ||
24 | source ~/helper/vim/init/basic.vim | ||
25 | |||
26 | " Key mappings | ||
27 | source ~/helper/vim/init/keymaps.vim | ||
28 | |||
29 | " Extra config for different contexts | ||
30 | source ~/helper/vim/init/config.vim | ||
31 | |||
32 | " Set tabsize | ||
33 | source ~/helper/vim/init/tabsize.vim | ||
34 | |||
35 | if has('nvim') | ||
36 | " For neovim | ||
37 | source ~/.config/nvim/lazy.lua | ||
38 | else | ||
39 | " For vim | ||
40 | source ~/helper/vim/init/plugins.vim | ||
41 | source ~/helper/vim/init/style.vim | ||
42 | endif | ||
43 | |||
44 | source ~/helper/vim/init/special_highlight.vim | ||