forked from amix/vimrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
25 lines (22 loc) · 1015 Bytes
/
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
" If you're using a symlink to your script, but your resources are in
" the same directory as the actual script, you'll need to do this:
" 1: Get the absolute path of the script
" 2: Resolve all symbolic links
" 3: Get the folder of the resolved absolute file
" Reference: https://stackoverflow.com/a/18734557/7124994
let s:current_path = fnamemodify(resolve(expand('<sfile>:p')), ':h')
" One way to avoid this, that's common for other kinds of Vim syntax,
" is the execute command (:help :execute ):
" Reference: https://stackoverflow.com/a/50211324/7124994
exe 'set rtp+=' . s:current_path
" rtp is alias of runtimepath, set for Vundle
exe 'set rtp+=' . s:current_path . '/my_plugins/Vundle.vim'
" echo &rtp
exe 'source ' . s:current_path . '/vimrcs/basic.vim'
exe 'source ' . s:current_path . '/vimrcs/filetypes.vim'
exe 'source ' . s:current_path . '/vimrcs/plugins_config.vim'
exe 'source ' . s:current_path . '/vimrcs/extended.vim'
try
exe 'source ' . s:current_path . '/my_configs.vim'
catch
endtry