-
Notifications
You must be signed in to change notification settings - Fork 5
/
vimrc
75 lines (64 loc) · 1.55 KB
/
vimrc
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
let mapleader = " "
let maplocalleader = " "
" Load local .vimrc files
set exrc
set secure
packadd chezmoi.vim
{{ if eq .os "windows" -}}
set nocompatible " Get out of vi compatible mode
{{ else -}}
{{ end -}}
if !exists("*ReloadConfigs")
function ReloadConfigs()
{{- if eq .rtp "~/.vim" }}
:source ~/.vim/vimrc
if has('gui_running')
:source ~/.vim/gvimrc
endif
{{- else if eq .rtp "~/.config/nvim" }}
:source ~/.config/nvim/init.vim
{{- end }}
endfunction
command! RC call ReloadConfigs()
endif
" Auto source $MYVIMRC after saving
augroup auto_source_vimrc
autocmd!
autocmd BufWritePost $MYVIMRC source $MYVIMRC
augroup END
{{ if eq .vim_flag "good" -}}
let g:config_files = [
\ 'misc.vim',
\ 'cursor.vim',
\ 'spell.vim',
\ 'colour.vim',
\ 'clipboard.vim',
\ 'buffer.vim',
\ 'window.vim',
{{- if ne .os "linux" }}
\ 'python.vim',
{{- end }}
\ 'plug.vim',
\ 'gruvbox-material.vim',
\ 'edge.vim',
\ 'theme.vim',
\ ]
" Strict loading order: 'plug.vim' -> 'gruvbox-material/edge.vim' -> 'theme.vim'
{{ else -}}
let g:tex_comment_nospell = 1 " For VimTeX use g:vimtex_syntax_nospell_comments
let g:config_files = [
\ 'misc.vim',
\ 'cursor.vim',
\ 'spell.vim',
\ 'colour.vim',
\ 'clipboard.vim',
\ 'buffer.vim',
\ 'window.vim',
{{- if ne .os "linux" }}
\ 'python.vim',
{{- end }}
\ ]
{{ end -}}
for s:fname in g:config_files
{{ list " execute printf('source " .rtp "/core/%s', s:fname)" | join "" }}
endfor