aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/init.vim
blob: 20a1c7478f4fc75036b4ab5f629226b683bd85e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
" Avoid load this script twice
if get(s:, 'loaded', 0) != 0
  finish
else
  let s:loaded = 1
endif

" Get current dir
" let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h')
let s:home = '~/helper/vim'

" Load script in current dir
" command! -nargs=1 LoadScript exec 'source '.s:home.'/'.'<args>'

" Add current dir into runtimepath
execute 'set runtimepath+='.s:home


"----------------------------------------------------------------------
" Locad Modules
"----------------------------------------------------------------------

" Basic configuration
source ~/helper/vim/init/basic.vim

" Key mappings
source ~/helper/vim/init/keymaps.vim

" Extra config for different contexts
source ~/helper/vim/init/config.vim

" Set tabsize
source ~/helper/vim/init/tabsize.vim

if has('nvim')
  " For neovim
  source ~/.config/nvim/lazy.lua
else
  " For vim
  source ~/helper/vim/init/plugins.vim
  source ~/helper/vim/init/style.vim
endif

source ~/helper/vim/init/special_highlight.vim