-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathvimrc
executable file
·119 lines (108 loc) · 4.23 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
"File vimrc
"Brief config file for neovim,vim,gvim in linux,gvim in win32,macvim
"Date 2015-11-28/22:56:20
"Author tracyone,[email protected],
"Github https://github.com/tracyone/vinux
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
let $MYVIMRC=fnamemodify(expand('<sfile>'), ':p')
let $VIMFILES=fnamemodify(expand('<sfile>'), ':p:h')
set runtimepath^=$VIMFILES
set runtimepath+=$VIMFILES/after
if has('win64') || has('win32')
set pythonthreedll=$HOME\\AppData\\Local\\Programs\\Python\\Python36\\python36.dll
set pythondll=$HOME\\AppData\\Local\\Programs\\Python\\Python27\\python27.dll
if !filereadable(&pythondll)
set pythondll&
endif
if !filereadable(&pythonthreedll)
set pythonthreedll&
endif
let $PATH = $VIMFILES.'/bin;'.$PATH
else
"remove default folder from rtp
"following global variable is for neovim only
"for providing a path of python3 we can speedup start time of neovim
let g:loaded_python_provider = 0
let g:python3_host_prog = 'python3'
if $VIMFILES !=# $HOME.'/.vim'
set runtimepath-=$HOME/.vim
set runtimepath-=$HOME/.vim/after
endif
let $PATH = $VIMFILES.'/bin:'.$PATH
endif
call te#feat#init_all()
call te#feat#source_rc('autocmd.vim')
call te#feat#source_rc('options.vim')
call te#feat#register_vim_enter_setting("call te#feat#source_rc('mappings.vim')")
call te#feat#register_vim_enter_setting("call te#feat#source_rc('colors.vim')")
"user custom config file
if filereadable($VIMFILES.'/local.vim')
try
execute ':source '.$VIMFILES.'/local.vim'
catch /^Vim\%((\a\+)\)\=:E/
call te#feat#gen_local_vim()
endtry
else
call te#feat#gen_local_vim()
endif
if exists('*TVIM_pre_init')
call TVIM_pre_init()
endif
if !isdirectory(g:vinux_plugin_dir.cur_val)
silent! call mkdir(g:vinux_plugin_dir.cur_val, 'p')
if !isdirectory(g:vinux_plugin_dir.cur_val)
call te#utils#EchoWarning('Create '.g:vinux_plugin_dir.cur_val.' fail!', 'err')
let g:vinux_plugin_dir.cur_val=$VIMFILES.'/bundle/'
endif
endif
let &runtimepath=&runtimepath.','.$VIMFILES
if !filereadable($VIMFILES.'/autoload/plug.vim')
if te#env#Executable('curl') && te#env#Executable('git')
if te#env#IsWindows()
silent! exec ':!mkdir -p '.$VIMFILES.'\\autoload'
silent! exec ':!curl -fLo ' . $VIMFILES.'\\autoload'.'\\plug.vim ' .
\ 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
else
silent! exec ':!mkdir -p '.$VIMFILES.'/autoload'
silent! exec ':!curl -fLo ' . $VIMFILES.'/autoload'.'/plug.vim ' .
\ 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
endif
else
call te#utils#EchoWarning('Please install curl and git!')
endif
endif
silent! call plug#begin(g:vinux_plugin_dir.cur_val)
call te#feat#feat_enable('g:feat_enable_complete', 0)
call te#feat#feat_enable('g:feat_enable_jump', 1)
call te#feat#feat_enable('g:feat_enable_tmux', 0)
call te#feat#feat_enable('g:feat_enable_git', 0)
call te#feat#feat_enable('g:feat_enable_c', 0)
call te#feat#feat_enable('g:feat_enable_vim', 0)
call te#feat#feat_enable('g:feat_enable_gui', 1)
call te#feat#feat_enable('g:feat_enable_tools', 0)
call te#feat#feat_enable('g:feat_enable_edit', 0)
call te#feat#feat_enable('g:feat_enable_frontend', 0)
call te#feat#feat_enable('g:feat_enable_help', 0)
call te#feat#feat_enable('g:feat_enable_basic', 1)
call te#feat#feat_enable('g:feat_enable_airline', 0)
call te#feat#feat_enable('g:feat_enable_writing', 0)
call te#feat#feat_enable('g:feat_enable_zsh', 0)
call te#feat#feat_enable('g:feat_enable_fun', 0)
call te#feat#feat_enable('g:feat_enable_lsp', 0)
call te#feat#feat_enable('g:feat_enable_debug', 0)
call te#feat#register_vim_enter_setting(function('te#feat#check_plugin_install'))
call te#feat#register_vim_enter_setting(function('te#utils#echo_info_after'))
if !filereadable($VIMFILES.'/feature.vim')
call te#feat#gen_feature_vim(0)
endif
if exists('*TVIM_plug_init')
call TVIM_plug_init()
endif
silent! call plug#end()
if exists('*TVIM_user_init')
call TVIM_user_init()
endif
filetype plugin indent on
syntax on
set modeline