diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2024-05-22 13:57:46 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2024-05-22 13:57:46 +0800 |
| commit | 76922c395db1d9745e2a47f8c0584545958a3fee (patch) | |
| tree | d616e2b0eaa79276ca17b513e42b862a102da9de /vim/vimrc | |
| parent | ffd076d2c434d6c850dd1a05a19ff477c2a29023 (diff) | |
Update
Diffstat (limited to 'vim/vimrc')
| -rw-r--r-- | vim/vimrc | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc new file mode 100644 index 0000000..78a96b1 --- /dev/null +++ b/vim/vimrc | |||
| @@ -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 | " UI | ||
| 30 | source ~/helper/vim/init/style.vim | ||
| 31 | |||
| 32 | " Extra config for different contexts | ||
| 33 | source ~/helper/vim/init/config.vim | ||
| 34 | |||
| 35 | " Set tabsize | ||
| 36 | source ~/helper/vim/init/tabsize.vim | ||
| 37 | |||
| 38 | if has('nvim') | ||
| 39 | " For nvim | ||
| 40 | source ~/.config/nvim/lazy.lua | ||
| 41 | else | ||
| 42 | " Plugin | ||
| 43 | source ~/helper/vim/init/plugins.vim | ||
| 44 | endif | ||