-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimrc.bundles
356 lines (305 loc) · 10.1 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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
" this script has been writen in utf-8 encoding
scriptencoding utf-8
"""""""""""""""""""""""""""""""""""
" Dependence
"""""""""""""""""""""""""""""""""""
" package dependence: ctags, ag(he_silver_searcher)
" python dependence: pep8, pyflake" Bundles here are part of the core Maximum Awesome setup
" shellcheck `brew install shellcheck` https://github.com/koalaman/shellcheck
filetype on " without this vim emits a zero exit status, later, because of :ft off
filetype off " REQUIRED! ensure filetype is off
"""""""""""""""""""""""""""""""""""
" Plugin Management
"""""""""""""""""""""""""""""""""""
" inspired by spf13
" available list
" python
" javascript
" markdown
" html
" css
" less
" scss
" tmux
" common lisp
" php
" ycm or neocomplete
" airline or lightline
" Download vim-plug if unavailable
if isdirectory(expand('~/.vim/bundles/repos/github.com/Shougo/dein.vim'))
set runtimepath+=~/.vim/bundles/repos/github.com/Shougo/dein.vim
if !exists('g:bundle_groups')
let g:bundle_groups=['python', 'json', 'markdown', 'golang', 'html', 'css', 'tmux', 'neocomplete', 'lightline']
endif
call dein#begin(expand('~/.vim/bundles'))
"""""""""""""""""""""""""""""""
" Generial {{{1
"""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""
" syntastic {{{2
"""""""""""""""""""""""""""""""
if v:version >= 800 || has('nvim')
call dein#add('w0rp/ale')
else
call dein#add('scrooloose/syntastic')
endif
"}}}
"""""""""""""""""""""""""""""""
" auto complete {{{2
"""""""""""""""""""""""""""""""
"call dein#add('Valloric/YouCompleteMe')
"call dein#add('Valloric/YouCompleteMe', { 'do': './install.py --clang-completer' , 'for': ['python', 'c', 'cpp'] })
if count(g:bundle_groups, 'ycm') && !count(g:bundle_groups, 'neocomplete')
call dein#add('Valloric/YouCompleteMe')
" Group dependencies, vim-snippets depends on ultisnips
" Snippets are separated from the engine.
call dein#add('SirVer/ultisnips')
elseif count(g:bundle_groups, 'neocomplete') && !count(g:bundle_groups, 'ycm')
if exists('g:oob_in_nvim')
call dein#add('Shougo/deoplete.nvim')
else
call dein#add('Shougo/neocomplete.vim')
endif
call dein#add('Shougo/neosnippet')
call dein#add('Shougo/neosnippet-snippets')
endif
call dein#add('honza/vim-snippets')
" 自动补全单引号,双引号等
call dein#add('Raimondi/delimitMate')
" 自动补全html/xml标签
call dein#add('docunext/closetag.vim')
"}}}
"""""""""""""""""""""""""""""""
" quick editing {{{2
"""""""""""""""""""""""""""""""
" comment
call dein#add('scrooloose/nerdcommenter')
" align
call dein#add('junegunn/vim-easy-align')
call dein#add('godlygeek/tabular')
call dein#add('vim-scripts/matchit.zip')
" Sublime alike multiple cursors supoort
call dein#add('terryma/vim-multiple-cursors')
" file location
call dein#add('ctrlpvim/ctrlp.vim') | call dein#add('tacahiroy/ctrlp-funky')
" gundo: visualize your Vim undo tree
if has('python') || has('python3')
call dein#add('sjl/gundo.vim')
endif
" endwise
call dein#add('tpope/vim-endwise')
call dein#add('tpope/vim-repeat') | call dein#add('tpope/vim-surround')
call dein#add('tpope/vim-unimpaired')
" smart selection of the closest text object
call dein#add('gcmt/wildfire.vim')
" quick f/F
call dein#add('unblevable/quick-scope')
call dein#add('easymotion/vim-easymotion')
" run commands quickly
call dein#add('thinca/vim-quickrun')
" ack/ag
if executable('ack') || executable('ag')
call dein#add('mileszs/ack.vim')
endif
"}}}
"""""""""""""""""""""""""""""""
" git {{{2
"""""""""""""""""""""""""""""""
call dein#add('tpope/vim-fugitive')
call dein#add('airblade/vim-gitgutter')
"}}}
"""""""""""""""""""""""""""""""
" NAV {{{2
"""""""""""""""""""""""""""""""
" tagbar
if executable('ctags')
call dein#add('majutsushi/tagbar')
endif
"if !exists('g:oob_in_nvim')
" FIXME: will cause neovim crash:
" https://github.com/neovim/neovim/issues/5902
call dein#add('haya14busa/incsearch.vim')
"endif
" NERDTree
"call dein#add('scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
call dein#add('scrooloose/nerdtree')
call dein#add('xuyuanp/nerdtree-git-plugin')
" I dont use tabs, uncomment if you need to make nerdtree stick through tabs
"call dein#add('jistr/vim-nerdtree-tabs')
" ctrlspace
"call dein#add('vim-ctrlspace/vim-ctrlspace')
"}}}
"""""""""""""""""""""""""""""""
" UI/UX {{{2
"""""""""""""""""""""""""""""""
" rainbow parentheses
call dein#add('luochen1990/rainbow')
"call dein#add('junegunn/rainbow_parentheses')
" Airline
if count(g:bundle_groups, 'airline') && !count(g:bundle_groups, 'lightline')
call dein#add('bling/vim-airline')
call dein#add('vim-airline/vim-airline-themes')
else
call dein#add('itchyny/lightline.vim')
endif
" Color schemes
call dein#add('chriskempson/base16-vim')
call dein#add('flazz/vim-colorschemes')
call dein#add('morhetz/gruvbox')
" hilight indents
"call dein#add('nathanaelkane/vim-indent-guides')
call dein#add('Yggdroot/indentLine')
" Object
call dein#add('michaeljsmith/vim-indent-object')
" Keymap-display
call dein#add('hecal3/vim-leader-guide')
" Distraction-free writing in Vim
call dein#add('junegunn/goyo.vim')
call dein#add('junegunn/limelight.vim')
" }}}
" }}}
" #################################
" Bundle Groups {{{1
" #################################
"""""""""""""""""""""""""""""""
" tmux {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'tmux')
" tmux
" For tmux navigator Ctrl-hjkl
call dein#add('christoomey/vim-tmux-navigator')
endif
"}}}
"""""""""""""""""""""""""""""""
" markdown {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'markdown')
call dein#add('plasticboy/vim-markdown', {'on_ft': 'markdown'})
" https://github.com/suan/vim-instant-markdown
" npm -g install instant-markdown-d
" call dein#add('suan/vim-instant-markdown')
" let g:instant_markdown_slow = 1
" let g:instant_markdown_autostart = 0
" map <F12> :InstantMarkdownPreview<CR>
" previews
" markdown preview
endif
"}}}
" orgmode {{{2
call dein#add('jceb/vim-orgmode', {'on_ft': 'org'})
call dein#add('tpope/vim-speeddating')
" }}}
"""""""""""""""""""""""""""""""
" golang {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'golang')
" 1. vim a.go
" 2. :GoInstallBinaries
" vim-go
"call dein#add('fatih/vim-go', {'do': ':GoInstallBinaries' , 'for': 'go'}
call dein#add('fatih/vim-go', {'on_ft': 'go'})
endif
"}}}
"""""""""""""""""""""""""""""""
" python {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'python')
" for python.vim syntax highlight
" pythonsyntax
call dein#add('hdima/python-syntax')
call dein#add('hynek/vim-python-pep8-indent')
call dein#add('Glench/Vim-Jinja2-Syntax')
"call dein#add('jmcantrell/vim-virtualenv')
"call dein#add('davidhalter/jedi-vim')
call dein#add('python-mode/python-mode', {'on_ft': 'python'})
endif
"}}}
"""""""""""""""""""""""""""""""
" php {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'php')
call dein#add('spf13/PIV')
endif
"}}}
"""""""""""""""""""""""""""""""
" ruby {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'ruby')
call dein#add('vim-ruby/vim-ruby')
call dein#add('tpope/vim-rails')
" dir / dar
call dein#add('nelstrom/vim-textobj-rubyblock')
endif
"}}}
"""""""""""""""""""""""""""""""
" common lisp {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'common listp')
call dein#add('kovisoft/slimv')
endif
" }}}
"""""""""""""""""""""""""""""""
" json {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'json')
" json
call dein#add('elzr/vim-json', {'on_ft': 'json'})
endif
"}}}
"""""""""""""""""""""""""""""""
" html {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'html')
call dein#add('mattn/emmet-vim')
endif
"}}}
"""""""""""""""""""""""""""""""
" coffeescript {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'coffeescript')
call dein#add('kchmck/vim-coffee-script')
endif
"}}}
"""""""""""""""""""""""""""""""
" css {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'css')
call dein#add('ap/vim-css-color')
call dein#add('hail2u/vim-css3-syntax')
endif
"}}}
"""""""""""""""""""""""""""""""
" less {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'less')
call dein#add('groenewege/vim-less')
endif
"}}}
"""""""""""""""""""""""""""""""
" scss {{{2
"""""""""""""""""""""""""""""""
if count(g:bundle_groups, 'scss')
call dein#add('cakebaker/scss-syntax.vim', {'on_ft': 'scss.css'})
endif
"}}}
"""""""""""""""""""""""""""""""
" macos {{{2
"""""""""""""""""""""""""""""""
if Platform() ==# 'mac'
" Dash.app ( OS X only )
call dein#add('rizzatti/dash.vim')
endif
"}}}
" Add plugins to &runtimepath
call dein#end()
call dein#save_state()
if dein#check_install()
call dein#install()
endif
else
echo '==> Installing dein.vim ......'
execute '!curl -sSfLo ~/.cache/dein/install.sh --create-dirs
\ https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh'
execute '!sh ~/.cache/dein/install.sh ~/.vim/bundles/'
endif
" vim: ft=vim:fdm=marker:et:sw=4: