-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc.bundles
459 lines (348 loc) · 13.2 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
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sections:
" => go to Section
" -> Plug, Header
" -> Plug, Plugins
" -> Source Local Plugins
" -> Plug, Footer
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Automatic installation of plug
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Plug, Header
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
call plug#begin('~/.vim/bundle')
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Plug, Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Universal set of vim defaults
Plug 'tpope/vim-sensible'
" Git vim integration
Plug 'tpope/vim-fugitive'
" git diffs sing, previous changes: [c next changes: ]c
Plug 'airblade/vim-gitgutter'
" repeat stuff with .
Plug 'tpope/vim-repeat'
" makes (V)im play nicely with (i)Term 2 and (t)mux
Plug 'sjl/vitality.vim'
" Active fork of ctrlp
Plug 'ctrlpvim/ctrlp.vim'
" CTRLP TOLEARN:
" Press <c-f> and <c-b> to cycle between modes.
" Use <c-t> or <c-v>, <c-x> to open the selected entry in a new tab or in a new split.
" Use <c-z> to mark/unmark multiple files and <c-o> to open them.
" fuzzy finder
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
" Plug 'janko-m/vim-test'
" airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" helps to end certain structures automatically e.g. if .... end
Plug 'tpope/vim-endwise'
" surroundings: parentheses, brackets, quotes, tags..
Plug 'tpope/vim-surround'
" extends % to latex etc
" Plug 'tmhedberg/matchit'
" Comment with gcc or gc{motion}
Plug 'vim-scripts/tComment'
Plug 'preservim/nerdtree'
" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
" search and replace across many files.
Plug 'skwp/greplace.vim'
" Plug 'scrooloose/syntastic'
Plug 'frankier/neovim-colors-solarized-truecolor-only'
" move between Vim panes and tmux splits wit ^hjkl\
Plug 'christoomey/vim-tmux-navigator'
" send portion of text from a vim buffer to a running tmux session
Plug 'jgdavey/tslime.vim'
Plug 'jpalardy/vim-slime'
" Plug 'avdgaag/vim-phoenix'
" Plug 'vim-scripts/PatternsOnText'
" easy access to a list of recently opened/edited files in Vim
Plug 'yegappan/mru'
" Latex
Plug 'lervag/vimtex'
" Other completer
" Plug 'maralla/completor.vim'
" Plug 'w0rp/ale'
" side bar for exuberant ctags
Plug 'majutsushi/tagbar'
Plug 'tpope/vim-unimpaired'
" Vim start screen
Plug 'mhinz/vim-startify'
" returns all modified files of the current git repo
" `2>/dev/null` makes the command fail quietly, so that when we are not
" in a git repo, the list will be empty
function! s:gitModified()
let files = systemlist('git ls-files -m 2>/dev/null')
return map(files, "{'line': v:val, 'path': v:val}")
endfunction
" same as above, but show untracked files, honouring .gitignore
function! s:gitUntracked()
let files = systemlist('git ls-files -o --exclude-standard 2>/dev/null')
return map(files, "{'line': v:val, 'path': v:val}")
endfunction
let g:startify_lists = [
\ { 'type': 'files', 'header': [' MRU'] },
\ { 'type': 'dir', 'header': [' MRU '. getcwd()] },
\ { 'type': 'sessions', 'header': [' Sessions'] },
\ { 'type': 'bookmarks', 'header': [' Bookmarks'] },
\ { 'type': function('s:gitModified'), 'header': [' Git Modified']},
\ { 'type': function('s:gitUntracked'), 'header': [' Git Untracked']},
\ { 'type': 'commands', 'header': [' Commands'] },
\ ]
" Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer' }
" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable'}
" runs the currently open file through Flake8
" Plug 'nvie/vim-flake8'
" Easy visualize csv files
Plug 'chrisbra/csv.vim'
" Distraction-free writing.
Plug 'junegunn/goyo.vim'
" Hyperfocus-writing, shadows non current lines
Plug 'junegunn/limelight.vim'
" visualizes branched undo history
Plug 'mbbill/undotree'
" mclab plist syntax highlight
Plug 'https://[email protected]/mclab/vim-properties-syntax.git'
" make gist in vim
" Plug 'mattn/gist-vim'
" Insert or delete brackets, parens, quotes in pair.
Plug 'jiangmiao/auto-pairs'
" search selections with * and # --> implemented in vimrc
" Plugin 'nelstrom/vim-visual-star-search'
" Python linters
" Plug 'klen/python-mode'
" Plug 'python-mode/python-mode', { 'branch': 'develop' }
" Language Server Protocol (vim and neovim)
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
set runtimepath+=~/.vim/bundle/LanguageClient-neovim
let g:LanguageClient_serverCommands = {
\ 'python': ['/usr/local/bin/pyls'],
\ 'sh': ['bash-language-server', 'start'],
\ }
if has('nvim')
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Plug 'zchee/deoplete-jedi'
else
" Plug 'Shougo/deoplete.nvim'
" Plug 'zchee/deoplete-jedi'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
let g:deoplete#enable_at_startup = 1
" fixes auto insertion
let g:jedi#completions_enabled = 0
let g:jedi#auto_vim_configuration = 0
let g:jedi#smart_auto_mappings = 0
let g:jedi#show_call_signatures = 0
nnoremap <buffer> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <buffer> K :call LanguageClient#textDocument_hover()<CR>
" Plug 'davidhalter/jedi-vim'
" vim sessions
" Plug 'xolox/vim-misc'
" Plug 'xolox/vim-session'
" Prety tabline
Plug 'mkitt/tabline.vim'
" ColorScheme-Themes
Plug 'connorholyday/vim-snazzy'
Plug 'lifepillar/vim-solarized8'
Plug 'altercation/vim-colors-solarized'
Plug 'morhetz/gruvbox'
Plug 'tomasr/molokai'
Plug 'lifepillar/vim-wwdc16-theme'
Plug 'arcticicestudio/nord-vim'
" Navigation {{{
" ,,{motion} to move fast
Plug 'easymotion/vim-easymotion'
" f{char},F{char},t{char},T{char} on first char that moves you on a given word
Plug 'unblevable/quick-scope'
" Trigger a highlight in the appropriate direction only when pressing these keys:
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
highlight QuickScopePrimary guifg='#00C7DF' gui=underline ctermfg=155 cterm=underline
highlight QuickScopeSecondary guifg='#eF5F70' gui=underline ctermfg=81 cterm=underline
let g:qs_max_chars=150
" }}}
" ,sh to sematic highlight
Plug 'jaxbot/semantic-highlight.vim'
" vim todoes
Plug 'vitalk/vim-simple-todo', { 'for': 'text' }
" gt{motion} to titlecase, gT all line
Plug 'christoomey/vim-titlecase'
" snippets
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
" use <Tab> for all your insert completion needs
Plug 'ervandew/supertab'
" alignment ga{motion}*..
Plug 'junegunn/vim-easy-align'
" autosave tex file for fast preview
Plug 'vim-scripts/vim-auto-save', { 'for': 'tex' }
" select increasingly larger regions: + to expand and _ to shrink it.
Plug 'terryma/vim-expand-region'
" incremental selection with v v v v ...
Plug 'gorkunov/smartpairs.vim'
" integrates Python documentation system into Vim
Plug 'fs111/pydoc.vim'
" Toggle booleans
" Plug 'sagarrakshe/toggle-bool'
" Plug 'mindriot101/vim-yapf', { 'for': 'python' }
" Plug 'wilywampa/vim-ipython'
" Plug 'ivanov/vim-ipython'
" find and replace
Plug 'brooth/far.vim'
" indent line
Plug 'sbdchd/indentline.vim'
" Folding for Python
" Plug 'tmhedberg/SimpylFold'
" Plug 'hdima/python-syntax'
" let python_highlight_all = 1
" " Matlab
" Plug 'raingo/vim-matlab'
" function! DoRemote(arg)
" UpdateRemotePlugins
" endfunction
" Plug 'daeyun/vim-matlab', { 'do': function('DoRemote') }
" show hexadecimal colors
Plug 'chrisbra/Colorizer'
" Semantic Highlighting for Python in Neovim
Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'}
function MyCustomHighlights()
hi semshiLocal ctermfg=209 guifg=#ff875f
hi semshiGlobal ctermfg=172 guifg=#ffaf00
hi semshiImported ctermfg=214 guifg=#ffaf00 cterm=bold gui=bold
hi semshiParameter ctermfg=117 guifg=#5fafff
hi semshiParameterUnused ctermfg=117 guifg=#87d7ff cterm=underline gui=underline
hi semshiFree ctermfg=218 guifg=#ffafd7
hi semshiBuiltin ctermfg=108 guifg=#8ec07c cterm=bold gui=bold
hi semshiAttribute ctermfg=117 guifg=#00ffaf cterm=bold gui=bold
hi semshiSelf ctermfg=246 guifg=#b2b2b2 cterm=bold gui=bold
hi semshiUnresolved ctermfg=124 guifg=#ffff00 cterm=underline gui=underline
" hi semshiSelected ctermfg=235 guifg=#ffffff ctermbg=223 guibg=#d7005f
hi semshiSelected ctermfg=223 guifg=#ffffff ctermbg=235 guibg=#d7005f cterm=bold
hi semshiErrorSign ctermfg=231 guifg=#ffffff ctermbg=160 guibg=#d70000
hi semshiErrorChar ctermfg=231 guifg=#ffffff ctermbg=160 guibg=#d70000
sign define semshiError text=E> texthl=semshiErrorSign
endfunction
autocmd FileType python call MyCustomHighlights()
autocmd ColorScheme * call MyCustomHighlights()
" highlight Cursorline 52
" hi semshiSelected ctermfg=246 guifg=#ffffff ctermbg=237 guibg=#d7005f
" floating terminal in vim
Plug 'voldikss/vim-floaterm'
" displays available keybindings in popup
Plug 'liuchengxu/vim-which-key'
" set timeoutlen=5
" WhichKey: menu for leader mappings {{{
nnoremap <silent> <leader> :WhichKey ','<CR>
nnoremap <silent> ` :WhichKey '`'<CR>
nnoremap <silent> `t :FloatermNew --wintype=popup --height=6<CR>
nnoremap<silent> `p :FloatermNew ipython<CR>
nnoremap<silent> `g :FloatermNew lazygit<CR>
" Create map to add keys to
let g:which_key_map = {}
" Define a separator
let g:which_key_sep = '→'
" set timeoutlen=100
let g:which_key_map['/'] = [ '<Plug>NERDCommenterToggle' , 'comment' ]
" Not a fan of floating windows for this
let g:which_key_use_floating_win = 0
" Change the colors if you want
" highlight default link WhichKey Operator
" highlight default link WhichKeySeperator DiffAdded
" highlight default link WhichKeyGroup Identifier
" highlight default link WhichKeyDesc Function
" Hide status line
autocmd! FileType which_key
autocmd FileType which_key set laststatus=0 noshowmode noruler
\| autocmd BufLeave <buffer> set laststatus=2 noshowmode ruler
let g:which_key_map.g = { 'name' : '+git' }
" }}}
" Stable version of coc
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" :CocInstall coc-json coc-python coc-snippets coc-vimlsp coc-sourcekit coc-spell-checker
"
"
" Kite settings:
" support also go
let g:kite_supported_languages = ['python', 'go']
" let g:kite_tab_complete=1
set completeopt+=menuone " show the popup menu even when there is only 1 match
set completeopt+=noinsert " don't insert any text until user chooses a match
set completeopt-=longest " don't insert the longest common text
set completeopt+=preview
autocmd CompleteDone * if !pumvisible() | pclose | endif
set belloff+=ctrlg " if vim beeps during completion
" let g:kite_previous_placeholder = '<C-J>'
" let g:kite_next_placeholder = '<C-K>'
" let g:kite_documentation_continual=1
" let g:kite_log=1
" Move to metakirby5 when virrual text fork is enabled
Plug 'ChristianChiarulli/codi.vim'
" Plug 'metakirby5/codi.vim'
" " Change the color
highlight CodiVirtualText guifg=green
let g:codi#virtual_text_prefix = "❯ "
"
let g:codi#aliases = {
\ 'javascript.jsx': 'javascript',
\ }
" Plug 'danielfalbo/vim-cute'
" Search for terms using Dash.app, :Dash[!] [TERM] [KEYWORD]
" settings: https://raw.githubusercontent.com/rizzatti/dash.vim/master/doc/dash.txt
" This plugin provides helpful mappings for common use cases.
"
" <Plug>DashSearch Searches for the |word| under the cursor,
" considering the current keyword setup for
" docset lookup.
"
" <Plug>DashGlobalSearch Searches for the |word| under the cursor in all
" docsets.
"
" For example, add this to your |.vimrc|:
" >
" :nmap <silent> <leader>d <Plug>DashSearch
" <
" Note: Using |:noremap| will not work with <Plug> mappings.
Plug 'rizzatti/dash.vim'
" nmap <silent> <leader>i <Plug>DashSearch
" nmap <leader>i Dash
" coc-yank
" nnoremap <silent> <leader>y :<C-u>CocList -A --normal yank<cr>
" TODO: move maps before wim which key!!!!!!!!!!!!!
" Leetcode
Plug 'ianding1/leetcode.vim'
let g:leetcode_browser = 'chrome'
let g:leetcode_solution_filetype = 'python3'
" nnoremap <leader>ll :LeetCodeList<cr>
" nnoremap <leader>lt :LeetCodeTest<cr>
" nnoremap <leader>ls :LeetCodeSubmit<cr>
" nnoremap <leader>li :LeetCodeSignIn<cr>
" RANGER
Plug 'kevinhwang91/rnvimr', {'do': 'make sync'}
" Make Ranger replace netrw and be the file explorer
let g:rnvimr_ex_enable = 1
nmap <space>r :RnvimrToggle<CR>
Plug 'keith/swift.vim'
" You may need to run this
" :RnvimrSync
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Source Local Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Allow for local Vundle bundles
if filereadable(expand("~/.vimrc.bundles.local"))
source ~/.vimrc.bundles.local
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Plug, Footer
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
call plug#end()