diff options
Diffstat (limited to 'vim')
| -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 |