aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim/vimrc
blob: 7e283d4ad1eaed85cf1169a434610803e39b4e35 (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
" 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 = '/home/pham/helper/vim'

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

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

" Gerneral scripts
LoadScript init/basic.vim     " Basic configuration
LoadScript init/keymaps.vim   " Key mappings
LoadScript init/config.vim    " Extra config for different contexts

if $fullrc == 'false'
  finish
endif

" Different scripts for nvim and vim
if has('nvim')
  LoadScript mini.lua
else
  colo desert
  "LoadScript init/plugins.vim
  "LoadScript init/style.vim
endif

LoadScript init/highlight.vim

silent! source ~/.projects.vim