-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
69 lines (63 loc) · 1.96 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
" Force Python version on Python3
" https://robertbasic.com/blog/force-python-version-in-vim/
if has('python3')
elseif has('python')
endif
scriptencoding utf-8
set encoding=utf-8
if has('win32')
set runtimepath+=~/.vim
endif
set nocompatible
syntax enable
filetype plugin on
" Determine VIM configuration {{{ "
" Enabled different configuration
" personalConfig helps to set some parameters (e.g. sync with google calendar)
" only on personal machine.
" extendedConfig enable some parameters that could be disabled by default.
" If you want to use personal or extended configurations, create file
" .personalConfig or .extendedConfig in your home directory.
let g:personalConfig = 0
if filereadable($HOME."/.personalConfig")
let g:personalConfig = 1
endif
let g:extendedConfig = 0
if filereadable($HOME."/.extendedConfig")
let g:extendedConfig = 1
endif
" }}} Determine VIM configuration "
" Vim Profiling {{{ "
fun! ProfileStart()
let profile_file = '/tmp/vim.'.getpid().'.profile.txt'
echom "Profiling into" profile_file
exec 'profile start '.profile_file
profile! file **
profile func *
endfun
if get(g:, 'profile')
call ProfileStart()
endif
" }}} Vim Profiling "
" Load VIM configs {{{ "
let g:VIM_ROOT_DIRECTORY = expand('<sfile>:p:h')
" First I have to initialize my key-bindings otherwise it will not working in plugins
let g:vim_configuration_files = [
\ '.vim/configs/common/conf.vimrc',
\ '.vim/configs/plugins/conf.vimrc',
\ '.vim/configs/key-bindings.vimrc',
\]
for file in g:vim_configuration_files
execute('source ' . g:VIM_ROOT_DIRECTORY . '/' . file)
endfor
" }}} Load VIM configs "
" Display VIM start time {{{ "
if has('vim_starting') && has('reltime')
let g:startuptime = reltime()
augroup vimrc-startuptime
autocmd! VimEnter * let g:startuptime = reltime(g:startuptime)
\ | redraw
\ | echomsg 'startuptime: ' . reltimestr(g:startuptime)
augroup END
endif
" }}} Display VIM start time "