-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathvimrc.bundles
321 lines (285 loc) · 10.8 KB
/
vimrc.bundles
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
" Vundle {
" All of your Plugins must be added before the following line
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " be iMproved, required
filetype off " required
" the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'rizzatti/dash.vim'
Plugin 'Syntastic'
Plugin 'unite.vim'
Plugin 'unite-colorscheme' " :Unite -auto-preview colorscheme
Plugin 'Auto-Pairs' " 括号补全
Plugin 'gmarik/Vundle.vim' " 必须安装
Plugin 'SirVer/ultisnips' " Track the engine.
Plugin 'honza/vim-snippets' " Snippets are separated from the engine. Add this if you want them: Plugin 'unite.vim'
Plugin 'ervandew/supertab'
Plugin 'kien/rainbow_parentheses.vim' " 括号增强,彩色
Plugin 'trailing-whitespace' " 增加尾部空格的显示
Plugin 'commentary.vim' " 注释多行
Plugin 'surround.vim' " 补全括号或引号等cs,ds,yss
Plugin 'instant-markdown.vim'
Plugin 'junegunn/goyo.vim' " :Goyo
Plugin 'mattn/emmet-vim'
" Plugin 'wakatime/vim-wakatime'
" wm界面
Plugin 'The-NERD-tree'
Plugin 'minibufexpl.vim' " buffer插件
Plugin 'ctags.vim'
Plugin 'timestamp.vim' " 插入最后修改时间
Plugin 'plasticboy/vim-markdown' " Markdown格式高亮
Plugin 'molokai' " 配色
Plugin 'Tabular' " 注释等格式对齐插件
" Plugin 'mru.vim' " 历史文件
" Plugin 'ctrlp.vim' " 文件搜寻
Plugin 'Easymotion' " 文件快速定位
Plugin 'pydoc.vim' " python文档
Plugin 'Smooth-Scroll' " 平滑滚动
Plugin 'bling/vim-airline' " 状态栏
Plugin 'fugitive.vim' " git插件
Plugin 'Gist.vim' " gist
Plugin 'airblade/vim-gitgutter' " git diff
Plugin 'WebAPI.vim' " gist依赖插件
Plugin 'Tagbar' " 代替taglist
Plugin 'Valloric/YouCompleteMe' " 补全插件
Plugin 'python.vim'
" Plugin 'pyflakes.vim' " python语法检测
" Plugin 'mattn/emmet-vim' " Zencoding
" Plugin 'Pydiction' " python自动补全
" Plugin 'bufexplorer.zip' " 打开历史文件 :BufExplorer
call vundle#end() " required
filetype plugin indent on " required
" }
" Plugins {
" gitgutter{
" <Leader>hp 查看差异
" ]c 下一个不同处
" [c 上一个不同处
" let g:gitgutter_highlight_lines = 1
let g:gitgutter_realtime = 750
" let g:gitgutter_eager = 0
" }
" unite.vim {
nnoremap ,h :Unite buffer<cr>
nnoremap ,, :Unite file<cr>
" }
" ctrlp {
" let g:ctrlp_map = ',,'
" let g:ctrlp_open_multiple_files = 'v'
" set wildignore+=*/tmp/*,*.so,*.swp,*.zip
" let g:ctrlp_custom_ignore = {
" \ 'dir': '\v[\/]\.(git)$',
" \ 'file': '\v\.(log|jpg|png|jpeg)$',
" \ }
" }
" MRU {
" map ,h :MRU<cr>
" let MRU_Max_Entries=50 " 记录条数
" }
" vim-signature {
" 显示marks - 方便自己进行标记和跳转
" m[a-zA-Z] add mark
" '[a-zA-Z] go to mark
" m<Space> del all marks"'
" }
" ultisnips {
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<tab>"
" let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
" }
" commentary {
"支持不同文件类型
"gcc:注释一行
"gc:可以注释多行,配合<C-v>
autocmd FileType apache set commentstring=#\ %s
" }
" rainbow_parenthese.vim {
let g:rbpt_colorpairs = [
\ ['brown', 'RoyalBlue3'],
\ ['Darkblue', 'SeaGreen3'],
\ ['darkgray', 'DarkOrchid3'],
\ ['darkgreen', 'firebrick3'],
\ ['darkcyan', 'RoyalBlue3'],
\ ['darkred', 'SeaGreen3'],
\ ['darkmagenta', 'DarkOrchid3'],
\ ['brown', 'firebrick3'],
\ ['gray', 'RoyalBlue3'],
\ ['black', 'SeaGreen3'],
\ ['darkmagenta', 'DarkOrchid3'],
\ ['Darkblue', 'firebrick3'],
\ ['darkgreen', 'RoyalBlue3'],
\ ['darkcyan', 'SeaGreen3'],
\ ['darkred', 'DarkOrchid3'],
\ ['red', 'firebrick3'],
\ ]
let g:rbpt_max = 16
let g:rbpt_loadcmd_toggle = 0
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
" }
" minibuffexploer {
"常用操作
" :e <filename> 打开文件
" :ls 当前打开的buf
" :bn 下一个buf
" :bp 前一个buf
" :b<n> n是数字,第n个buf
" :b<tab> 自动补齐
" :bd 删除
" let g:miniBufExplMapWindowNavVim = 1 "<C-h,j,k,l>切换到上下左右的窗口中去
" let g:miniBufExplMapWindowNavArrows = 1 "<C-箭头>箭头切换
" let g:miniBufExplMapCTabSwitchBufs = 1 "<C-Tab>切换窗口(有冲突)
"let g:miniBufExplModSelTarget = 1
let g:miniBufExplMoreThanOne=0
" }
" NERDTree {
let g:NERDTree_title="[NERDTree]"
" let g:winManagerWindowLayout="NERDTree|TagList"
" function! NERDTree_Start()
" exec 'NERDTree'
" endfunction
" function! NERDTree_IsValid()
" return 1
" endfunction
" nmap wm :WMToggle<CR>
" }
" Easymotion {
let mapleader = "f"
let g:EasyMotion_leader_key = 'f'
let g:EasyMotion_smartcase = 1
map <Leader>l <Plug>(easymotion-lineforward)
map <Leader>j <Plug>(easymotion-j)
map <Leader>k <Plug>(easymotion-k)
map <Leader>h <Plug>(easymotion-linebackward)
" }
" youcompleteme {
" 屏蔽一些文件
let g:ycm_filetype_blacklist = {
\ 'tagbar' : 1,
\ 'qf' : 1,
\ 'notes' : 1,
\ 'markdown' : 1,
\ 'unite' : 1,
\ 'text' : 1,
\ 'vimwiki' : 1,
\ 'gitcommit' : 1,
\}
" let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py'
let g:ycm_global_ycm_extra_conf = "~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py"
" 超级有用文件跳转
nnoremap <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR>
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
" let g:SuperTabDefaultCompletionType = '<C-n>'
" let g:syntastic_always_populate_loc_list = 1
" }
" syntastic {
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
" let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" }
" multiple-cursors-master {
" Ctrl-n选择下一个相同的单词
" Ctrl-p往回选一个
" Ctrl-x则跳过下一个相同单词
" }
" vim-markdown {
let g:vim_markdown_initial_foldlevel= 1
let g:vim_markdown_math=1 " latex
let g:vim_markdown_frontmatter=1 " yaml
let g:vim_markdown_folding_disabled=1 "去掉折叠
let g:markdown_no_default_key_mappings=1 "默认键失效
" }
" LASTCHANGED {
let timestamp_regexp = '\v\C%(<Last %([cC]hanged?|[Mm]odified):\s+)@<=.*$'
set modelines=20
let g:timestamp_rep = strftime("%c")
" }
" vim-expand-region {
map <space> <Plug>(expand_region_expand)
" 空格键映射到+
" map J <Plug>(expand_region_shrink)
" }
" powerline {
" set laststatus=2
" let g:Powerline_symbols = 'fancy'
" set noshowmode
" }
" airline {
let g:airline_theme="powerlineish" "powerlineish
set laststatus=2
set encoding=utf-8
let g:airline_left_sep=''
let g:airline_right_sep=''
" let g:airline_powerline_fonts=1
" let g:airline#extensions#tabline#enabled = 1
" let g:airline#extensions#tabline#left_sep = ' '
" let g:airline#extensions#tabline#left_alt_sep = '|'
" }
" tagbar {
let g:tagbar_width = 30
let g:tagbar_ctags_bin = 'ctags'
function! ToggleNERDTreeAndTagbar()
let w:jumpbacktohere = 1
" Detect which plugins are open
if exists('t:NERDTreeBufName')
let nerdtree_open = bufwinnr(t:NERDTreeBufName) != -1
else
let nerdtree_open = 0
endif
let tagbar_open = bufwinnr('__Tagbar__') != -1
" Perform the appropriate action
if nerdtree_open && tagbar_open
NERDTreeClose
TagbarClose
elseif nerdtree_open
TagbarOpen
elseif tagbar_open
NERDTree
else
NERDTree
TagbarOpen
endif
" Jump back to the original window
for window in range(1, winnr('$'))
execute window . 'wincmd w'
if exists('w:jumpbacktohere')
unlet w:jumpbacktohere
break
endif
endfor
endfunction
nmap wm :call ToggleNERDTreeAndTagbar()<CR>
" }
" gist {
let g:gist_open_browser_after_post = 1
" }
" auto-pairs {
let g:AutoPairsFlyMode = 1 " flymode
" }
" emmet {
" let g:user_emmet_expandabbr_key = '<Tab>'
" }
" }