aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/vimrc
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-11-14 15:40:53 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-11-14 15:40:53 +0800
commiteffe141a61e1b48adf0b4472a58f716f97a32b7b (patch)
treecd2edde21c96613496c9c63270298e80e5ace28c /vim/vimrc
parentb22c7def1e38b8dc9c1f619329567c45a72e052a (diff)
Update
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc37
1 files changed, 37 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
new file mode 100644
index 0000000..7a76ec6
--- /dev/null
+++ b/vim/vimrc
@@ -0,0 +1,37 @@
1" Avoid load this script twice
2if get(s:, 'loaded', 0) != 0
3 finish
4else
5 let s:loaded = 1
6endif
7
8" Get current dir
9" let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h')
10let s:home = '~/helper/vim'
11
12" Add current dir into runtimepath
13execute 'set runtimepath+='.s:home
14
15" Load scripts in home
16command! -nargs=1 LoadScript exec 'source '.s:home.'/'.'<args>'
17
18" Gerneral scripts
19LoadScript init/basic.vim " Basic configuration
20LoadScript init/keymaps.vim " Key mappings
21LoadScript init/config.vim " Extra config for different contexts
22
23if $fullrc == 'false'
24 finish
25endif
26
27" Different scripts for nvim and vim
28if has('nvim')
29 LoadScript mini.lua
30else
31 LoadScript init/plugins.vim
32 LoadScript init/style.vim
33endif
34
35LoadScript init/highlight.vim
36
37silent! source ~/.projects.vim