1
2
3
4
5
6 "Software"
7
8
9
10
11
12
13
14
15 "AS IS"
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 set nocompatible
41
42
43
44
45 let mapleader = '\'
46 let maplocalleader = '\'
47
+ - 48 +-- 46 lines: System Dependencies:
48
| 49 let g:jm_vimrc = {}
| 50
| 51
| 52
| 53 let g:jm_vimrc.docs = {}
| 54
| 55
| 56
| 57 let g:jm_vimrc.docs.commands = {}
| 58
| 59
| 60
| 61 let g:jm_vimrc.docs.mappings = {}
| 62
| 63
| 64 let g:jm_vimrc.deps = #{
| 65 \ jshell: 'jshell',
| 66 \ curl: 'curl',
| 67 \ blaze: 'blaze',
| 68 \ javap: 'javap',
| 69 \ ag: 'ag',
| 70 \ fish: 'fish',
| 71 \ python: 'python3',
| 72 \ }
| 73
| 74
| 75 let g:jm_vimrc.is_mac = system('uname -s') =~# 'Darwin'
| 76
| 77
| 78 let g:jm_vimrc.has_python = has('python3')
| 79
| 80
| 81 let g:jm_vimrc.deps.JavaClassnameList = {-> systemlist('fish -c "classpath list-all-classes"')}
| 82 let g:jm_vimrc.deps.ClasspathJarList = {-> systemlist('fish -c classpath')}
| 83
| 84 let g:jm_vimrc.deps.google_java_executable = 'google-java-format'
| 85 let g:jm_vimrc.deps.ktfmt_executable = [
| 86 \ 'java',
| 87 \ '-jar',
| 88 \ ((g:jm_vimrc.is_mac)
| 89 \ ? '/Users/jmend/.classpath/ktfmt-0.62-with-dependencies.jar'
| 90 \ : '/home/jmend/.classpath/ktfmt-0.62-with-dependencies.jar')
| 91 \ ]
| 92 let g:jm_vimrc.deps.buildozer = 'fish -c buildozer'
| 93
94
+ - 95 +-- 25 lines: Playground:
95
| 96 let s:pg_items = (g:jm_vimrc.is_mac)
| 97 \ ? #{
| 98 \ b: 'Files ~/Playground/basis',
| 99 \ co: 'Files ~/Playground',
| 100 \ cj: 'Files ~/Playground/jdk/src/java.base/share/classes',
| 101 \ cO: 'Files /opt/homebrew/lib/ocaml/',
| 102 \ pg: 'Files ~/Playground',
| 103 \ n: 'Files ~/Playground/jmendio/n',
| 104 \ v: 'edit ~/.vimrc',
| 105 \ }
| 106 \ : #{
| 107 \ b: 'Files ~/code/basis',
| 108 \ co: 'Files ~/code',
| 109 \ cg: 'Files ~/code/guava/guava/src',
| 110 \ cj: 'Files ~/code/jdk/src/java.base/share/classes',
| 111 \ cO: 'Files /usr/lib/ocaml',
| 112 \ n: 'Files ~/jmendio/n',
| 113 \ v: 'edit ~/.vimrc',
| 114 \ }
| 115 for [key, path] in items(s:pg_items)
| 116 execute printf('nnoremap <leader>e%s :%s<cr>', key, path)
| 117 let g:jm_vimrc.docs.mappings['\e' .. key] = 'Run :' .. path
| 118 endfor
| 119
120
+ - 121 +-- 88 lines: Plugins (vim-plug):
121
| 122 call plug#begin('~/.vim/bundle')
| 123
| 124
| 125 Plug 'morhetz/gruvbox'
| 126 Plug 'tpope/vim-surround'
| 127 Plug 'scrooloose/nerdtree'
| 128 Plug 'godlygeek/tabular'
| 129 if g:jm_vimrc.has_python
| 130 Plug 'SirVer/ultisnips'
| 131 Plug 'Valloric/YouCompleteMe'
| 132 endif
| 133 Plug 'honza/vim-snippets'
| 134 Plug 'junegunn/fzf', {'do': {-> fzf#install()}}
| 135 Plug 'junegunn/fzf.vim'
| 136 Plug 'junegunn/vim-easy-align'
| 137 Plug 'tpope/vim-fugitive'
| 138 Plug 'moll/vim-bbye'
| 139 Plug 'scrooloose/nerdcommenter'
| 140 Plug 'jiangmiao/auto-pairs'
| 141 Plug 'tpope/vim-repeat'
| 142 Plug 'triglav/vim-visual-increment'
| 143 Plug 'tmhedberg/SimpylFold'
| 144 Plug 'majutsushi/tagbar'
| 145 Plug 'pangloss/vim-javascript'
| 146 Plug 'justinmk/vim-syntax-extra'
| 147 Plug 'jpalardy/vim-slime'
| 148 Plug 'itchyny/lightline.vim'
| 149 Plug 'ap/vim-buftabline'
| 150 Plug 'airblade/vim-gitgutter'
| 151 Plug 'google/vim-maktaba'
| 152 Plug 'google/vim-codefmt'
| 153 Plug 'google/vim-glaive'
| 154 Plug 'frazrepo/vim-rainbow'
| 155 Plug 'AndrewRadev/splitjoin.vim'
| 156 Plug 'AndrewRadev/linediff.vim'
| 157 Plug 'shiracamus/vim-syntax-x86-objdump-d'
| 158 if isdirectory('$OCAML_OCP_INDENT')
| 159 Plug $OCAML_OCP_INDENT
| 160 endif
| 161 if exists("$BASIS")
| 162 Plug $BASIS, { 'rtp': 'vim' }
| 163 else
| 164 Plug 'jmend736/basis', { 'rtp': 'vim' }
| 165 endif
| 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 call plug#end()
| 193
| 194 if !exists('g:loaded_plug')
| 195 echoerr "ERROR: vim-plug is REQUIRED https://github.com/junegunn/vim-plug OR :InstallPlug"
| 196 command InstallPlug execute printf('term curl -fLo %s/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim', $HOME)
| 197 finish
| 198 endif
| 199
| 200
| 201 call glaive#Install()
| 202
| 203 Glaive codefmt
| 204 \ google_java_executable=`g:jm_vimrc.deps.google_java_executable`
| 205 \ clang_format_style='Google'
| 206 \ ktfmt_executable=`g:jm_vimrc.deps.ktfmt_executable`
| 207
| 208
209
+ - 210 +--105 lines: General Options:
210
| 211 filetype plugin indent on
| 212
| 213 set t_Co=256
| 214 set t_ut=
| 215
| 216 set scrolloff=0
| 217
| 218 set shell=/bin/bash
| 219
| 220 set hidden
| 221
| 222 set tabstop=2
| 223 set softtabstop=2
| 224 set shiftwidth=2
| 225 set expandtab
| 226 set smarttab
| 227
| 228 set autoindent
| 229 set smartindent
| 230
| 231
| 232 set backspace=indent,eol,start
| 233
| 234 set list
| 235 set listchars=tab:\>\ ,trail:·,extends:→,precedes:←
| 236
| 237 set number
| 238 set numberwidth=4
| 239 set relativenumber
| 240 set noruler
| 241 set showcmd
| 242
| 243 set statusline=%f\ %=L:%l/%L\ %c\ (%p%%)
| 244
| 245 set wildmenu
| 246 set wildmode=longest,list,full
| 247
| 248 set hlsearch
| 249 set incsearch
| 250 set foldopen-=search
| 251
| 252 set foldlevel=999
| 253
| 254
| 255 set ignorecase
| 256 set smartcase
| 257
| 258
| 259 set fileencodings=utf-8
| 260 set tags=tags
| 261 set tags+=/usr/include/**/tags
| 262 set printoptions=number:y,duplex:long,paper:letter
| 263 if g:jm_vimrc.is_mac
| 264 set clipboard=unnamed
| 265 else
| 266 set clipboard=unnamedplus
| 267 endif
| 268 set errorbells
| 269 set laststatus=2
| 270 set cursorline
| 271 set sessionoptions=
| 272 \blank,
| 273 \curdir,
| 274 \folds,
| 275 \help,
| 276 \localoptions,
| 277 \options,
| 278 \tabpages,
| 279 \winsize,
| 280 \terminal
| 281
| 282 set directory=~/.swaps//
| 283
| 284
| 285 digraphs el 8712
| 286 digraphs in 8712
| 287 digraphs ni 8713
| 288 digraphs es 8709
| 289 digraphs ss 8834
| 290 digraphs se 8838
| 291 digraphs ns 8836
| 292 digraphs nS 8840
| 293 digraphs nn 8745 " Intersection
| 294 digraphs uu 8746
| 295 digraphs un 8746
| 296 digraphs co 8728
| 297 digraphs \|> 8614
| 298 digraphs tl 8598
| 299 digraphs tr 8599
| 300 digraphs br 8600
| 301 digraphs bl 8601
| 302 digraphs -u 8593
| 303 digraphs -d 8595
| 304 digraphs c. 183
| 305 digraphs .. 183
| 306 digraphs T- 8866
| 307 digraphs -T 8867
| 308 digraphs =v 8659
| 309
| 310
| 311 colorscheme gruvbox
| 312 syntax enable
| 313 set bg=dark
| 314
315
+ - 316 +-- 76 lines: Plugin Settings:
316
| 317
| 318 let g:lightline = {
| 319 \ 'active': {
| 320 \ 'left': [['mode', 'paste'], ['filename', 'modified']],
| 321 \ 'right': [['winlayout', 'winid_bufnr', 'lineinfo'], ['percent', 'foldlevel'], ['readonly']]
| 322 \ },
| 323 \ 'inactive': {
| 324 \ 'left': [['filename', 'modified']],
| 325 \ 'right': [['winlayout', 'winid_bufnr', 'lineinfo'], ['readonly']]
| 326 \ },
| 327 \ 'component_type': {
| 328 \ 'readonly': 'error',
| 329 \ },
| 330 \ 'component': {
| 331 \ 'winid_bufnr': '[%{winnr()}/%{win_getid()}(%{Layout()[win_getid()]})]{%{bufnr()}}',
| 332 \ 'foldlevel': '%{(&foldenable) ? &foldlevel : "-"}f',
| 333 \ },
| 334 \ }
| 335
| 336 if !g:jm_vimrc.is_mac
| 337 let $FZF_DEFAULT_COMMAND = 'ag -l'
| 338 endif
| 339
| 340 let g:html_dynamic_folds = v:true
| 341
| 342 let g:ycm_auto_trigger = 1
| 343 let g:ycm_disable_signature_help = 1
| 344 let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
| 345 let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
| 346
| 347 if g:jm_vimrc.is_mac
| 348 let g:ycm_language_server =
| 349 \ [
| 350 \ {
| 351 \ 'name': 'kotlin-lsp',
| 352 \ 'cmdline': ['kotlin-lsp', '--stdio'],
| 353 \ 'filetypes': [ 'kotlin' ]
| 354 \ },
| 355 \ ]
| 356 endif
| 357
| 358 let g:slime_target = "tmux"
| 359
| 360
| 361 let g:bss_markdown_fix = 1
| 362
| 363 let g:bss_java_fix = 1
| 364
| 365 let g:markdown_folding = 1
| 366
| 367 let g:NERDCompactSexyComs = v:true
| 368 let g:NERDCommentEmptyLines = v:true
| 369 let g:NERDDefaultAlign = 'left'
| 370
| 371 let g:tagbar_sort = v:false
| 372
| 373
| 374 let g:buftabline_numbers = 2
| 375 let g:buftabline_indicators = v:true
| 376 let g:buftabline_separators = v:false
| 377
| 378 let g:netre_liststyle=3
| 379
| 380 let g:tex_flavor='latex'
| 381
| 382 let g:UltiSnipsExpandTrigger="<tab>"
| 383 let g:UltiSnipsJumpForwardTrigger="<c-j>"
| 384 let g:UltiSnipsJumpBackwardTrigger="<c-z>"
| 385 let g:UltiSnipsEditSplit="vertical"
| 386
| 387 let g:gitgutter_sign_added = '··'
| 388 let g:gitgutter_sign_modified = '··'
| 389 let g:gitgutter_sign_removed = '·'
| 390 let g:gitgutter_sign_modified_removed = '·'
| 391
392
+ - 393 +--153 lines: Keymappings:
393
| 394
| 395
| 396
| 397
| 398
| 399
| 400
| 401
| 402
| 403
| 404
| 405
| 406
| 407 let g:jm_vimrc.docs.mappings['<C-[hjkl]>'] =
| 408 \ 'Move between windows by holding CTRL'
| 409 noremap <C-j> <C-W>j
| 410 noremap <C-k> <C-W>k
| 411 noremap <C-h> <C-W>h
| 412 noremap <C-l> <C-W>l
| 413
| 414 let g:jm_vimrc.docs.mappings['<C-[←↑↓→]>'] =
| 415 \ 'Move visual selection'
| 416 vnoremap <C-Up> koko
| 417 vnoremap <C-Down> jojo
| 418 vnoremap <C-Left> hoho
| 419 vnoremap <C-Right> lolo
| 420
| 421 let g:jm_vimrc.docs.mappings['[['] =
| 422 \ 'Enable [[,][,]],[] to operate on non-col-1-{}'
| 423
| 424 nnoremap [[ ?{<CR>w99[{
| 425 nnoremap ][ /}<CR>b99]}
| 426 nnoremap ]] j0[[%/{<CR>
| 427 nnoremap [] k$][%?}<CR>
| 428
| 429 let g:jm_vimrc.docs.mappings['\q'] =
| 430 \ 'Delete current buffer without changing window layout'
| 431 nnoremap <leader>q :Bdelete<cr>
| 432
| 433 let g:jm_vimrc.docs.mappings["\\'"] =
| 434 \ 'Open NERDTree (file explorer)'
| 435 nnoremap <leader>' :NERDTreeToggle<cr>
| 436
| 437 let g:jm_vimrc.docs.mappings['\"'] =
| 438 \ 'Open NERDTree (file explorer) to current file'
| 439 nnoremap <leader>" :NERDTreeFind<cr>
| 440
| 441 let g:jm_vimrc.docs.mappings['\<Tab>'] =
| 442 \ 'Open Tagbar'
| 443 nnoremap <leader><tab> :TagbarToggle<cr>
| 444
| 445 let g:jm_vimrc.docs.mappings['<F10>'] =
| 446 \ 'Toggle paste'
| 447 set pastetoggle=<F10>
| 448
| 449 let g:jm_vimrc.docs.mappings['<F9>'] =
| 450 \ 'Toggle virtualedit=all'
| 451 nnoremap <F9> :let &ve = <C-r>=empty(&ve) ? '"all"' : '""'<cr><cr>
| 452
| 453 let g:jm_vimrc.docs.mappings['<C-r><C-f>'] =
| 454 \ '[modes:ic] Insert file name root'
| 455 inoremap <C-r><C-f> <C-r>=expand('%:p:t:r')<cr>
| 456 cnoremap <C-r><C-f> <C-r>=expand('%:p:t:r')<cr>
| 457
| 458 let g:jm_vimrc.docs.mappings['<C-r><C-t>'] =
| 459 \ '[modes:ic] Insert file name root'
| 460 inoremap <C-r><C-t> <C-r>=bss#blaze#BlazeTarget()<cr>
| 461 cnoremap <C-r><C-t> <C-r>=bss#blaze#BlazeTarget()<cr>
| 462
| 463 let g:jm_vimrc.docs.mappings['<C-p>'] =
| 464 \ 'Fuzzy-search PWD'
| 465 nnoremap <C-p> :Files<cr>
| 466
| 467 let g:jm_vimrc.docs.mappings['\w'] =
| 468 \ 'Clear search highlights (:nohlsearch)'
| 469 nnoremap <silent> <leader>w :nohlsearch<Bar>:echo<cr>
| 470
| 471 let g:jm_vimrc.docs.mappings['<F11>'] =
| 472 \ 'Ensure non-syntax toplevel text is spell-checked'
| 473 noremap <F11> :syntax spell toplevel<cr>
| 474 let g:jm_vimrc.docs.mappings['<F12>'] =
| 475 \ 'Toggle spell checking'
| 476 noremap <F12> :setlocal spell! spelllang=en_us<cr>
| 477
| 478 let g:jm_vimrc.docs.mappings['<Space>l'] =
| 479 \ 'Open Git ("Change [L]ist")'
| 480 nnoremap <leader>l :Git<cr>
| 481
| 482 let g:jm_vimrc.docs.mappings['<C-w><C-z>'] =
| 483 \ 'Set window height to 10 and fix the height'
| 484 nnoremap <C-w><C-z> :FixHeight 10<cr>
| 485 nnoremap <C-w>z :FixHeight 10<cr>
| 486
| 487 let g:jm_vimrc.docs.mappings['K'] =
| 488 \ 'Do grep for word under cursor'
| 489 nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
| 490
| 491 let g:jm_vimrc.docs.mappings['\\'] =
| 492 \ 'Show :tags'
| 493 nnoremap <leader><leader> :tags<cr>
| 494
| 495 let g:jm_vimrc.docs.mappings['\s'] =
| 496 \ 'Refresh UltSnips snippets'
| 497 nnoremap <leader>s :call UltiSnips#RefreshSnippets()<cr>
| 498
| 499 let g:jm_vimrc.docs.mappings['\<Space>'] =
| 500 \ 'Open BssHg'
| 501 nnoremap <leader><space> :BssHg<cr>
| 502
| 503 let g:jm_vimrc.docs.mappings['\a'] =
| 504 \ 'Trigger EasyAlign (See :Wtf ea)'
| 505 xmap <leader>a <Plug>(EasyAlign)
| 506 nmap <leader>a <Plug>(EasyAlign)
| 507
| 508 let g:jm_vimrc.docs.mappings['\O'] =
| 509 \ 'Run `open %`'
| 510 xmap <leader>O :<C-u>!open %<cr>
| 511 nmap <leader>O :<C-u>!open %<cr>
| 512
| 513 let g:jm_vimrc.docs.mappings["C-W !"] =
| 514 \ 'Toggle buflisted'
| 515 nnoremap <C-W>l :set buflisted!<cr>
| 516
| 517 nnoremap <space>c :YcmCompleter GetType<cr>
| 518 nnoremap <space>cq :YcmCompleter GoToDocumentOutline<cr>
| 519 nnoremap <space>cc :YcmCompleter GoToCallers<cr>
| 520 nnoremap <space>cC :YcmCompleter GoToDefinition<cr>
| 521 nnoremap <space>cf :YcmCompleter FixIt<cr>
| 522 nnoremap <space>cd :YcmCompleter GetDoc<cr>
| 523 nnoremap <space>ct :YcmCompleter GetType<cr>
| 524
| 525 let g:jm_vimrc.docs.mappings["<space>T"] =
| 526 \ 'Go to java test (and maybe make it)'
| 527 nnoremap <space>T :FindOrMakeJavaTest<cr>
| 528
| 529 let g:jm_vimrc.docs.mappings['\a[:(]'] =
| 530 \ 'Extra/overriden EasyAlign items'
| 531 let g:easy_align_delimiters = bss#extra#EasyAlignDelimiters()
| 532
| 533 let g:jm_vimrc.docs.mappings['\[0-9]'] =
| 534 \ 'Switch to buffer (from buftabline)'
| 535 nmap <leader>1 <Plug>BufTabLine.Go(1)
| 536 nmap <leader>2 <Plug>BufTabLine.Go(2)
| 537 nmap <leader>3 <Plug>BufTabLine.Go(3)
| 538 nmap <leader>4 <Plug>BufTabLine.Go(4)
| 539 nmap <leader>5 <Plug>BufTabLine.Go(5)
| 540 nmap <leader>6 <Plug>BufTabLine.Go(6)
| 541 nmap <leader>7 <Plug>BufTabLine.Go(7)
| 542 nmap <leader>8 <Plug>BufTabLine.Go(8)
| 543 nmap <leader>9 <Plug>BufTabLine.Go(9)
| 544 nmap <leader>0 <Plug>BufTabLine.Go(10)
| 545
546
+ - 547 +--228 lines: Commands:
547
| 548
| 549
| 550
| 551
| 552
| 553
| 554
| 555
| 556
| 557 if !exists('g:jm_term') || !exists('g:jm_terms')
| 558 let g:jm_term = bss#view#TermView()
| 559 let g:jm_terms = {}
| 560 endif
| 561 let g:jm_vimrc.docs.commands['Term'] =
| 562 \ 'Run a terminal command in a reused window'
| 563 command! -nargs=* -complete=shellcmd Term
| 564 \ eval g:jm_term.Run(<q-args>)
| 565
| 566 let g:jm_vimrc.docs.commands['TermSet'] =
| 567 \ 'Set an option on the term window'
| 568 command! -nargs=* -complete=option TermSet
| 569 \ eval g:jm_term.Exec(printf("setlocal %s", <q-args>))
| 570
| 571 let g:jm_vimrc.docs.commands['Terms'] =
| 572 \ 'Run a terminal command in a reused named window. Terms [name] [cmd]...'
| 573 command! -nargs=* -complete=shellcmd Terms
| 574 \ eval bss#SetDefault(g:jm_terms, [<f-args>][0], {-> bss#view#TermView()})
| 575 \ .Run([<f-args>][1:]->join(' '))
| 576
| 577 let g:jm_vimrc.docs.commands['ReplaceR'] =
| 578 \ 'Locally set \r to run :Term with the specified command'
| 579 command! -nargs=+ ReplaceR
| 580 \ nnoremap <buffer> <localleader>r :Term <args><cr>
| 581
| 582 let g:jm_vimrc.docs.commands['ReplaceRTarget'] =
| 583 \ 'Set \r to bazel target of the current file'
| 584 command! -bar ReplaceRTarget
| 585 \ execute 'ReplaceR' BlazeGuessCommand()
| 586
| 587 let g:jm_vimrc.docs.commands['StopAllJobs'] =
| 588 \ 'Stop all running jobs'
| 589 command! -bar StopAllJobs eval job_info()->map('job_stop(v:val)')
| 590
| 591 let g:jm_vimrc.docs.commands['ListAllJobs'] =
| 592 \ 'List all running jobs'
| 593 command! -bar -bang ListAllJobs
| 594 \ call bss#PP(job_info()->filter('<bang>0 || (job_status(v:val) == "run")'))
| 595
| 596 let g:jm_vimrc.docs.commands['DumpAllJobs'] =
| 597 \ 'List job_infos for all running jobs'
| 598 command! -bar -bang DumpAllJobs
| 599 \ call bss#PP(job_info()->filter('<bang>0 || (job_status(v:val) == "run")')->map('job_info(v:val)'))
| 600
| 601 let g:jm_vimrc.docs.commands['SetupClasspath'] =
| 602 \ 'Set classpath to jm_vimrc.deps.ClasspathJarList()'
| 603 command! -bar SetupClasspath
| 604 \ let $CLASSPATH = join(g:jm_vimrc.deps.ClasspathJarList(), ':')
| 605
| 606 let g:jm_vimrc.docs.commands['SetupTargetClasspath'] =
| 607 \ 'Set classpath to blaze target included jars'
| 608 command! -bar SetupTargetClasspath
| 609 \ let $CLASSPATH = s:TargetClasspath()
| 610
| 611 let g:jm_vimrc.docs.commands['SetupCV'] =
| 612 \ 'Setup $LDFLAGS, $CFLAGS and &path for OpenCV development'
| 613 command! -bar SetupCV
| 614 \ let $LDFLAGS = '-lopencv_core -lopencv_imgcodecs -lopencv_imgproc' |
| 615 \ let $CFLAGS = '-I/usr/include/opencv4' |
| 616 \ let &path ..= ',/usr/include/opencv4,/usr/include/c++/10/'
| 617
| 618 let g:jm_vimrc.docs.commands['FixHeight'] =
| 619 \ 'Resize window and fix its height'
| 620 command! -nargs=1 FixHeight
| 621 \ resize <args> | set winfixheight
| 622
| 623 let g:jm_vimrc.docs.commands['SetupTermRainbow'] =
| 624 \ 'Add Rainbow-coloring to terminals'
| 625 command! -bar SetupTermRainbow
| 626 \ autocmd TerminalOpen * RainbowLoad
| 627
| 628 let g:jm_vimrc.docs.commands['SetupAutoread'] =
| 629 \ 'Enable autoread and add checktime autocmd'
| 630 command! -bar SetupAutoread
| 631 \ set autoread | autocmd FocusGained,BufEnter * checktime
| 632
| 633 let g:jm_vimrc.docs.commands['RemoveTrailingWhitespace'] =
| 634 \ 'Removes all trailing whitespace from the selected lines'
| 635 command! -range=% RemoveTrailingWhitespace
| 636 \ <line1>,<line2>s/\s\+$//
| 637
| 638 let g:jm_vimrc.docs.commands['SetupMatchHex'] =
| 639 \ 'Match hex numbers'
| 640 command! -bar SetupMatchHex
| 641 \ match GruvboxAqua /\<0x0*\zs[1-9a-f]\x*\>/
| 642
| 643 let g:jm_vimrc.docs.commands['SetupMatchNum'] =
| 644 \ 'Match decimal numbers'
| 645 command! -bar SetupMatchNum
| 646 \ match GruvboxAqua /\<\(0x\)\?0*\zs[1-9a-f]\x*\>/
| 647
| 648 let g:jm_vimrc.docs.commands['RefreshSnippets'] =
| 649 \ 'Refresh ultisnips'
| 650 command! -bar RefreshSnippets
| 651 \ call UltiSnips#RefreshSnippets()
| 652
| 653 let g:jm_vimrc.docs.commands['Dis'] =
| 654 \ 'Setup terminal for viewing objdump output ($ objdump -d ... | vim +Dis -)'
| 655 command! -bar Dis
| 656 \ setlocal ft=dis buftype=nofile
| 657
| 658 let g:jm_vimrc.docs.commands['Center'] =
| 659 \ 'Block alignment-preserving :center'
| 660 call bss#draw#block#RegisterCommands()
| 661
| 662 let g:jm_vimrc.docs.commands['ToggleFoldOpenSearch'] =
| 663 \ 'Toggle search on foldopen option'
| 664 command! ToggleFoldOpenSearch
| 665 \ if stridx(&foldopen, "search") == -1 |
| 666 \ set foldopen+=search |
| 667 \ echo "ENABLED foldopen search" |
| 668 \ else |
| 669 \ set foldopen-=search |
| 670 \ echo "DISABLED foldopen search" |
| 671 \ endif
| 672
| 673 let g:jm_vimrc.docs.commands['SetupMath'] =
| 674 \ 'Set up abbreviations for math symbols'
| 675 command! SetupMath
| 676 \ execute 'iabbrev <buffer> nn ∩' |
| 677 \ execute 'iabbrev <buffer> uu ∪' |
| 678 \ execute 'iabbrev <buffer> in ∈' |
| 679 \ execute 'iabbrev <buffer> ni ∉' |
| 680 \ execute 'iabbrev <buffer> ss ⊂' |
| 681 \ execute 'iabbrev <buffer> se ⊆' |
| 682 \ execute 'iabbrev <buffer> ns ⊄' |
| 683 \ execute 'iabbrev <buffer> AN ∧' |
| 684 \ execute 'iabbrev <buffer> OR ∨' |
| 685 \ execute 'iabbrev <buffer> es ∅' |
| 686 \ execute 'iabbrev <buffer> => ⇒' |
| 687 \ execute 'iabbrev <buffer> == ⇔' |
| 688 \ execute 'iabbrev <buffer> != ≠' |
| 689 \ execute 'iabbrev <buffer> co ∘' |
| 690 \ execute 'iabbrev <buffer> FA ∀' |
| 691 \ execute 'iabbrev <buffer> TE ∃' |
| 692 \ execute 'iabbrev <buffer> \|> ↦'
| 693
| 694 let g:jm_vimrc.docs.commands['PyHelp'] =
| 695 \ 'Look-up help for python expression (: PyHelp <pkg> <cls>)'
| 696 command! -nargs=+ -bang PyHelp
| 697 \ call py3eval((<bang>0) ? printf('help(%s)', <q-args>) : printf('help(__import__("%s").%s)', <f-args>))
| 698
| 699 let g:jm_vimrc.docs.commands['MakeOrSetup'] =
| 700 \ 'Run blaze, make, or create a Makefile with included commands (using ; as separator)'
| 701 command! -nargs=+ MakeOrSetup call s:MakeOrSetup(<q-args>)
| 702 function! s:MakeOrSetup(cmds) abort
| 703 if filereadable('Makefile')
| 704 Term make
| 705 elseif filereadable('WORKSPACE')
| 706 execute 'Term blaze build' BlazeTarget()
| 707 elseif filereadable('gradlew')
| 708 Term ./gradlew test --rerun
| 709 else
| 710 let l:cmds = substitute(a:cmds, '%', expand('%'), 'g')
| 711 let l:lines = split(l:cmds, ';')->map('trim(v:val)')
| 712 let l:cursor = bss#cursor#SaveWithBuf()
| 713 try
| 714 redir > Makefile
| 715 silent echo '.PHONY: all'
| 716 silent echo 'all:'
| 717 for l:cmd in l:lines
| 718 silent echo ' ' .. l:cmd
| 719 endfor
| 720 redir END
| 721 silent edit Makefile
| 722 Term make
| 723 finally
| 724 call l:cursor.Restore()
| 725 endtry
| 726 endif
| 727 endfunction
| 728
| 729 let g:jm_vimrc.docs.commands['SetupYcmClasspath'] =
| 730 \ 'Create .ycm_extra_conf.py with CLASSPATH'
| 731 command! -bang SetupYcmClasspath
| 732 \ call s:SetupYcmClasspath($CLASSPATH)
| 733 function! s:SetupYcmClasspath(classpath) abort
| 734 let l:classpath = split(a:classpath, ':')
| 735 let l:lines = s:GenerateYcm(l:classpath)
| 736 if filereadable('.ycm_extra_conf.py')
| 737 throw 'ERROR(FileExists): .ycm_extra_conf.py already exists!'
| 738 else
| 739 call writefile(l:lines, '.ycm_extra_conf.py')
| 740 YcmRestartServer
| 741 endif
| 742 endfunction
| 743 function! s:GenerateYcm(classpath) abort
| 744 let l:path = a:classpath
| 745 \->map('string(v:val)')
| 746 \->join(", ")
| 747 let l:lines =<< eval trim END
| 748 def Settings(**kwargs):
| 749 if kwargs["language"] == "java":
| 750 return {{
| 751 "ls": {{
| 752 "java.project.referencedLibraries": [{l:path}]
| 753 }}
| 754 }}
| 755 END
| 756 return l:lines
| 757 endfunction
| 758
| 759 let g:jm_vimrc.docs.commands['SetupOcamlformat'] =
| 760 \ 'Create a basic .ocamlformat'
| 761 command! SetupOcamlformat call s:SetupOcamlformat()
| 762 function! s:SetupOcamlformat() abort
| 763 if !filereadable('.ocamlformat')
| 764 call writefile(['profile = default'], '.ocamlformat')
| 765 endif
| 766 endfunction
| 767
| 768
| 769 if executable('ag')
| 770
| 771 set grepprg=ag\ --nogroup\ --nocolor\ --ignore=tags\ --vimgrep
| 772 set grepformat^=%f:%l:%c:%m
| 773 endif
| 774
775
+ - 776 +--295 lines: FT-Specific Settings:
776
| 777
| 778
| 779
| 780
| 781
| 782
| 783
| 784
| 785
| 786
| 787
| 788
| 789
| 790
| 791
| 792
| 793
| 794 augroup ft_latex
| 795 autocmd!
| 796 autocmd FileType tex setlocal nocursorline
| 797 autocmd FileType tex setlocal tabstop=4 shiftwidth=4
| 798 autocmd FileType tex nnoremap <buffer> <localleader>r
| 799 \ :execute 'Term fish -c "mkt ' .. expand('%') .. '"'<cr>
| 800 augroup END
| 801
| 802 augroup ft_dot
| 803 autocmd!
| 804 autocmd FileType dot setlocal tabstop=2 shiftwidth=2
| 805 autocmd FileType dot nnoremap <buffer> <localleader>r
| 806 \ :execute 'Term dot -T svg -O' expand('%') <cr>
| 807 augroup END
| 808
| 809 augroup ft_c
| 810 autocmd!
| 811 autocmd FileType c setlocal tabstop=2 shiftwidth=2
| 812 autocmd FileType c setlocal foldmethod=syntax
| 813 autocmd FileType c nnoremap <buffer> <localleader>r
| 814 \ :Term make<CR>
| 815 autocmd FileType c nnoremap <buffer> <localleader>R
| 816 \ :MakeOrSetup gcc -Wall -O3 -o a.out %; ./a.out; rm a.out<cr>
| 817 augroup END
| 818
| 819
| 820 augroup ft_cc
| 821 autocmd!
| 822 autocmd FileType cpp setlocal tabstop=2 shiftwidth=2
| 823 autocmd FileType cpp setlocal foldmethod=syntax
| 824 autocmd FileType cpp nnoremap <buffer> <localleader>t
| 825 \ :term <C-r>=BlazeGuessCommand()<CR>
| 826 autocmd FileType cpp nnoremap <buffer> <localleader>r
| 827 \ :MakeOrSetup
| 828 \ clang++-12 -std=c++17 $(CFLAGS) -o build % $(LDFLAGS);
| 829 \ ./build<CR>
| 830 autocmd FileType cpp nnoremap <buffer> <space>f
| 831 \ :FormatCode<CR>
| 832 autocmd FileType cpp
| 833 \ if exists('g:jm_setup_cpp_cv') |
| 834 \ SetupCV |
| 835 \ endif
| 836 autocmd FileType cpp
| 837 \ if expand('%:p') =~ '/home/jmend/pg' |
| 838 \ silent ReplaceRTarget |
| 839 \ endif
| 840 augroup END
| 841
| 842 augroup ft_gdb
| 843 autocmd!
| 844 autocmd FileType gdb nnoremap <buffer> <localleader>r
| 845 \ :execute 'Term gdb -q -x' expand('%')<cr>
| 846 augroup END
| 847
| 848 augroup ft_python
| 849 autocmd!
| 850 autocmd FileType python command! RunPython
| 851 \ execute "Term" g:jm_vimrc.deps.python expand('%')
| 852 autocmd FileType python command! RunPythonTests
| 853 \ execute "Term" g:jm_vimrc.deps.python "-m pytest" expand('%')
| 854 autocmd FileType python command! RunPythonTypechecks
| 855 \ execute "Term" g:jm_vimrc.deps.python "-m mypy --ignore-missing-imports --follow-imports=skip " expand("%")
| 856 autocmd FileType python command! RunPythonMPL
| 857 \ StopAllJobs | eval timer_start(0, {-> execute('RunPython')})
| 858 autocmd FileType python command! ReplaceRMPL
| 859 \ nnoremap <buffer> <localleader>r :RunPythonMPL<cr>
| 860 autocmd FileType python nnoremap <buffer> <localleader>r
| 861 \ :RunPython<cr>
| 862 autocmd FileType python nnoremap <buffer> <localleader>R
| 863 \ :RunPythonTests<cr>
| 864 autocmd FileType python nnoremap <buffer> <localleader>t
| 865 \ :RunPythonTypechecks<cr>
| 866 autocmd FileType python nnoremap <buffer> <space>f
| 867 \ :FormatCode<CR>
| 868
| 869 autocmd BufNewFile .ycm_extra_conf.py call setline('.', [
| 870 \ 'def Settings(**kwargs):',
| 871 \ ' if kwargs["language"] == "java":',
| 872 \ ' return {',
| 873 \ ' "ls": {',
| 874 \ ' "java.project.referencedLibraries": ["~/.jars/*.jar"]',
| 875 \ ' }',
| 876 \ ' }',
| 877 \ ])
| 878
| 879
| 880 augroup END
| 881
| 882 augroup ft_scheme
| 883 autocmd!
| 884 autocmd FileType scheme setlocal colorcolumn=79
| 885 autocmd FileType scheme let g:lisp_rainbow = v:true
| 886 autocmd FileType scheme nnoremap <buffer> <localleader>r
| 887 \ :w<CR> :Term mit-scheme --load % <CR>
| 888 augroup END
| 889
| 890 augroup ft_java
| 891 autocmd!
| 892 autocmd FileType java
| 893 \ setlocal tabstop=2 softtabstop=2 tabstop=2 shiftwidth=2 smarttab
| 894 autocmd FileType java
| 895 \ setlocal foldmethod=marker foldmarker={,}
| 896 autocmd FileType java nnoremap <space>f :FormatCode<cr>
| 897 autocmd FileType java nnoremap <space>F :set bt=nowrite <bar> FormatCode<cr>
| 898 autocmd FileType java vnoremap <space>f :FormatLines<cr>
| 899 autocmd FileType java nnoremap <silent> <buffer> <localleader>r
| 900 \ :MakeOrSetup java %<cr>
| 901 autocmd FileType java nnoremap <silent> <buffer> <localleader>R
| 902 \ :Term ./gradlew run<cr>
| 903 autocmd FileType java let b:surround_99 = "{@code \r}"
| 904 autocmd FileType java nnoremap <silent> <buffer> gd
| 905 \ :YcmCompleter GoToDefinition<cr>
| 906 autocmd FileType java nnoremap <silent> <buffer> gD
| 907 \ :YcmCompleter GoToReferences<cr>
| 908 augroup END
| 909
| 910 augroup ft_kotlin
| 911 autocmd!
| 912 autocmd FileType kotlin
| 913 \ setlocal tabstop=2 softtabstop=2 tabstop=2 shiftwidth=2 smarttab
| 914
| 915 autocmd FileType kotlin nnoremap <silent> <buffer> <localleader>r
| 916 \ :MakeOrSetup
| 917 \ kotlinc . -include-runtime -d a.jar;
| 918 \ java -jar a.jar<CR>
| 919 autocmd FileType kotlin nnoremap <silent> <buffer> <localleader>R
| 920 \ :Term ./gradlew run<cr>
| 921 autocmd FileType kotlin nnoremap <space>f :FormatCode<cr>
| 922 autocmd FileType kotlin vnoremap <space>f :FormatLines<cr>
| 923 autocmd FileType kotlin nnoremap <silent> <buffer> gd
| 924 \ :YcmCompleter GoToDefinition<cr>
| 925 autocmd FileType kotlin nnoremap <silent> <buffer> gD
| 926 \ :YcmCompleter GoToReferences<cr>
| 927 augroup END
| 928
| 929 augroup ft_jar
| 930 autocmd!
| 931 autocmd FileType jar
| 932 \ call zip#Browse(expand("<amatch>"))
| 933 autocmd FileType jar
| 934 \ setlocal buflisted
| 935 augroup END
| 936
| 937 augroup ft_class
| 938 autocmd!
| 939 autocmd BufReadCmd *.class
| 940 \ call bss#java#javap#Browse(expand("<amatch>"))
| 941 augroup END
| 942
| 943 augroup ft_javascript
| 944 autocmd!
| 945 autocmd FileType javascript
| 946 \ setlocal tabstop=2 softtabstop=2 tabstop=2 smarttab
| 947 autocmd FileType javascript nnoremap <buffer> <localleader>r
| 948 \ :execute "Term node " .. expand('%')<cr>
| 949 autocmd FileType javascript nnoremap <buffer> <localleader>R
| 950 \ :Term webpack<CR>
| 951 autocmd FileType javascript nnoremap <buffer> <space>f
| 952 \ :FormatCode<CR>
| 953 augroup END
| 954
| 955 augroup ft_markdown
| 956 autocmd!
| 957 autocmd FileType markdown set textwidth=72 smartindent autoindent
| 958 autocmd FileType markdown set cinwords+=:
| 959
| 960 autocmd FileType markdown nnoremap <buffer> ]h :<c-u>call search('\v^#+ ', 'Wz')<cr>
| 961 autocmd FileType markdown nnoremap <buffer> [h :<c-u>call search('\v^#+ ', 'bWz')<cr>
| 962
| 963
| 964
| 965 autocmd FileType markdown nnoremap <buffer> <space>l :<c-u>lvimgrep /\v^#+ / %<cr>
| 966
| 967 autocmd FileType markdown
| 968 \ command! GoToSection call bss#md#GoToSection()
| 969
| 970 autocmd FileType markdown nnoremap <buffer> <localleader>r
| 971 \ :GoToSection<cr>
| 972
| 973 autocmd FileType markdown nnoremap <buffer> <localleader>R
| 974 \ :call bss#md#GoToRandomSection()<cr>
| 975 \ :normal zt0<cr>
| 976
| 977 autocmd FileType markdown command! SetupRPandoc nnoremap <buffer> <localleader>r
| 978 \ :call execute(printf(
| 979 \ "Term pandoc %s -s --highlight-style kate --pdf-engine=xelatex -o %s.pdf",
| 980 \ expand('%:p'),
| 981 \ expand('%:t:r'),
| 982 \ ))<cr>
| 983
| 984 autocmd FileType markdown command! JmMdQuotesAsComments match GruvboxFg3 /^\s*>.*/
| 985
| 986 if !exists('g:bss_markdown_fix') || !g:bss_markdown_fix
| 987
| 988
| 989 autocmd FileType markdown syntax clear markdownCodeBlock
| 990 autocmd FileType markdown syntax region markdownCodeBlock matchgroup=markdownCodeDelimiter start="^\s*\z(`\{3,\}\).*$" end="^\s*\z1\ze\s*$" keepend
| 991 autocmd FileType markdown syntax region markdownCodeBlock matchgroup=markdownCodeDelimiter start="^\s*\z(\~\{3,\}\).*$" end="^\s*\z1\ze\s*$" keepend
| 992
| 993
| 994 autocmd FileType markdown highlight link markdownH1 GruvboxRedBold
| 995 autocmd FileType markdown highlight link markdownH2 GruvboxBlueBold
| 996 autocmd FileType markdown highlight link markdownH3 GruvboxGreenBold
| 997 autocmd FileType markdown highlight link markdownH4 GruvboxPurpleBold
| 998
| 999
| 1000 autocmd FileType markdown highlight link markdownBold GruvboxFg4
| 1001 autocmd FileType markdown highlight link markdownBoldDelimiter GruvboxFg4
| 1002 autocmd FileType markdown highlight link markdownItalic GruvboxFg2
| 1003 autocmd FileType markdown highlight link markdownItalicDelimiter GruvboxFg2
| 1004 endif
| 1005 augroup END
| 1006
| 1007 augroup ft_vim
| 1008 autocmd!
| 1009 autocmd FileType vim setlocal foldmethod=marker shiftwidth=2
| 1010 autocmd FileType vim nnoremap <buffer> <localleader>r
| 1011 \ :source %<cr>
| 1012 autocmd FileType vim nnoremap K :help <C-r><C-w><CR>
| 1013 augroup END
| 1014
| 1015 augroup ft_fish
| 1016 autocmd!
| 1017 autocmd FileType fish setlocal tabstop=4 shiftwidth=4 smartindent
| 1018 autocmd FileType fish nnoremap <buffer> <space>f
| 1019 \ :0,$!fish_indent<cr>
| 1020 autocmd FileType fish setlocal omnifunc=bss#fish#Complete
| 1021 augroup END
| 1022
| 1023 augroup ft_make
| 1024 autocmd!
| 1025 autocmd FileType make nnoremap <buffer> <localleader>r
| 1026 \ :Term make<cr>
| 1027 augroup END
| 1028
| 1029 augroup ft_ocaml
| 1030 autocmd!
| 1031 autocmd FileType ocaml
| 1032 \ setlocal tabstop=2 softtabstop=2 tabstop=2 smarttab
| 1033 autocmd FileType ocaml nnoremap <space>f :FormatCode<cr>
| 1034 autocmd FileType ocaml vnoremap <space>f :FormatLines<cr>
| 1035 if filereadable('Makefile')
| 1036 autocmd FileType ocaml nnoremap <silent> <buffer> <localleader>r
| 1037 \ :Term make<cr>
| 1038 elseif filereadable('dune-project')
| 1039 autocmd FileType ocaml nnoremap <silent> <buffer> <localleader>r
| 1040 \ :Term dune build<cr>
| 1041 else
| 1042 autocmd FileType ocaml nnoremap <silent> <buffer> <localleader>r
| 1043 \ :execute 'Term ocaml' expand("%")<cr>
| 1044 endif
| 1045 if isdirectory('/usr/bin/ocaml')
| 1046 autocmd FileType ocaml set path+=/usr/lib/ocaml
| 1047 endif
| 1048 augroup END
| 1049
| 1050 augroup ft_coq
| 1051 autocmd!
| 1052 autocmd FileType coq
| 1053 \ setlocal tabstop=2 softtabstop=2 tabstop=2 smarttab smartindent
| 1054 if filereadable('Makefile')
| 1055 autocmd FileType coq nnoremap <silent> <buffer> <localleader>r
| 1056 \ :Term make<cr>
| 1057 else
| 1058 autocmd FileType coq nnoremap <silent> <buffer> <localleader>r
| 1059 \ :execute 'Term coqc' expand("%")
| 1060 \ <bar> execute 'TermSet ft=coq'<cr>
| 1061 endif
| 1062 augroup END
| 1063
| 1064
| 1065 augroup cfg_quickfix_fix
| 1066 autocmd QuickFixCmdPost [^l]* nested cwindow
| 1067 autocmd QuickFixCmdPost l* nested lwindow
| 1068 augroup end
| 1069
| 1070
1071
+ - 1072 +--538 lines: Misc:
1072
| 1073
| 1074
| 1075
| 1076
| 1077
| 1078
| 1079
| 1080
|+ |- 1081 +--- 73 lines:
1081
|| 1082 let g:jm_vimrc.docs.commands['FindImport'] =
|| 1083 \ 'Given a name, find the corresponding import and add an import statment'
|| 1084 nnoremap <space>t :call <SID>FindImport(expand('<cword>'))<CR>
|| 1085 command -nargs=1 FindImport call <SID>FindImport(<q-args>)
|| 1086 function! s:FindImport(word) abort
|| 1087
|| 1088 if &filetype ==# 'cpp'
|| 1089 if !bss#imp#TryAddImportFromCache(g:jm_vimrc.cc_import_cache, a:word, 'bss#imp#AddImportCpp')
|| 1090 echo "FindImport: `" .. a:word .. "` not found!"
|| 1091 endif
|| 1092 return
|| 1093 endif
|| 1094
|| 1095 if &filetype ==# 'kotlin'
|| 1096
|| 1097 if bss#imp#TryAddImportFromCache(g:jm_vimrc.kotlin_import_cache, a:word, 'bss#imp#AddImportKotlin')
|| 1098 return
|| 1099 endif
|| 1100
|| 1101 if bss#imp#TryAddImportFromCache(g:jm_vimrc.java_import_cache, a:word, 'bss#imp#AddImportKotlin')
|| 1102 return
|| 1103 endif
|| 1104
|| 1105
|| 1106 let l:results = printf(
|| 1107 \ '%s --nofilename --nobreak %s',
|| 1108 \ g:jm_vimrc.deps.ag,
|| 1109 \ shellescape(printf('import .+\b%s\b', a:word)))
|| 1110 \->systemlist()
|| 1111 \->sort()
|| 1112 \->uniq()
|| 1113
|| 1114
|| 1115 if empty(l:results)
|| 1116 let l:results = g:jm_vimrc.deps.JavaClassnameList()
|| 1117 \->filter('v:val =~# a:word')
|| 1118 \->map('"import " .. v:val')
|| 1119 endif
|| 1120
|| 1121 call bss#imp#AddOrSelectImport(l:results, 'bss#imp#AddImportJvm')
|| 1122 return
|| 1123 endif
|| 1124
|| 1125 if &filetype !=# 'java'
|| 1126 throw 'ERROR(InvalidFiletype)'
|| 1127 return
|| 1128 endif
|| 1129
|| 1130
|| 1131 if bss#imp#TryAddImportFromCache(g:jm_vimrc.java_import_cache, a:word, 'bss#imp#AddImportJava')
|| 1132 return
|| 1133 endif
|| 1134
|| 1135
|| 1136 let l:results = printf(
|| 1137 \ '%s --nofilename --nobreak %s',
|| 1138 \ g:jm_vimrc.deps.ag,
|| 1139 \ shellescape(printf('import .+\b%s\b;', a:word)))
|| 1140 \->systemlist()
|| 1141 \->sort()
|| 1142 \->uniq()
|| 1143
|| 1144
|| 1145 if empty(l:results)
|| 1146 let l:results = g:jm_vimrc.deps.JavaClassnameList()
|| 1147 \->filter('v:val =~# a:word')
|| 1148 \->map('"import " .. v:val .. ";"')
|| 1149 endif
|| 1150
|| 1151 call bss#imp#AddOrSelectImport(l:results, 'bss#imp#AddImportJvm')
|| 1152 endfunction
|| 1153
| 1154
| 1155
| 1156
|+ |- 1157 +--- 40 lines:
1157
|| 1158 let g:jm_vimrc.docs.commands['Javap'] =
|| 1159 \ 'Execute Javap and show output with highlighting'
|| 1160 command! -nargs=? -complete=customlist,<SID>JavapComplete -bang
|| 1161 \ Javap call <SID>Javap(<q-args>, "<bang>" ==# '!')
|| 1162 function! s:Javap(arg, search) abort
|| 1163 if empty($CLASSPATH)
|| 1164 SetupClasspath
|| 1165 endif
|| 1166
|| 1167
|| 1168 let l:cls = empty(a:arg) ? @" : a:arg
|| 1169 let l:cls = substitute(l:cls, '\(;\|<.\+>\)', '', 'ga')
|| 1170
|| 1171 if a:search
|| 1172 let l:results = s:JavapComplete(l:cls, v:none, v:none)
|| 1173 if len(l:results) == 1
|| 1174 let l:cls = l:results[0]
|| 1175 else
|| 1176 call maktaba#ui#selector#Create(l:results)
|| 1177 \.WithMappings({'<cr>': [function("s:JavapOpen")->get("name"), 'Close', 'Open window']})
|| 1178 \.Show()
|| 1179 return
|| 1180 endif
|| 1181 endif
|| 1182
|| 1183 eval g:jm_term
|| 1184 \.Run(join([g:jm_vimrc.deps.javap, l:cls], ' '))
|| 1185 \.Exec('set ft=java')
|| 1186 endfunction
|| 1187
|| 1188 function! s:JavapComplete(arg_lead, cmd_line, cursor_pos) abort
|| 1189 return g:jm_vimrc.deps.JavaClassnameList()
|| 1190 \->filter('v:val =~# a:arg_lead')
|| 1191 endfunction
|| 1192
|| 1193 function! s:JavapOpen(cls) abort
|| 1194 execute 'Javap ' .. a:cls
|| 1195 endfunction
|| 1196
| 1197
| 1198
| 1199
| 1200
|+ |- 1201 +--- 69 lines:
1201
|| 1202 let g:jm_vimrc.docs.commands['MavenSearch'] =
|| 1203 \ 'Search maven, then either add a dependecy or download the jar'
|| 1204 command! -nargs=1 MavenSearch call <SID>MavenSearch(<q-args>)
|| 1205 command! -nargs=1 M MavenSearch <args>
|| 1206 function! s:MavenSearch(query) abort
|| 1207 const l:request = {
|| 1208 \ "page": 0,
|| 1209 \ "size": 20,
|| 1210 \ "searchTerm": a:query,
|| 1211 \ "filter": []
|| 1212 \ }
|| 1213 const l:query_url =
|| 1214 \ 'https://central.sonatype.com/api/internal/browse/components'
|| 1215
|| 1216 const l:query_cmd = join([
|| 1217 \ g:jm_vimrc.deps.curl,
|| 1218 \ '-s',
|| 1219 \ l:query_url,
|| 1220 \ '--json',
|| 1221 \ shellescape(json_encode(l:request))
|| 1222 \ ])
|| 1223
|| 1224 let l:msg = system(l:query_cmd)
|| 1225 let l:resp = json_decode(l:msg)
|| 1226
|| 1227 if l:resp.totalResultCount == 0
|| 1228 echom "None found!"
|| 1229 return
|| 1230 endif
|| 1231 let l:components = l:resp.components
|| 1232 const l:mappings = {
|| 1233 \ '<cr>': [function("s:MInsert")->get("name"), 'Close', 'Insert below'],
|| 1234 \ 'D': [function("s:MDownload")->get("name"), 'Close', 'Insert below'],
|| 1235 \ }
|| 1236 call maktaba#ui#selector#Create(map(l:components, 'v:val.namespace .. ":" .. v:val.name .. ":" .. v:val.latestVersionInfo.version'))
|| 1237 \.WithMappings(l:mappings)
|| 1238 \.Show()
|| 1239 endfunction
|| 1240
|| 1241 function! s:MInsert(msg) abort
|| 1242 let l:spaces = getline('.')->matchstr('^\s*')
|| 1243 call append(line('.'), printf("%simplementation '%s'", l:spaces, a:msg))
|| 1244 endfunction
|| 1245
|| 1246 function! s:MDownload(msg) abort
|| 1247 let [l:package, l:name, l:version] = split(a:msg, ':')
|| 1248 let l:url_package = substitute(l:package, '\.', '/', 'g')
|| 1249 let l:url = printf('https://repo1.maven.org/maven2/%s/%s/%s/',
|| 1250 \ l:url_package,
|| 1251 \ l:name,
|| 1252 \ l:version)
|| 1253 let l:file = printf('%s-%s.jar', l:name, l:version)
|| 1254 let l:file_url = l:url .. l:file
|| 1255 echom l:url .. l:file
|| 1256
|| 1257 const l:cmd = join([
|| 1258 \ g:jm_vimrc.deps.curl,
|| 1259 \ '-o',
|| 1260 \ shellescape(l:file),
|| 1261 \ '-s',
|| 1262 \ shellescape(l:file_url),
|| 1263 \ ])
|| 1264 silent call system(l:cmd)
|| 1265 if v:shell_error
|| 1266 echom 'ERROR: Could not download! ' .. l:file_url
|| 1267 endif
|| 1268 endfunction
|| 1269
| 1270
| 1271
| 1272
| 1273
| 1274
| 1275
| 1276
| 1277
| 1278
| 1279
| 1280
| 1281
| 1282
| 1283
| 1284
| 1285
|+ |- 1286 +--- 69 lines:
1286
|| 1287 function! s:BlazeTargets(fname) abort
|| 1288 let l:query = printf(
|| 1289 \ 'same_pkg_direct_rdeps(%s)',
|| 1290 \ fnamemodify(a:fname, ":p:."),
|| 1291 \ )
|| 1292
|| 1293 let l:command = printf(
|| 1294 \ "%s query '%s'",
|| 1295 \ g:jm_vimrc.deps.blaze,
|| 1296 \ l:query,
|| 1297 \ )
|| 1298 return filter(systemlist(l:command), 'v:val =~# "^//"')
|| 1299 endfunction
|| 1300
|| 1301 function! BlazeGuessCommand(show = v:false) abort
|| 1302 let l:fname = expand('%:p')
|| 1303
|| 1304 let l:target = BlazeTarget()
|| 1305 if l:target ==# "???"
|| 1306 echom "Can't find blaze target!"
|| 1307 return "false"
|| 1308 endif
|| 1309
|| 1310 let l:action = 'build'
|| 1311 if l:fname =~# '\v(_test.cc|Test.java)$' || l:target =~# '\v(_test|Test)$'
|| 1312 let l:action = 'test'
|| 1313 elseif l:fname =~# '\v(main.cc|_bin.cc|Bin.java)$' || l:target =~# '\v(_bin|Bin|main|Main)$'
|| 1314 let l:action = 'run'
|| 1315 elseif l:fname =~# '\v(_bench.cc)$' || l:target =~# '\v(_bench)$'
|| 1316 let l:action = 'run -c opt'
|| 1317 endif
|| 1318
|| 1319 let l:command = printf(
|| 1320 \ "%s %s %s",
|| 1321 \ g:jm_vimrc.deps.blaze,
|| 1322 \ l:action,
|| 1323 \ l:target,
|| 1324 \ )
|| 1325 if a:show
|| 1326 echom 'Using:' l:command
|| 1327 endif
|| 1328 return l:command
|| 1329 endfunction
|| 1330
|| 1331 function! BlazeTarget() abort
|| 1332 return get(s:BlazeTargets(expand('%:p')), 0, "???")
|| 1333 endfunction
|| 1334
|| 1335 function! s:TargetClasspath() abort
|| 1336 let l:target = BlazeTarget()
|| 1337 if l:target ==# "???"
|| 1338 echom "Can't find blaze target!"
|| 1339 return ""
|| 1340 endif
|| 1341
|| 1342 let l:lines = systemlist(printf('blaze print_action "%s"', l:target))
|| 1343 let l:jars = filter(l:lines, {_, v -> v =~# '^\s\+\(outputjar\|classpath\): "[^"]*"'})
|| 1344 \->map({_, v -> matchlist(v, '"\([^"]*\)"')[1]})
|| 1345 return join(l:jars, ':')
|| 1346 endfunction
|| 1347
|| 1348 function! s:CompleteTargets(arg_lead, cmd_line, cursor_pos) abort
|| 1349 if a:arg_lead =~ '^//.*'
|| 1350 return systemlist(printf('%s query ... 2>&1', g:jm_vimrc.deps.blaze))
|| 1351 \->filter('v:val =~# "' .. a:arg_lead .. '"')
|| 1352 endif
|| 1353 endfunction
|| 1354
| 1355
| 1356
| 1357
|+ |- 1358 +--- 16 lines:
1358
|| 1359 let g:jm_vimrc.docs.commands['Touch'] =
|| 1360 \ 'Create files and directories'
|| 1361 command! -nargs=* Touch call s:Touch([<f-args>])
|| 1362 function! s:Touch(paths) abort
|| 1363 for l:path in a:paths
|| 1364 let l:dir = fnamemodify(l:path, ':h')
|| 1365 if l:dir !=# '.' && !isdirectory(l:dir)
|| 1366 call system('mkdir -p ' .. shellescape(l:dir))
|| 1367 endif
|| 1368 if !filereadable(l:path)
|| 1369 call system('touch ' .. shellescape(l:path))
|| 1370 endif
|| 1371 endfor
|| 1372 endfunction
|| 1373
| 1374
| 1375
| 1376
|+ |- 1377 +--- 8 lines:
1377
|| 1378 let g:jm_vimrc.docs.commands['CurrentHLGroup'] =
|| 1379 \ 'Echo name of the highlight group under the cursor'
|| 1380 command! CurrentHLGroup echo s:SyntaxItem()
|| 1381 function! s:SyntaxItem()
|| 1382 return synIDattr(synID(line("."), col("."), 1), "name")
|| 1383 endfunction
|| 1384
| 1385
| 1386
| 1387
| 1388
| 1389
| 1390
|+ |- 1391 +--- 9 lines:
1391
|| 1392 function! s:Async(Fn)
|| 1393 eval timer_start(0, a:Fn)
|| 1394 endfunction
|| 1395
|| 1396 function! s:AsyncExec(...)
|| 1397 eval s:Async({-> execute(join(map(a:000, function('string'))))})
|| 1398 endfunction
|| 1399
| 1400
| 1401
| 1402
|+ |- 1403 +--- 17 lines:
1403
|| 1404 let g:jm_vimrc.docs.commands['ConcealK'] =
|| 1405 \ 'Define conceal rules: eg. ConcealK lambda:λ'
|| 1406 command! -complete=expression -nargs=1 ConcealK call <SID>ConcealK(<q-args>)
|| 1407 function! s:ConcealK(repl_str) abort
|| 1408 let l:repl = {}
|| 1409 let l:i = 0
|| 1410 for [l:keyword, l:replacement] in split(a:repl_str, ' ')->map('v:val->split(":")')
|| 1411 let l:i += 1
|| 1412 execute 'syntax keyword'
|| 1413 \ printf('ConcealK%03d', l:i) l:keyword
|| 1414 \ 'conceal' printf('cchar=%s', l:replacement)
|| 1415 endfor
|| 1416 setlocal conceallevel=1
|| 1417 setlocal concealcursor=ni
|| 1418 endfunction
|| 1419
| 1420
| 1421
| 1422
|+ |- 1423 +--- 5 lines:
1423
|| 1424 let g:jm_vimrc.docs.commands['ReadExecute'] =
|| 1425 \ 'Execute then read the output of that vim command'
|| 1426 command! -nargs=* -complete=command ExecuteRead eval append(line('.'), execute(<q-args>)->split("\n"))
|| 1427
| 1428
| 1429
| 1430
|+ |- 1431 +--- 9 lines:
1431
|| 1432 let g:jm_vimrc.docs.commands['Bdz'] =
|| 1433 \ 'Run buildozer on current target (or :__pkg__ if none exists)'
|| 1434 command! -nargs=* Bdz echom
|| 1435 \ system(printf("fish -c \"buildozer '%s' %s\"",
|| 1436 \ join([<f-args>], ' '),
|| 1437 \ BlazeTarget() != '???' ? BlazeTarget() : ':__pkg__'
|| 1438 \ ))
|| 1439
| 1440
| 1441
| 1442 "format:`cmd`""format: END"
|+ |- 1443 +--- 38 lines:
1443
|| 1444 let g:jm_vimrc.docs.commands['JemFormat'] =
|| 1445 \ 'Format lines between "format:`cmd`" to "format: END"'
|| 1446 command! -nargs=* -complete=customlist,<SID>JemFormatComplete JemFormat eval s:JemFormat[<q-args>]()
|| 1447 let s:JemFormat = {
|| 1448 \ '' : {-> s:JemFormat.format()},
|| 1449 \ 'help' : {-> bss#PP(s:JemFormat, v:true)},
|| 1450 \ }
|| 1451 function! s:JemFormatComplete(arglead, cmdline, curpos) abort
|| 1452 return keys(s:JemFormat)->filter({k, v -> !stridx(v, a:arglead)})
|| 1453 endfunction
|| 1454
|| 1455 function! s:JemFormat.format() abort dict
|| 1456 let command = self.find()
|| 1457 if !empty(command)
|| 1458 silent execute command
|| 1459 endif
|| 1460 endfunction
|| 1461
|| 1462 function! s:JemFormat.find() abort dict
|| 1463 let [_, num, col; _] = getcurpos()
|| 1464 let start_pat = '\v.*for' .. 'mat: `([^`]+)`.*'
|| 1465 let end_pat = '\v.*for' .. 'mat: END.*'
|| 1466 let start_lines = matchbufline(bufnr(), start_pat, 1, num)
|| 1467 let start_line = bss#Last(start_lines)
|| 1468 let end_line = start_line
|| 1469 \->bss#Get('lnum')
|| 1470 \->bss#Apply({l -> matchbufline(bufnr(), end_pat, l, '$')})
|| 1471 \->bss#Apply('bss#Last')
|| 1472 \->bss#Or('$')
|| 1473 if start_line is v:none
|| 1474 return ''
|| 1475 endif
|| 1476 let range = [start_line.lnum + 1, end_line.lnum - 1]->join(',')
|| 1477 let command = substitute(start_line.text, start_pat, '\1', '')
|| 1478 return join([range, command], ' ')
|| 1479 endfunction
|| 1480
| 1481
| 1482
| 1483
| 1484
| 1485
| 1486
| 1487
| 1488
|+ |- 1489 +--- 50 lines:
1489
|| 1490 command! -nargs=1 -complete=file SetupAppendMarkdownBlock
|| 1491 \ nnoremap <buffer> \r :AppendMarkdownBlock <args><cr>
|| 1492 command! -nargs=1 -complete=file -range=% AppendMarkdownBlock
|| 1493 \ eval AppendMarkdownBlock(<q-args>, <line1>, <line2>)
|| 1494 command! -nargs=1 -complete=file AppendMarkdownBlockDebug
|| 1495 \ eval AppendMarkdownBlock(<q-args>, 0, '$', v:true)
|| 1496
|| 1497 function! AppendMarkdownBlock(fname, begin=0, end='$', debug=v:false) abort
|| 1498 let lines = getline(a:begin, a:end)->s:Markdown_lines2codeblock()
|| 1499 if !a:debug
|| 1500 call s:AppendMarkdownBlock_write(a:fname, lines)
|| 1501 else
|| 1502 call s:AppendMarkdownBlock_dump(a:fname, lines)
|| 1503 endif
|| 1504 endfunction
|| 1505
|| 1506
|| 1507
|| 1508
|| 1509 function! s:Markdown_lines2codeblock(lines) abort
|| 1510 let prefix = '```'
|| 1511 let suffix = prefix
|| 1512 return [prefix] + a:lines + [suffix]
|| 1513 endfunction
|| 1514
|| 1515
|| 1516
|| 1517
|| 1518
|| 1519 function! s:AppendMarkdownBlock_write(fname, lines) abort
|| 1520 let prefix = (readfile(a:fname)->bss#Last()->empty())
|| 1521 \ ? [] : [""]
|| 1522 call writefile(prefix + a:lines, a:fname, 'a')
|| 1523 echom "Wrote file" a:fname
|| 1524 endfunction
|| 1525
|| 1526
|| 1527
|| 1528
|| 1529 function! s:AppendMarkdownBlock_dump(fname, lines) abort
|| 1530
|| 1531 echo 'fname:' a:fname
|| 1532 echo 'lines:'
|| 1533 echo
|| 1534 for l in a:lines
|| 1535 echo ' ' .. l
|| 1536 endfor
|| 1537 endfunction
|| 1538
| 1539
| 1540
| 1541
|+ |- 1542 +--- 17 lines:
1542
|| 1543 command! -nargs=? -complete=customlist,s:SetupSlimeTarget_Complete SetupSlimeTarget call s:SetupSlimeTarget(<q-args>)
|| 1544 let s:SlimeTargets = [
|| 1545 \ 'tmux',
|| 1546 \ 'vimterminal',
|| 1547 \ ]
|| 1548 function! s:SetupSlimeTarget(arg) abort
|| 1549 if empty(a:arg)
|| 1550 echom printf('Current slime target: %s', g:slime_target)
|| 1551 else
|| 1552 let g:slime_target = a:arg
|| 1553 endif
|| 1554 endfunction
|| 1555 function! s:SetupSlimeTarget_Complete(arg, ...) abort
|| 1556 return s:SlimeTargets->filter('stridx(v:val, a:arg) == 0')
|| 1557 endfunction
|| 1558
| 1559
| 1560 function! Layout() abort
| 1561 let layout = winlayout()
| 1562 return s:InvertLayout(layout)
| 1563 endfunction
| 1564 function! s:InvertLayout(l, path=[]) abort
| 1565 if len(a:l) != 2
| 1566 throw "ERROR(InvalidArguments): s:InvertLayout expects only 2-element lists"
| 1567 endif
| 1568 let [kind, val] = a:l
| 1569 if kind ==# 'leaf'
| 1570 return {val: join(a:path, '')}
| 1571 elseif kind ==# 'col'
| 1572 return val
| 1573 \->map('s:InvertLayout(v:val, a:path + ["|"])')
| 1574 \->reduce({a, b -> extend(a, b)})
| 1575 elseif kind ==# 'row'
| 1576 return val
| 1577 \->map('s:InvertLayout(v:val, a:path + ["-"])')
| 1578 \->reduce({a, b -> extend(a, b)})
| 1579 endif
| 1580 endfunction
| 1581
| 1582
| 1583
| 1584
| 1585
|+ |- 1586 +--- 22 lines:
1586
|| 1587 command! FindOrMakeJavaTest call s:FindOrMakeJavaTest()
|| 1588 function! s:FindOrMakeJavaTest() abort
|| 1589 let l:path = expand('%:p:h')
|| 1590 let l:name = expand('%:t:r')
|| 1591 let l:extn = expand('%:t:e')
|| 1592 if l:path =~# ".*/src/main/java/.*"
|| 1593 let l:path = substitute(l:path, "src/main/java", "src/test/java", "")
|| 1594 let l:name .= 'Test'
|| 1595 elseif l:path =~# ".*/src/test/java/.*" && l:name =~# ".*Test$"
|| 1596 let l:path = substitute(l:path, "src/test/java", "src/main/java", "")
|| 1597 let l:name = l:name[:-5]
|| 1598 elseif l:path =~# ".*/java/.*"
|| 1599 let l:path = substitute(l:path, "/java/", "/javatests/", "")
|| 1600 let l:name .= 'Test'
|| 1601 elseif l:path =~# ".*/javatests/.*" && l:name =~# ".*Test$"
|| 1602 let l:path = substitute(l:path, "/javatests/", "/java/", "")
|| 1603 let l:name = l:name[:-5]
|| 1604 endif
|| 1605 execute 'edit' $"{l:path}/{l:name}.{l:extn}"
|| 1606 endfunction
|| 1607
| 1608
| 1609
1610
+ - 1611 +-- 5 lines: Notes
1611
| 1612 let s:Wtf = bss#wtf#Initialize()
| 1613 call bss#wtf#AddDict(['mappings', 'm'], g:jm_vimrc.docs.mappings)
| 1614 call bss#wtf#AddDict(['commands', 'c'], g:jm_vimrc.docs.commands)
| 1615
1616
1617
1618
1619
1620 TODO
+ - 1621 +--414 lines: Java Import Cache:
1621
| 1622 let g:jm_vimrc.java_import_list =<< JAVA_IMPORT_LIST_END
| 1623 com.google.auto.common.AnnotationMirrors
| 1624 com.google.auto.common.AnnotationValues
| 1625 com.google.auto.common.BasicAnnotationProcessor
| 1626 com.google.auto.common.MoreElements
| 1627 com.google.auto.common.MoreTypes
| 1628 com.google.common.base.Stopwatch
| 1629 com.google.common.collect.ImmutableList
| 1630 com.google.common.collect.ImmutableMap
| 1631 com.google.common.collect.ImmutableSet
| 1632 com.google.common.collect.ImmutableTable
| 1633 com.google.common.collect.Lists
| 1634 com.google.common.collect.Streams
| 1635 com.google.common.collect.Table
| 1636 com.google.common.collect.Tables
| 1637 com.google.common.math.Stats
| 1638 com.google.common.math.StatsAccumulator
| 1639 com.google.common.util.concurrent.AbstractExecutionThreadService
| 1640 com.google.common.util.concurrent.AbstractFuture
| 1641 com.google.common.util.concurrent.AbstractScheduledService
| 1642 com.google.common.util.concurrent.AbstractTransformFuture
| 1643 com.google.common.util.concurrent.FutureCallback
| 1644 com.google.common.util.concurrent.Futures
| 1645 com.google.common.util.concurrent.ListenableFuture
| 1646 com.google.common.util.concurrent.ListenableFutureTask
| 1647 com.google.common.util.concurrent.ListenableScheduledFuture
| 1648 com.google.common.util.concurrent.ListenerCallQueue
| 1649 com.google.common.util.concurrent.ListeningExecutorService
| 1650 com.google.common.util.concurrent.ListeningScheduledExecutorService
| 1651 com.google.common.util.concurrent.MoreExecutors
| 1652 com.google.common.util.concurrent.SettableFuture
| 1653 com.google.common.util.concurrent.Uninterruptibles
| 1654 com.squareup.javapoet.ClassName
| 1655 com.squareup.javapoet.CodeBlock
| 1656 com.squareup.javapoet.FieldSpec
| 1657 com.squareup.javapoet.JavaFile
| 1658 com.squareup.javapoet.MethodSpec
| 1659 com.squareup.javapoet.ParameterSpec
| 1660 com.squareup.javapoet.ParameterizedTypeName
| 1661 com.squareup.javapoet.TypeName
| 1662 com.squareup.javapoet.TypeSpec
| 1663 dagger.Binds
| 1664 dagger.BindsInstance
| 1665 dagger.Component
| 1666 dagger.MapKey
| 1667 dagger.Module
| 1668 dagger.Provides
| 1669 dagger.multibindings.ClassKey
| 1670 dagger.multibindings.ElementsIntoSet
| 1671 dagger.multibindings.IntKey
| 1672 dagger.multibindings.IntoMap
| 1673 dagger.multibindings.IntoSet
| 1674 dagger.multibindings.LongKey
| 1675 dagger.multibindings.Multibinds
| 1676 dagger.multibindings.StringKey
| 1677 dagger.producers.Produced
| 1678 dagger.producers.Producer
| 1679 dagger.producers.ProducerModule
| 1680 dagger.producers.Producers
| 1681 dagger.producers.Produces
| 1682 dagger.producers.Production
| 1683 dagger.producers.ProductionComponent
| 1684 dagger.producers.ProductionScope
| 1685 dagger.producers.ProductionSubcomponent
| 1686 dagger.producers.monitoring.ProducerMonitor
| 1687 dagger.producers.monitoring.ProducerToken
| 1688 dagger.producers.monitoring.ProductionComponentMonitor
| 1689 java.io.IOException
| 1690 java.lang.reflect.AnnotatedElement
| 1691 java.lang.reflect.Executable
| 1692 java.lang.reflect.Field
| 1693 java.lang.reflect.GenericDeclaration
| 1694 java.lang.reflect.Method
| 1695 java.lang.reflect.Modifier
| 1696 java.lang.reflect.Type
| 1697 java.nio.file.Files
| 1698 java.nio.file.Path
| 1699 java.util.ArrayList
| 1700 java.util.Arrays
| 1701 java.util.Collection
| 1702 java.util.HashMap
| 1703 java.util.HashSet
| 1704 java.util.Iterator
| 1705 java.util.LinkedList
| 1706 java.util.List
| 1707 java.util.Map
| 1708 java.util.NavigableMap
| 1709 java.util.Optional
| 1710 java.util.OrderedMap
| 1711 java.util.Set
| 1712 java.util.TreeMap
| 1713 java.util.TreeSet
| 1714 java.util.concurrent.ConcurrentHashMap
| 1715 java.util.concurrent.CopyOnWriteArrayList
| 1716 java.util.concurrent.ExecutionException
| 1717 java.util.concurrent.Executor
| 1718 java.util.concurrent.ExecutorService
| 1719 java.util.concurrent.Executors
| 1720 java.util.concurrent.Future
| 1721 java.util.concurrent.ThreadPoolExecutor
| 1722 java.util.concurrent.TimeUnit
| 1723 java.util.concurrent.atomic.AtomicInteger
| 1724 java.util.concurrent.atomic.AtomicLong
| 1725 java.util.concurrent.atomic.LongAdder
| 1726 java.util.function.Consumer
| 1727 java.util.function.Function
| 1728 java.util.function.Predicate
| 1729 java.util.function.Supplier
| 1730 java.util.stream.Collector
| 1731 java.util.stream.Collectors
| 1732 java.util.stream.Stream
| 1733 javax.annotation.processing.AbstractProcessor
| 1734 javax.annotation.processing.Completion
| 1735 javax.annotation.processing.Completions
| 1736 javax.annotation.processing.Filer
| 1737 javax.annotation.processing.FilerException
| 1738 javax.annotation.processing.Generated
| 1739 javax.annotation.processing.Messager
| 1740 javax.annotation.processing.ProcessingEnvironment
| 1741 javax.annotation.processing.Processor
| 1742 javax.annotation.processing.RoundEnvironment
| 1743 javax.annotation.processing.SupportedAnnotationTypes
| 1744 javax.annotation.processing.SupportedOptions
| 1745 javax.annotation.processing.SupportedSourceVersion
| 1746 javax.inject.Inject
| 1747 javax.inject.Named
| 1748 javax.inject.Provider
| 1749 javax.inject.Qualifier
| 1750 javax.inject.Singleton
| 1751 javax.lang.model.element.Element
| 1752 javax.lang.model.element.ElementVisitor
| 1753 javax.lang.model.element.ExecutableElement
| 1754 javax.lang.model.element.Modifier
| 1755 javax.lang.model.element.TypeElement
| 1756 javax.lang.model.type.TypeMirror
| 1757 org.apache.commons.lang3.builder.ReflectionToStringBuilder
| 1758 org.apache.commons.lang3.builder.ToStringStyle
| 1759 org.objectweb.asm.ClassReader
| 1760 org.objectweb.asm.ClassVisitor
| 1761 org.objectweb.asm.ClassWriter
| 1762 org.objectweb.asm.FieldVisitor
| 1763 org.objectweb.asm.MethodVisitor
| 1764 org.objectweb.asm.Opcodes
| 1765 org.objectweb.asm.TypePath
| 1766 org.openjdk.jmh.annotations.AuxCounters
| 1767 org.openjdk.jmh.annotations.Benchmark
| 1768 org.openjdk.jmh.annotations.BenchmarkMode
| 1769 org.openjdk.jmh.annotations.CompilerControl
| 1770 org.openjdk.jmh.annotations.Fork
| 1771 org.openjdk.jmh.annotations.Group
| 1772 org.openjdk.jmh.annotations.GroupThreads
| 1773 org.openjdk.jmh.annotations.Level
| 1774 org.openjdk.jmh.annotations.Measurement
| 1775 org.openjdk.jmh.annotations.Mode
| 1776 org.openjdk.jmh.annotations.OperationsPerInvocation
| 1777 org.openjdk.jmh.annotations.OutputTimeUnit
| 1778 org.openjdk.jmh.annotations.Param
| 1779 org.openjdk.jmh.annotations.Scope
| 1780 org.openjdk.jmh.annotations.Setup
| 1781 org.openjdk.jmh.annotations.State
| 1782 org.openjdk.jmh.annotations.TearDown
| 1783 org.openjdk.jmh.annotations.Threads
| 1784 org.openjdk.jmh.annotations.Timeout
| 1785 org.openjdk.jmh.annotations.Warmup
| 1786 org.openjdk.jmh.infra.BenchmarkParams
| 1787 org.openjdk.jmh.infra.Blackhole
| 1788 org.openjdk.jmh.infra.Control
| 1789 org.openjdk.jmh.infra.IterationParams
| 1790 org.openjdk.jmh.infra.ThreadParams
| 1791 org.openjdk.jmh.results.RunResult
| 1792 org.openjdk.jmh.results.format.ResultFormatType
| 1793 org.openjdk.jmh.runner.Runner
| 1794 org.openjdk.jmh.runner.RunnerException
| 1795 org.openjdk.jmh.runner.options.CommandLineOptionException
| 1796 org.openjdk.jmh.runner.options.CommandLineOptions
| 1797 org.openjdk.jmh.runner.options.Options
| 1798 org.openjdk.jmh.runner.options.OptionsBuilder
| 1799 static com.google.common.collect.ImmutableList.toImmutableList
| 1800 static com.google.common.collect.ImmutableSet.toImmutableSet
| 1801 static com.google.common.truth.Truth.assertThat
| 1802 static com.google.common.truth.Truth.assertWithMessage
| 1803 static com.google.common.util.concurrent.MoreExecutors.directExecutor
| 1804 static java.util.concurrent.TimeUnit.DAYS
| 1805 static java.util.concurrent.TimeUnit.HOURS
| 1806 static java.util.concurrent.TimeUnit.MICROSECONDS
| 1807 static java.util.concurrent.TimeUnit.MILLISECONDS
| 1808 static java.util.concurrent.TimeUnit.MINUTES
| 1809 static java.util.concurrent.TimeUnit.NANOSECONDS
| 1810 static java.util.concurrent.TimeUnit.SECONDS
| 1811 static java.util.stream.Collectors.averagingDouble
| 1812 static java.util.stream.Collectors.averagingInt
| 1813 static java.util.stream.Collectors.averagingLong
| 1814 static java.util.stream.Collectors.collectingAndThen
| 1815 static java.util.stream.Collectors.counting
| 1816 static java.util.stream.Collectors.filtering
| 1817 static java.util.stream.Collectors.flatMapping
| 1818 static java.util.stream.Collectors.groupingBy
| 1819 static java.util.stream.Collectors.joining
| 1820 static java.util.stream.Collectors.mapping
| 1821 static java.util.stream.Collectors.maxBy
| 1822 static java.util.stream.Collectors.minBy
| 1823 static java.util.stream.Collectors.partitioningBy
| 1824 static java.util.stream.Collectors.reducing
| 1825 static java.util.stream.Collectors.summarizingDouble
| 1826 static java.util.stream.Collectors.summarizingInt
| 1827 static java.util.stream.Collectors.summarizingLong
| 1828 static java.util.stream.Collectors.summingDouble
| 1829 static java.util.stream.Collectors.summingInt
| 1830 static java.util.stream.Collectors.summingLong
| 1831 static java.util.stream.Collectors.toCollection
| 1832 static java.util.stream.Collectors.toConcurrentMap
| 1833 static java.util.stream.Collectors.toList
| 1834 static java.util.stream.Collectors.toMap
| 1835 static java.util.stream.Collectors.toSet
| 1836 static java.util.stream.Collectors.toUnmodifiableList
| 1837 static java.util.stream.Collectors.toUnmodifiableMap
| 1838 static java.util.stream.Collectors.toUnmodifiableSet
| 1839 java.net.ServerSocket
| 1840 java.net.Socket
| 1841 java.io.OutputStream
| 1842 com.google.common.flogger.FluentLogger
| 1843 static com.google.common.util.concurrent.Futures.immediateFuture
| 1844 java.util.concurrent.atomic.AtomicReference
| 1845 static com.google.common.util.concurrent.Futures.immediateVoidFuture
| 1846 java.util.concurrent.atomic.AtomicMarkableReference
| 1847 java.util.Random
| 1848 java.time.Instant
| 1849 static com.google.common.base.Preconditions.checkArgument
| 1850 static com.google.common.base.Preconditions.checkNotNull
| 1851 static org.mockito.Mockito.mock
| 1852 static org.mockito.Mockito.verify
| 1853 static org.mockito.ArgumentMatchers.any
| 1854 static org.mockito.Mockito.times
| 1855 static org.mockito.AdditionalMatchers.and
| 1856 static org.mockito.ArgumentMatchers.assertArg
| 1857 org.jline.reader.LineReader
| 1858 org.jline.reader.LineReaderBuilder
| 1859 org.jline.terminal.Cursor
| 1860 org.jline.terminal.KeyEvent
| 1861 org.jline.terminal.KeyParser
| 1862 org.jline.terminal.MouseEvent
| 1863 org.jline.terminal.Size
| 1864 org.jline.terminal.Terminal
| 1865 org.jline.terminal.TerminalBuilder
| 1866 org.jline.utils.AttributedCharSequence
| 1867 org.jline.utils.AttributedString
| 1868 org.jline.utils.AttributedStringBuilder
| 1869 org.jline.utils.AttributedStyle
| 1870 org.jline.utils.ColorPalette
| 1871 org.jline.utils.Colors
| 1872 org.jline.utils.InfoCmp.Capability
| 1873 org.jline.builtins.Completers.TreeCompleter
| 1874 org.jline.builtins.Completers.TreeCompleter.node
| 1875 org.jline.utils.NonBlockingReader
| 1876 JAVA_IMPORT_LIST_END
| 1877
| 1878 let g:jm_vimrc.kotlin_import_list =<< KOTLIN_IMPORT_LIST_END
| 1879 kotlin.concurrent.thread
| 1880 kotlin.concurrent.Volatile
| 1881 kotlin.concurrent.withLock
| 1882 kotlin.coroutines.AbstractCoroutineContextElement
| 1883 kotlin.coroutines.AbstractCoroutineContextKey
| 1884 kotlin.coroutines.Continuation
| 1885 kotlin.coroutines.ContinuationInterceptor
| 1886 kotlin.coroutines.CoroutineContext
| 1887 kotlin.coroutines.EmptyCoroutineContext
| 1888 kotlin.coroutines.RestrictsSuspension
| 1889 kotlin.coroutines.coroutineContext
| 1890 kotlin.coroutines.createCoroutine
| 1891 kotlin.coroutines.getPolymorphicElement
| 1892 kotlin.coroutines.minusPolymorphicKey
| 1893 kotlin.coroutines.resume
| 1894 kotlin.coroutines.resumeWithException
| 1895 kotlin.coroutines.startCoroutine
| 1896 kotlin.coroutines.suspendCoroutine
| 1897 kotlin.reflect.KClass
| 1898 kotlin.reflect.KFunction
| 1899 kotlin.reflect.KProperty
| 1900 kotlin.reflect.full.memberProperties
| 1901 kotlin.test.AfterTest
| 1902 kotlin.test.BeforeTest
| 1903 kotlin.test.Test
| 1904 kotlin.test.assertContains
| 1905 kotlin.test.assertEquals
| 1906 kotlin.test.assertFails
| 1907 kotlin.test.assertFailsWith
| 1908 kotlin.test.assertFalse
| 1909 kotlin.test.assertNotEquals
| 1910 kotlin.test.assertNotNull
| 1911 kotlin.test.assertNull
| 1912 kotlin.test.assertSame
| 1913 kotlin.test.assertTrue
| 1914 kotlin.test.fail
| 1915 kotlin.time.Clock
| 1916 kotlin.time.Duration
| 1917 kotlin.time.Duration.Companion.INFINITE
| 1918 kotlin.time.Duration.Companion.ZERO
| 1919 kotlin.time.Duration.Companion.days
| 1920 kotlin.time.Duration.Companion.hours
| 1921 kotlin.time.Duration.Companion.microseconds
| 1922 kotlin.time.Duration.Companion.milliseconds
| 1923 kotlin.time.Duration.Companion.minutes
| 1924 kotlin.time.Duration.Companion.nanoseconds
| 1925 kotlin.time.Duration.Companion.seconds
| 1926 kotlin.time.DurationUnit
| 1927 kotlin.time.DurationUnit.DAYS
| 1928 kotlin.time.DurationUnit.HOURS
| 1929 kotlin.time.DurationUnit.MICROSECONDS
| 1930 kotlin.time.DurationUnit.MILLISECONDS
| 1931 kotlin.time.DurationUnit.MINUTES
| 1932 kotlin.time.DurationUnit.NANOSECONDS
| 1933 kotlin.time.DurationUnit.SECONDS
| 1934 kotlin.time.Instant
| 1935 kotlin.time.TimeMark
| 1936 kotlin.time.TimeSource
| 1937 kotlin.time.TimedValue
| 1938 kotlin.time.measureTime
| 1939 kotlin.time.measureTimedValue
| 1940 kotlin.time.toDuration
| 1941 kotlin.time.toDurationUnit
| 1942 kotlin.time.toJSDate
| 1943 kotlin.time.toJavaDuration
| 1944 kotlin.time.toKotlinDuration
| 1945 kotlin.time.toKotlinInstant
| 1946 kotlin.time.toTimeUnit
| 1947 kotlinx.coroutines.CoroutineDispatcher
| 1948 kotlinx.coroutines.CoroutineScope
| 1949 kotlinx.coroutines.Deferred
| 1950 kotlinx.coroutines.Dispatchers
| 1951 kotlinx.coroutines.Dispatchers.IO
| 1952 kotlinx.coroutines.Dispatchers.Main
| 1953 kotlinx.coroutines.Dispatchers.Unconfined
| 1954 kotlinx.coroutines.Job
| 1955 kotlinx.coroutines.asCoroutineDispatcher
| 1956 kotlinx.coroutines.async
| 1957 kotlinx.coroutines.channels.Channel
| 1958 kotlinx.coroutines.coroutineScope
| 1959 kotlinx.coroutines.delay
| 1960 kotlinx.coroutines.ensureActive
| 1961 kotlinx.coroutines.flow.Flow
| 1962 kotlinx.coroutines.flow.MutableSharedFlow
| 1963 kotlinx.coroutines.flow.MutableStateFlow
| 1964 kotlinx.coroutines.flow.SharedFlow
| 1965 kotlinx.coroutines.flow.SharingStarted
| 1966 kotlinx.coroutines.flow.SharingStarted.Eagerly
| 1967 kotlinx.coroutines.flow.SharingStarted.Lazily
| 1968 kotlinx.coroutines.flow.SharingStarted.WhileSubscribed
| 1969 kotlinx.coroutines.flow.StateFlow
| 1970 kotlinx.coroutines.flow.asFlow
| 1971 kotlinx.coroutines.flow.asSharedFlow
| 1972 kotlinx.coroutines.flow.asStateFlow
| 1973 kotlinx.coroutines.flow.channelFlow
| 1974 kotlinx.coroutines.flow.flow
| 1975 kotlinx.coroutines.flow.map
| 1976 kotlinx.coroutines.flow.runningReduce
| 1977 kotlinx.coroutines.flow.shareIn
| 1978 kotlinx.coroutines.flow.stateIn
| 1979 kotlinx.coroutines.flow.stateIn
| 1980 kotlinx.coroutines.isActive
| 1981 kotlinx.coroutines.job
| 1982 kotlinx.coroutines.launch
| 1983 kotlinx.coroutines.limitedParallelism
| 1984 kotlinx.coroutines.runBlocking
| 1985 kotlinx.coroutines.supervisorScope
| 1986 kotlinx.coroutines.sync.Mutex
| 1987 kotlinx.coroutines.sync.withLock
| 1988 kotlinx.coroutines.withContext
| 1989 kotlinx.coroutines.withTimeout
| 1990 kotlinx.coroutines.withTimeoutOrNull
| 1991 kotlinx.coroutines.yield
| 1992 kotlinx.coroutines.GlobalScope
| 1993 kotlinx.coroutines.DelicateCoroutinesApi
| 1994 KOTLIN_IMPORT_LIST_END
| 1995
| 1996 command! AddJavaImport call AddJavaImport(getline('.'))
| 1997 function! AddJavaImport(content) abort
| 1998 let content = a:content
| 1999 \->substitute('^import ', '', '')
| 2000 \->substitute(';$', '', '')
| 2001 if index(g:jm_vimrc.java_import_list, content) != -1
| 2002 echom "Already present:" content
| 2003 return
| 2004 endif
| 2005 let lines = readfile($MYVIMRC)
| 2006 let index = match(lines, '^JAVA_IMPORT_LIST_END$')
| 2007 call insert(lines, content, index)
| 2008 call writefile(lines, $MYVIMRC)
| 2009 echom "Added:" content
| 2010 endfunction
| 2011
| 2012 command! AddKotlinImport call AddKotlinImport(getline('.'))
| 2013 function! AddKotlinImport(content) abort
| 2014 let content = a:content
| 2015 \->substitute('^import ', '', '')
| 2016 \->substitute(';$', '', '')
| 2017 if index(g:jm_vimrc.kotlin_import_list, content) != -1
| 2018 echom "Already present:" content
| 2019 return
| 2020 endif
| 2021 let lines = readfile($MYVIMRC)
| 2022 let index = match(lines, '^KOTLIN_IMPORT_LIST_END$')
| 2023 call insert(lines, content, index)
| 2024 call writefile(lines, $MYVIMRC)
| 2025 echom "Added:" content
| 2026 endfunction
| 2027
| 2028 let g:jm_vimrc.java_import_cache =
| 2029 \ bss#imp#BuildJvmImportCache(g:jm_vimrc.java_import_list)
| 2030
| 2031 let g:jm_vimrc.kotlin_import_cache =
| 2032 \ bss#imp#BuildJvmImportCache(g:jm_vimrc.kotlin_import_list)
| 2033
| 2034
2035
2036
+ - 2037 +--193 lines: C++ Import Cache:
2037
| 2038 let g:jm_vimrc.cc_import_cache = bss#imp#BuildCppImportCache({
| 2039 \ '"absl/flags/flag.h"': ['ABSL_FLAG', 'GetFlag'],
| 2040 \ '"absl/flags/declare.h"': ['ABSL_DECLARE_FLAG'],
| 2041 \ '"absl/flags/parse.h"': ['ParseCommandLine'],
| 2042 \ '"absl/flags/usage.h"': ['ProgramUsageMessage', 'SetProgramUsageMessage'],
| 2043 \ '"absl/strings/str_join.h"': ['StrJoin'],
| 2044 \ '"absl/strings/str_cat.h"': ['StrCat'],
| 2045 \ '"absl/strings/str_replace.h"': ['StrReplaceAll'],
| 2046 \ '"absl/strings/str_split.h"': ['StrSplit'],
| 2047 \ '"absl/status/status.h"': ['Status'],
| 2048 \ '"absl/status/statusor.h"': ['StatusOr'],
| 2049 \ '<opencv2/core.hpp>': [
| 2050 \ 'Mat',
| 2051 \ 'Mat_',
| 2052 \ 'Mat1b', 'Mat2b', 'Mat3b', 'Mat4b',
| 2053 \ 'Mat1i', 'Mat2i', 'Mat3i', 'Mat4i',
| 2054 \ 'Mat1f', 'Mat2f', 'Mat3f', 'Mat4f',
| 2055 \ 'Mat1d', 'Mat2d', 'Mat3d', 'Mat4d',
| 2056 \ 'Matx',
| 2057 \ 'Matx22f', 'Matx33f', 'Matx44f',
| 2058 \ 'Matx21f', 'Matx31f', 'Matx41f',
| 2059 \ 'Matx22d', 'Matx33d', 'Matx44d',
| 2060 \ 'Matx21d', 'Matx31d', 'Matx41d',
| 2061 \ 'Vec',
| 2062 \ 'Vec1b', 'Vec2b', 'Vec3b', 'Vec4b', 'Vec6b',
| 2063 \ 'Vec1i', 'Vec2i', 'Vec3i', 'Vec4i', 'Vec6i',
| 2064 \ 'Vec1f', 'Vec2f', 'Vec3f', 'Vec4f', 'Vec6f',
| 2065 \ 'Vec1d', 'Vec2d', 'Vec3d', 'Vec4d', 'Vec6d',
| 2066 \ 'Scalar_', 'Scalar',
| 2067 \ 'Point_', 'Point2i', 'Point2l', 'Point2f', 'Point2d',
| 2068 \ 'Point3_', 'Point3i', 'Point3l', 'Point3f', 'Point3d',
| 2069 \ 'abs',
| 2070 \ 'exp', 'log',
| 2071 \ 'pow', 'sqrt',
| 2072 \ ],
| 2073 \ '<opencv2/imgcodecs.hpp>': ['imread', 'imwrite'],
| 2074 \ '<opencv2/imgproc.hpp>': ['circle'],
| 2075 \ '<utility>': [
| 2076 \ 'forward', 'declval',
| 2077 \ 'move', 'swap', 'exchange',
| 2078 \ 'integer_sequence', 'make_integer_sequence',
| 2079 \ 'index_sequence', 'make_index_sequence',
| 2080 \ 'pair', 'make_pair',
| 2081 \ ],
| 2082 \ '<memory>': ['unique_ptr', 'make_unique'],
| 2083 \ '<vector>': ['vector'],
| 2084 \ '<tuple>': [
| 2085 \ 'tuple',
| 2086 \ 'tuple_size',
| 2087 \ 'tuple_element',
| 2088 \ 'get',
| 2089 \ ],
| 2090 \ '<type_traits>': [
| 2091 \ 'enable_if', 'conditional',
| 2092 \ 'enable_if_t', 'conditional_t',
| 2093 \ 'integral_constant', 'bool_constant',
| 2094 \ 'true_type', 'false_type',
| 2095 \ 'conjunction', 'disjunction', 'negation',
| 2096 \ 'conjunction_v', 'disjunction_v', 'negation_v',
| 2097 \ 'is_same', 'is_base_of', 'is_convertible',
| 2098 \ 'is_same_v', 'is_base_of_v', 'is_convertible_v',
| 2099 \ ],
| 2100 \ '<array>': ['array'],
| 2101 \ '<valarray>': ['valarray'],
| 2102 \ '<cstddef>': [
| 2103 \ 'size_t', 'ptrdiff_t', 'nullptr_t',
| 2104 \ ],
| 2105 \ '<future>': [
| 2106 \ 'future', 'promise', 'async', 'launch',
| 2107 \ ],
| 2108 \ '<thread>': [
| 2109 \ 'thread', 'this_thread', 'yield', 'get_id', 'sleep_for',
| 2110 \ ],
| 2111 \ '<cstdint>': [
| 2112 \ 'int8_t', 'int16_t', 'int32_t', 'int64_t',
| 2113 \ 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t',
| 2114 \ ],
| 2115 \ '<cmath>': [
| 2116 \ 'abs',
| 2117 \ 'exp', 'log', 'log2', 'log10',
| 2118 \ 'pow', 'sqrt', 'hypot',
| 2119 \ 'sin', 'cos', 'tan',
| 2120 \ 'asin', 'acos', 'atan',
| 2121 \ 'sinh', 'cosh', 'tanh',
| 2122 \ 'asinh', 'acosh', 'atanh',
| 2123 \ 'ceil', 'floor', 'trunc', 'round',
| 2124 \ ],
| 2125 \ '<string>': [
| 2126 \ 'string',
| 2127 \ 'to_string',
| 2128 \ 'stoi', 'stol', 'stoul', 'stoll', 'stoull',
| 2129 \ 'stof', 'stod', 'stold',
| 2130 \ ],
| 2131 \ '<map>': ['map'],
| 2132 \ '<unordered_map>': ['unordered_map'],
| 2133 \ '<set>': ['set'],
| 2134 \ '<iostream>': [
| 2135 \ 'cout', 'cin', 'cerr',
| 2136 \ 'endl',
| 2137 \ ],
| 2138 \ '<ios>': [
| 2139 \ 'internal', 'left', 'right',
| 2140 \ 'boolalpha', 'showbase', 'showpos',
| 2141 \ 'dec', 'hex', 'oct',
| 2142 \ 'fixed', 'scientific', 'default',
| 2143 \ ],
| 2144 \ '<format>': ['format'],
| 2145 \ '<iomanip>': [
| 2146 \ 'setw',
| 2147 \ 'quoted',
| 2148 \ ],
| 2149 \ '<unordered_set>': ['unordered_set'],
| 2150 \ '<optional>': ['optional'],
| 2151 \ '<complex>': ['complex'],
| 2152 \ '<initializer_list>': ['initializer_list'],
| 2153 \ '<numeric>': [
| 2154 \ 'iota',
| 2155 \ 'accumulate',
| 2156 \ 'reduce',
| 2157 \ 'inner_product',
| 2158 \ 'adjacent_difference',
| 2159 \ 'partial_sum',
| 2160 \ ],
| 2161 \ '<cstdlib>': [
| 2162 \ 'system',
| 2163 \ 'exit',
| 2164 \ 'getenv',
| 2165 \ 'malloc',
| 2166 \ 'free',
| 2167 \ 'aligned_malloc',
| 2168 \ ],
| 2169 \ '<random>': [
| 2170 \ 'random_device',
| 2171 \ 'mt19937',
| 2172 \ 'mt19937_64',
| 2173 \ 'uniform_real_distribution',
| 2174 \ 'uniform_int_distribution',
| 2175 \ 'normal_distribution',
| 2176 \ ],
| 2177 \ '<functional>': [
| 2178 \ 'function',
| 2179 \ 'plus', 'minus', 'multiplies', 'divides',
| 2180 \ 'equal_to', 'not_equal_to',
| 2181 \ 'greater', 'less', 'greater_equal', 'less_equal',
| 2182 \ 'logical_and', 'logical_or', 'logical_not',
| 2183 \ 'bit_end', 'bit_or', 'bit_xor', 'bit_not',
| 2184 \ ],
| 2185 \ '<algorithm>': [
| 2186 \
| 2187 \ 'all_of', 'any_of', 'none_of',
| 2188 \ 'for_each', 'for_each_n',
| 2189 \ 'count', 'count_if',
| 2190 \ 'mismatch',
| 2191 \ 'find', 'find_if', 'find_if_not',
| 2192 \ 'find_end', 'find_first_of', 'adjacent_find',
| 2193 \ 'search', 'search_n',
| 2194 \
| 2195 \ 'copy', 'copy_backward', 'move', 'move_backward', 'copy_n',
| 2196 \ 'fill', 'fill_n', 'transform', 'generate', 'generate_n',
| 2197 \ 'remove', 'remove_if', 'remove_copy', 'remove_copy_if',
| 2198 \ 'replace', 'replace_if', 'replace_copy', 'replace_copy_if',
| 2199 \ 'swap', 'swap_ranges', 'swap_iter',
| 2200 \ 'reverse', 'reverse_copy', 'rotate',
| 2201 \ 'rotate_copy',
| 2202 \ 'shuffle',
| 2203 \ 'max', 'min', 'max_element', 'min_element', 'minmax',
| 2204 \ ],
| 2205 \ '"absl/algorithm/container.h"': [
| 2206 \
| 2207 \ 'c_all_of', 'c_any_of', 'c_none_of',
| 2208 \ 'c_for_each', 'c_for_each_n',
| 2209 \ 'c_count', 'c_count_if',
| 2210 \ 'c_mismatch',
| 2211 \ 'c_find', 'c_find_if', 'c_find_if_not',
| 2212 \ 'c_find_end', 'c_find_first_of', 'c_adjacent_find',
| 2213 \ 'c_search', 'c_search_n',
| 2214 \
| 2215 \ 'c_copy', 'c_copy_backward', 'c_move', 'c_move_backward', 'c_copy_n',
| 2216 \ 'c_fill', 'c_fill_n', 'c_transform', 'c_generate', 'c_generate_n',
| 2217 \ 'c_remove', 'c_remove_if', 'c_remove_copy', 'c_remove_copy_if',
| 2218 \ 'c_replace', 'c_replace_if', 'c_replace_copy', 'c_replace_copy_if',
| 2219 \ 'c_swap', 'c_swap_ranges', 'c_swap_iter',
| 2220 \ 'c_reverse', 'c_reverse_copy', 'c_rotate',
| 2221 \ 'c_rotate_copy',
| 2222 \ 'c_shuffle',
| 2223 \ ],
| 2224 \ '<iterator>': [
| 2225 \ 'istream_iterator',
| 2226 \ 'ostream_iterator',
| 2227 \ ],
| 2228 \ })
| 2229