diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-07-08 23:30:34 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-07-08 23:30:34 +0800 |
commit | 270c3f02de59c96995ecd23b22b5fb2db7c182d1 (patch) | |
tree | 071870601de6da9ea963706c4ec9ebe542dd9aab | |
parent | 7a98c89f22253177d9f5a0f83c9dbaa297eb54b0 (diff) |
Update
-rw-r--r-- | vim/init.vim | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/vim/init.vim b/vim/init.vim index 031a0ed..adfd9d6 100644 --- a/vim/init.vim +++ b/vim/init.vim | |||
@@ -8,32 +8,22 @@ endif | |||
8 | " Get current dir | 8 | " Get current dir |
9 | " let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h') | 9 | " let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h') |
10 | let s:home = '~/helper/vim' | 10 | let s:home = '~/helper/vim' |
11 | execute 'cd '.s:home | ||
12 | |||
13 | " Load script in current dir | ||
14 | " command! -nargs=1 LoadScript exec 'source '.s:home.'/'.'<args>' | ||
15 | 11 | ||
16 | " Add current dir into runtimepath | 12 | " Add current dir into runtimepath |
17 | execute 'set runtimepath+='.s:home | 13 | execute 'set runtimepath+='.s:home |
18 | 14 | ||
19 | "---------------------------------------------------------------------- | 15 | " Load script in home |
20 | " Locad Scripts | 16 | command! -nargs=1 LoadScript exec 'source '.s:home.'/'.'<args>' |
21 | "---------------------------------------------------------------------- | ||
22 | |||
23 | " Basic configuration | ||
24 | source init/basic.vim | ||
25 | |||
26 | " Key mappings | ||
27 | source init/keymaps.vim | ||
28 | 17 | ||
29 | " Extra config for different contexts | 18 | " Gerneral scripts |
30 | source init/config.vim | 19 | LoadScript init/basic.vim " Basic configuration |
20 | LoadScript init/keymaps.vim " Key mappings | ||
21 | LoadScript init/config.vim " Extra config for different contexts | ||
31 | 22 | ||
23 | " Different scripts for nvim and vim | ||
32 | if has('nvim') | 24 | if has('nvim') |
33 | " For neovim | 25 | LoadScript lazy.lua |
34 | source lazy.lua | ||
35 | else | 26 | else |
36 | " For vim | 27 | LoadScript init/plugins.vim |
37 | source init/plugins.vim | 28 | LoadScript init/style.vim |
38 | source init/style.vim | ||
39 | endif | 29 | endif |