forked from undoZen/vimrc
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.vimrc
More file actions
180 lines (154 loc) · 4.8 KB
/
.vimrc
File metadata and controls
180 lines (154 loc) · 4.8 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
set nocompatible
"call pathogen#runtime_append_all_bundles()
call pathogen#infect()
if has('nvim')
so /usr/share/nvim/runtime/vimrc_example.vim
" so /usr/share/vim/vim80/vimrc_example.vim
so $VIMRUNTIME/vimrc_example.vim
el
so $VIMRUNTIME/vimrc_example.vim
end
set history=500
set nobackup
set udf
set autoread
set et sta sw=2 sts=2
set fcs=fold:\ ,vert:\|
set noeb vb t_vb=
" set backupcopy=yes
set dir=~/.vimswap//,/var/tmp//,/tmp//,.
set backupdir=~/tmp/vimback
set undodir=~/tmp/vim
" 帮助文档
set helplang=cn
filetype plugin on
filetype indent on
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has("win32")
let VimSetting_Path = $HOME."/"."vimfiles"
el
let VimSetting_Path = $HOME."/".".vim"
en
let VimSetting_etc = VimSetting_Path . "/etc"
exec ":so ".VimSetting_Path."/"."Functions.vim"
au BufRead *vimrc exec ":set path+=".VimSetting_Path
au FileType python exec ":so ".VimSetting_Path."/"."ftplugin/MyPython.vim"
au FileType ruby exec ":so ".VimSetting_Path."/"."ftplugin/ruby-macros.vim"
au FileType ruby exec ":so ".VimSetting_Path."/"."ftplugin/MyRuby.vim"
" au FileType ruby exec ":Rvm use"
au FileType ruby nno <buffer> <silent> <leader>db obinding.pry<ESC>
au FileType ruby nno <buffer> <silent> <leader>da ea.tap { \|x\| binding.pry}<ESC>
au FileType autohotkey exec ":so ".VimSetting_Path."/"."ftplugin/MyAutoHotKey.vim"
au FileType slim setlocal et sta sw=2 sts=2 iskeyword+=-,$
au FileType ruby setlocal et sta sw=2 sts=2
au FileType css setlocal iskeyword+=-,$
" au BufNewFile,BufRead * setlocal syntax=ON
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 不知道哪来的
set tags+=gems.tags
set tags+=coffee.tags
" 回行显示
set wrap
set nolinebreak
set textwidth=80
for ft in ['crontab','conf']
exec "au FileType ".ft." set textwidth=255"
endfor
set formatoptions+=Mm
"set iskeyword+=<,>,(,),[,]
""""""""""""""""""" Auto detect file encoding """""""""""""""""""""""
set encoding=utf-8
set termencoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1
" 如果你要打开的文件编码不在此列,那就添加进去
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 代码折叠设置
"set foldenable
set foldmethod=syntax
set foldlevel=100
"实现C程序的缩进
set cin
set sw=4
set number
set smartindent
behave xterm
"高亮所在行、列
set cursorline
set cursorcolumn
set scrolloff=3
"always display status line
set laststatus=2
"make s/blabla/plapla act as s/blabla/plapla/g
set gdefault
if has('cmdline_info')
set ruler " show the ruler
set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%) " a ruler on steroids
set showcmd " show partial commands in status line and
" selected characters/lines in visual mode
endif
"au FileType xhtml,xml,eruby ru ftplugin/html/autoclosetag.vim
""""""""""""""" Load plugin settings in .vim/etc """"""""""""""""""""
for i in range(10)
let load_setting_name = "/S".i."*.vim"
" plugin settings in .vim/etc should use a S[0-9] prefix as 'runlevel'
for f in split(glob(VimSetting_etc.load_setting_name), '\n')
exe 'source ' f
endfor
endfor
" etc/S1_EasyMotion.vim
" etc/S1_Urxvt_fixbinding.vim
" etc/S1_deoplete.vim
" etc/S1_neo_com_setting.vim
" etc/S1_netrw.vim
" etc/S2_Ack_vim.vim
" etc/S2_Color_Solarized.vim
" etc/S2_Keybinds_Dvorak.vim
" etc/S2_LaTeX_Suit.vim
" etc/S2_MyJunk.vim
" etc/S2_Pmenu_color.vim
" etc/S2_SuperTab.vim
" etc/S2_SystemDiff.vim
" etc/S2_Tabulazire.vim
" etc/S2_TagList.vim
" etc/S2_XPTemplate.vim
" etc/S2_coffeelint.vim
" etc/S2_easy_align.vim
" etc/S2_google_tarnslator.vim
" etc/S2_nerdcommenter.vim
" etc/S2_omnicomplete.vim
" etc/S2_template_loader.vim
" etc/S2_vim-airline.vim
" etc/S2_vim-powerline.vim
" etc/S3_Fugitive.vim
" etc/S3_VimWiki.vim
" etc/S3_syntastic.vim
" etc/S3_templates.vim
" etc/S3_vim_abolish.vim
" etc/S3_vim_rails.vim
" etc/S3_vim_rspec.vim
" etc/S4_deoplete.vim
" etc/S4_rubycomplete.vim
" etc/s1_neocomplete.vim
" etc/s2_LaTeX_Suit.vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsSnippetsDir=$HOME.'/.vim/snips'
let g:UltiSnipsUsePythonVersion = 3
let g:UltiSnipsExpandTrigger="<F2>"
let g:UltiSnipsJumpForwardTrigger="<F2>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
hi Normal ctermfg=253
hi Comment ctermfg=248
set title titlestring=%<%F%=%l/%L-%P titlelen=70
set showcmd " display incomplete commands
" execute project related configuration in current directory
if filereadable("workspace.vim")
so workspace.vim
en
"autocmd InsertLeave * if &diff == 1 | diffupdate | endif
"set diffopt+=context:8
"set verbose=9 " for debug
"set wd=500