aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim')
l---------[-rw-r--r--]vim/init.vim38
-rw-r--r--vim/vimrc37
2 files changed, 38 insertions, 37 deletions
diff --git a/vim/init.vim b/vim/init.vim
index aed0c41..c9a3c9c 100644..120000
--- a/vim/init.vim
+++ b/vim/init.vim
@@ -1,37 +1 @@
1" Avoid load this script twice vimrc \ No newline at end of file
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
18if $fullrc == 'false'
19 finish
20endif
21
22" Gerneral scripts
23LoadScript init/basic.vim " Basic configuration
24LoadScript init/keymaps.vim " Key mappings
25LoadScript init/config.vim " Extra config for different contexts
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
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