-
Notifications
You must be signed in to change notification settings - Fork 1
/
vim8_nvim_rc.vim
1721 lines (1469 loc) · 61 KB
/
vim8_nvim_rc.vim
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
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
" Fix for my shell, otherwise some scripts break
if $SHELL =~ 'bin/fish'
set shell=/bin/sh
endif
" Automatic commands {{{ "
if has("autocmd")
augroup MyAutoCmd
" Clear autocmds for this group
autocmd!
" Automatically load vimrc when it is saved
" autocmd bufwritepost .vimrc source $MYVIMRC
" autocmd BufWritePost .vimrc,_vimrc,vimrc,.gvimrc,_gvimrc,gvimrc
" \ so $MYVIMRC | if has('gui_running') | so $MYGVIMRC | endif
" Mapping for checking for existing mappings in vimrc
autocmd BufEnter .vimrc,vimrc,.gvimrc,gvimrc,.vim8_nvim_rc.vim,init.vim
\ nnoremap <leader>' /leader>
" Set ghc as compiler for haskell files
autocmd BufEnter *.hs compiler ghc
" Disable foldcolumn in diff windows
au FilterWritePre * if &diff | setlocal fdc=0 | endif
" Sytax highlight from start of file
autocmd BufEnter * :syntax sync fromstart
" Disable things that disturb diff-colors in diff window
if ! has('nvim')
au FilterWritePre * if &diff | setlocal nocursorcolumn | endif
au FilterWritePre * if &diff | setlocal nocursorline | endif
au FilterWritePre * if &diff | IndentGuidesDisable | endif
endif
" Disable indent guide in term
au TermOpen * IndentGuidesDisable
augroup end
endif
" }}} Automatic commands "
" Custom commands {{{ "
" :Configure to edit this file in a split window
command! Configure edit $MYVIMRC
command! SConfigure split $MYVIMRC
command! VConfigure vsplit $MYVIMRC
" :Cdpwd to set current window's pwd to the edited file's directory
command! Cdpwd lcd %:p:h
" :Q to quit
command! Q q
command! Qall qall
" Recover a file then write :DiffOrig to see
" a vimdiff between the recovery and the original.
" (sort of superceded by recover.vim)
command! DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis | wincmd p | diffthis
" Copy current file path into os buffer
command! Ypwd let @+ = expand("%:p")
command! Ypfilename let @+ = expand("%:t")
" Insert random data generated by openssl
command! Pass read !openssl rand -base64 32
" }}} Custom commands "
" Basic settings {{{ "
syntax enable " Enables syntax highlighting with custom colors
filetype plugin indent on " React on filetypes with plugins and syntax
set scrolloff=2 " Minimum number of lines to display around cursor
set sidescroll=1 " Number of cols to autoscroll when reaching end of nowrap line
set sidescrolloff=40 " Number of cols of text to show on the right of caret, minimum
set autoread " Files changed from outside are automatically reread
set hlsearch " Highlight search results
set mousehide " Hide the mouse when typing text
set smarttab " <TAB> inserts 'shiftwidth' spaces
set shiftwidth=4 " Amount of spaces for tab to insert
set autoindent " Automatically set the indent when creating new lines.
set expandtab " Makes <tab> insert spaces in insert mode
set breakindent " Makes vim display visually wrapped lines with correct indentation
set breakindentopt=min:20,shift:-2
set showbreak=↳\
set showcmd " Shows current command in statusline
set ruler " Show cursor position information in statusline
set cursorcolumn
set cursorline
set relativenumber " Show relative line numbers by default
set number " Show absolute line number of current line
set wrap " Wrap text
"set list " Show listchars
set ttyfast " 'Smooth' scrolling
set mouse=a " Enable mouse in terminals that support it
set showmatch " Briefly display matching brackets when inserting such.
set incsearch " Incremental searching as soon as typing begins.
set ignorecase " Ignores case when searching
set smartcase " Will override ignorecase if searching w/ diff cases.
set modeline " Use modelines
set wildchar=<TAB> " Key that triggers command-line expansion.
set wildmenu " Completion on commandline
set wildmode=longest:full " Commandline completion mode
set noerrorbells " Disables beeping.
set hidden " Allow switch buffer without saving
set previewheight=15 " Height of the preview window
"set winwidth=80 " Current window will be resized to this width
set switchbuf=useopen " If switching to a buffer that is already open, go
" to where it is already open instead of here.
set backspace=indent,eol,start whichwrap+=<,>,[,] " backspace functionality
set foldopen-=search " Don't open a fold just because a search lands on it
set formatprg=par " user par to format text with the gq command
set formatoptions=croqlj " auto formatting options
" c - autowrap using textwidth
" r - autoinsert comment leader on i_<enter>
" q - allow formatting of comments with gq
" l - long lines aren't broken
" j - remove comment leader when joining lines
set noea " prevent equalizing of split sizes on closed split
set fillchars=eob:\ ,fold:\ ,vert:\ ,diff:╲ " fill characters for fold lines and lines between vsplits
set ttimeoutlen=50 " Faster twitchin' for everything
set tildeop " Tilde acts as an operator (no need to g~ to switch case with motions)
set iskeyword+=å,ä,ö " Add swedish characters to iskeyword
set virtualedit=block " Allow cursor to be moved into empty space while in visual mode
set display=lastline " Show last line at bottom of window, even if it can't be displayed entirely
set noshowmode " Don't show that we're in insert mode
set concealcursor="" " Don't do syntax based conceal when cursor is on same line
set updatetime=90 " How long in ms to wait after stop typing to update things, use that CPU baby, burn those cycles
set undolevels=5000 " More undo storage
" set spellfile=$HOME/.vim/spell/ TODO
if executable('rg')
set grepprg=rg\ --vimgrep
endif
if (v:version > 703)
set undofile
endif
" Make Vim able to edit crontab files again.
set backupskip=/tmp/*,/private/tmp/*"
" }}} Basic settings "
" Completion ignores {{{ "
" KEEP THESE IN SYNC WITH UNITE IGNORES!
" Never put .git in here!
set wildignore+=*/.hg/*,*/.svn/*,*.pyc,*pb2.py,*.class,*.min.js
set wildignore+=.ropeproject/**
set wildignore+=log/**
set wildignore+=tmp/**
set wildignore+=obj/**
set wildignore+=*.pbxproj,*.xcodeproj,Altitude-OSX.order,*.vcproj
" Ignore output and VCS files: Note: do not ignore .git! It breaks fugitive's :Gdiff
set wildignore+=*.o,*.out,*.obj,*.rbc,*.rbo,*.class,.svn,*.gem
" Ignore archive files
set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz
" Ignore image files
set wildignore+=*.jpg,*.jpeg,*.bmp,*.png,*.gif
" Ignore bundler and sass cache
set wildignore+=*/vendor/gems/*
set wildignore+=*/vendor/cache/*
set wildignore+=*/.bundle/*
set wildignore+=*/.sass-cache/*
" Ignore rails temporary asset caches
set wildignore+=*/tmp/cache/assets/*/sprockets/*
set wildignore+=*/tmp/cache/assets/*/sass/*
" Ignore modules / components
set wildignore+=*/node_modules/*
set wildignore+=bower_components/*
set wildignore+=libs/*
set wildignore+=typings/*
" Ignore build artifacts
set wildignore+=build/*
set wildignore+=dist/*
" Ignore tag files
set wildignore+=tags,*.taghl
" Ignore temp and backup files
set wildignore+=*.swp,*~,._*
" Ignore thirdparty assets
set wildignore+=*/thirdparty/*
set wildignore+=*web/static/components/*
set wildignore+=*web/static/images/*
set wildignore+=*web/static/external/*
" Ignore Debug and Release folders
set wildignore+=*/Debug/*,*/Release/*
" }}} Completion ignores "
" Filetype specific settings {{{ "
" Build scripts {{{ "
function! g:BuildClang(config, doclean)
" From Syntastic, to be used with clang
" -fshow-column
" -fshow-source-location
" -fno-caret-diagnostics
" -fno-color-diagnostics
" -fdiagnostics-format=clang
let errorformat =
\ '%E%f:%l:%c: fatal error: %m,' .
\ '%E%f:%l:%c: error: %m,' .
\ '%W%f:%l:%c: warning: %m,' .
\ '%-G%\m%\%%(LLVM ERROR:%\|No compilation database found%\)%\@!%.%#,' .
\ '%E%m'
exec "make -C " . a:config . "/ -j4 " . a:doclean
silent exec "!$HOME/bin/done"
endfunction
" }}} Build scripts "
if has("autocmd")
augroup MyFtCommands
" Clear autocmds for this group
autocmd!
" Rice Operators {{{ "
function Riceoperators(ft)
" if !exists('w:hasricedoperators')
setl conceallevel=1
" Priorities must be lower than the matches for hlsearch,
" otherwise all hlsearch hilighted things are concealed
" https://github.com/vim/vim/issues/2185
" call matchadd('Conceal', '^\s*[^/][^/].*\zs!==\ze', -1, -1, {'conceal': '≠'})
if a:ft == "typescript"
call matchadd('Conceal', '!==', -1, -1, {'conceal': '≠'})
call matchadd('Conceal', '===', -1, -1, {'conceal': '≗'})
endif
call matchadd('Conceal', '==', -2, -1, {'conceal': '≡'})
call matchadd('Conceal', '!=', -2, -1, {'conceal': '≢'})
call matchadd('Conceal', '<=', -2, -1, {'conceal': '≤'})
call matchadd('Conceal', '>=', -2, -1, {'conceal': '≥'})
if a:ft == "typescript"
call matchadd('Conceal', '=>', -2, -1, {'conceal': '⇒'})
call matchadd('Conceal', '->', -2, -1, {'conceal': '→'})
endif
call matchadd('Conceal', '&&', -2, -1, {'conceal': '⋀'})
call matchadd('Conceal', '||', -2, -1, {'conceal': '⋁'})
call matchadd('Conceal', '+=', -2, -1, {'conceal': '⊞'})
call matchadd('Conceal', '-=', -2, -1, {'conceal': '⊟'})
" Because JS has both `for in` and `for of`, I'm not enabling this for now
" call matchadd('Conceal', 'for\s*([^)]*\s\+\<\zsin\ze\>', -2, -1, {'conceal': '∈'})
call matchadd('Conceal', '\s\zs=\ze\s', -3, -1, {'conceal': '⇐'})
" endif
" let w:hasricedoperators=1
endfunction
" }}} Rice Operators "
" arduino {{{ "
au FileType arduino nnoremap <silent> <leader>ov :split<cr><c-w>j:<C-u>ArduinoVerify<cr>A
au FileType arduino nnoremap <silent> <leader>oo :split<cr><c-w>j:<C-u>ArduinoUpload<cr>A
au FileType arduino nnoremap <silent> <leader>oO :split<cr><c-w>j:<C-u>ArduinoUploadAndSerial<cr>A
au FileType arduino nnoremap <silent> <leader>os :split<cr><c-w>j:<C-u>ArduinoSerial<cr>A
au FileType arduino let g:arduino_serial_port = '/dev/ttyACM0'
au FileType arduino let g:arduino_serial_baud = '9600'
au FileType arduino let g:arduino_serial_cmd = 'picocom {port} -b {baud} -l'
" au FileType arduino let g:arduino_serial_tmux = 'split-window -d'
au FileType arduino let g:arduino_serial_tmux = ''
" }}} arduino "
" typescript {{{ "
au FileType typescript setlocal expandtab shiftwidth=2 softtabstop=2 omnifunc=tsuquyomi#complete
au FileType typescript nmap <buffer> <Leader>jg :TsuquyomiImplementation<CR>
au FileType typescript nmap <buffer> <Leader>ji :TsuquyomiImport<CR>
au FileType typescript nmap <buffer> <Leader>jq :TsuquyomiQuickFix<CR>
au FileType typescript nmap <buffer> <Leader>jr :TsuquyomiRenameSymbol<CR>
au FileType typescript nmap <buffer> <Leader>jR :TsuquyomiRenameSymbolC<CR>
au FileType typescript nmap <buffer> <Leader>js :TsuquyomiSignatureHelp<CR>
au FileType typescript nmap <buffer> <Leader>jt :TsuquyomiTypeDefinition<CR>
au FileType typescript nmap <buffer> <Leader>ju :TsuquyomiReferences<CR>
au FileType typescript nmap <buffer> <Leader>jz :TsuquyomiOpen<CR>
au FileType typescript nmap <buffer> <Leader>jZ :TsuquyomiStopServer<CR>:TsuquyomiStartServer<CR>:TsuquyomiOpen<CR>
au FileType typescript nnoremap <silent> <leader>lf :<C-u>Unite tsproject<CR>
au FileType typescript nmap <buffer> K :<C-u>echo tsuquyomi#hint()<CR>
au FileType typescript nmap <buffer> <Leader>fk :<C-u>echo tsuquyomi#hint()<CR>
au FileType typescript nmap <buffer> <Leader>jk :<C-u>echo tsuquyomi#hint()<CR>
au FileType typescript let b:splitjoin_trailing_comma = 1
au FileType typescript let g:neomake_serialize = 1
au FileType typescript let g:neomake_serialize_abort_on_error = 1
au FileType typescript nnoremap <silent> <leader>oo :<C-u>Neomake! tsc tslint<cr>
au FileType typescript nnoremap <silent> <leader>oO :<C-u>Neomake! tsc<cr>
au FileType typescript nnoremap <silent> <leader>of :<C-u>TsuquyomiGeterrProject<cr>
au BufWinEnter *.ts,*.tsx call Riceoperators("typescript")
au WinEnter *.ts,*.tsx call Riceoperators("typescript")
" }}} typescript "
" rust {{{ "
" au FileType rust setlocal omnifunc=LanguageClient#complete
" au FileType rust nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr>
" au FileType rust nnoremap <buffer> <silent> <leader>jh :call LanguageClient#textDocument_documentHighlight()<CR>
" au FileType rust nnoremap <buffer> <silent> <leader>jg :call LanguageClient#textDocument_definition()<CR>
" au FileType rust nnoremap <buffer> <silent> <leader>jr :<c-u>Denite references<cr>
" au FileType rust nnoremap <buffer> <silent> <leader>jR :call LanguageClient#textDocument_rename()<CR>
au BufWinEnter *.rs call Riceoperators("rust")
au WinEnter *.rs call Riceoperators("rust")
" }}} rust "
" cpp {{{ "
au FileType cpp setlocal list expandtab shiftwidth=4 softtabstop=4
au FileType cpp nnoremap <silent> <leader>oo :call g:BuildClang("Debug", "")<cr>
au FileType cpp nnoremap <silent> <leader>oc :call g:BuildClang("Debug", "clean")<cr>
au FileType cpp nnoremap <silent> <leader>oq :!qoden<cr>
au FileType cpp nnoremap <silent> <leader>oO :call g:BuildClang("Release", "")<cr>
au FileType cpp nnoremap <silent> <leader>oC :call g:BuildClang("Release", "clean")<cr>
au FileType cpp nnoremap <silent> <leader>ov :call g:BuildClang("VisuLove", "dvisulove")<cr>
au FileType cpp nnoremap <silent> <leader>ob :call g:BuildClang("VisuLove", "visuclean")<cr>
" Autocommands for fswitch.vim
au BufEnter *.cpp let b:fswitchdst = 'h'
au BufEnter *.cpp let b:fswitchlocs = 'reg:/src/include/,reg:/src.*/include/,reg:|src|include/**|,../include'
au BufEnter *.h let b:fswitchdst = 'cpp,c'
au BufEnter *.h let b:fswitchlocs = 'reg:|include|src/**|,reg:|include.*|src/**|,../src'
" }}} cpp "
" All
au QuickFixCmdPost * nested cwindow | redraw!
" misc {{{ "
au FileType c setlocal colorcolumn=79
au BufNewFile,BufReadPost *.coffee setlocal foldmethod=indent shiftwidth=2 softtabstop=2 expandtab
au BufWritePost,FileWritePost *.coffee silent make!
au FileType gitcommit setlocal nolist cursorline cursorcolumn
au FileType htmldjango setlocal expandtab shiftwidth=2 softtabstop=2
au FileType javascript setlocal expandtab shiftwidth=2 softtabstop=2
au FileType java setlocal noexpandtab shiftwidth=2 tabstop=2 softtabstop=0
au FileType python setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
au FileType yaml setlocal expandtab shiftwidth=2 softtabstop=2
au FileType {make,gitconfig} set noexpandtab sw=4
au FileType vim setlocal foldmethod=marker
au FileType {md,tex,txt,rst,text} setlocal linebreak
au BufWinEnter *.py call Riceoperators("python")
au WinEnter *.py call Riceoperators("python")
au TermOpen * tmap <buffer> jk <C-\><C-n>
au TermOpen * tmap <buffer> kj <C-\><C-n>
au TermOpen term://*:ranger* tunmap <buffer> jk
au TermOpen term://*:ranger* tunmap <buffer> kj
" }}} misc "
augroup end
endif
" }}} Filetype specific settings "
" Extra syntax groups and keywords {{{ "
function! MyCppadd()
syn keyword cMyItem contained TODO FIXME CLEAN PERF INFOSEC XOXO XXX
syn cluster cCommentGroup add=cMyItem
hi link cMyItem Todo
endfun
if has("autocmd")
augroup SyntaxKeywordGroup
" Clear autocmds for this group
autocmd!
au Syntax cpp call MyCppadd()
augroup end
endif
" }}} Extra syntax groups and keywords "
" Backup settings {{{ "
if !has("win32") && !has("win64")
set backup
set undodir=/var/tmp/vi.recover.$USER/undo// " undo files
set backupdir=/var/tmp/vi.recover.$USER/backup// " backups
set directory=/var/tmp/vi.recover.$USER/swap// " swap files
" Make those folders automatically if they don't already exist.
if !isdirectory(expand(&undodir))
call mkdir(expand(&undodir), "p", 0700)
endif
if !isdirectory(expand(&backupdir))
call mkdir(expand(&backupdir), "p", 0700)
endif
if !isdirectory(expand(&directory))
call mkdir(expand(&directory), "p", 0700)
endif
end
" }}} Backup settings "
" Statusline settings {{{ "
set laststatus=2 " always show status line
function! FileEncoding()
if &fileencoding == ''
return "NONE"
else
return &fenc
endif
endfunction
function! EolSetting()
if &eol == 1
return "↵"
else
return "⤓"
endif
endfunction
set statusline=%< " truncation point
set statusline+=%F " full path to file
set statusline+=\ %m " modified marker
set statusline+=%r " read-only flag
set statusline+=%h " help buffer flag
set statusline+=%w " preview window flag
set statusline+=%{fugitive#statusline()} " Shows git branch if file is in git repo
" set statusline+=\ %{LanguageClient#statusLine()} " shows status of LSP Client's Server
set statusline+=\ %Y " file type
set statusline+=\ %{FileEncoding()} " {FileEncoding} function defined above
set statusline+=\ %{&ff} " current value for the fileformat (abbreviated ff) setting
set statusline+=%{EolSetting()} " {EolSetting} function defined above
set statusline+=%= " split point for left/rigth justification
set statusline+=\ %l/%L\,\ %c " line/total-lines, column
set statusline+=\ %p%%\ " percentage through file (in lines)
" change status line colour if it is in insert mode
" if version >= 700
" if has("autocmd")
" augroup StatuslineColorGroup
" " Clear autocmds for this group
" autocmd!
" au InsertEnter * hi StatusLine gui=NONE guifg=#FFFFFF guibg=#9D3569
" au InsertLeave * hi StatusLine gui=NONE guifg=#d6d6d6 guibg=#602040
" augroup end
" endif
" endif
" }}} Statusline settings "
" Tabline settings {{{ "
function! MyTabLine()
let s = '' " complete tabline goes here
" loop through each tab page
for t in range(tabpagenr('$'))
" select the highlighting for the buffer names
if t + 1 == tabpagenr()
let s .= '%#TabLineSel#'
else
let s .= '%#TabLine#'
endif
" empty space
let s .= ' '
" set the tab page number (for mouse clicks)
let s .= '%' . (t + 1) . 'T'
" set page number string, with color
if t + 1 == tabpagenr()
let s .= '%#TabNumberSel#'
else
let s .= '%#TabNumber#'
endif
let s .= t + 1
" select the highlighting for the buffer names again
if t + 1 == tabpagenr()
let s .= '%#TabLineSel#'
else
let s .= '%#TabLine#'
endif
" get buffer names and statuses
let n = '' "temp string for buffer names while we loop and check buftype
let m = 0 " &modified counter
let bc = len(tabpagebuflist(t + 1)) "counter to avoid last ' '
" loop through each buffer in a tab
for b in tabpagebuflist(t + 1)[:0]
" Actually just the first buffer in the list for name
" buffer types: quickfix gets a [Q], help gets [H]{base fname}
" others get 1dir/2dir/3dir/fname shortened to 1/2/3/fname
if getbufvar( b, "&buftype" ) == 'help'
let n .= '[H]' . fnamemodify( bufname(b), ':t:s/.txt$//' )
elseif getbufvar( b, "&buftype" ) == 'quickfix'
let n .= '[Q]'
else
let n .= pathshorten(bufname(b))
"let n .= bufname(b)
endif
endfor
for b in tabpagebuflist(t + 1)
" check and ++ tab's &modified count
if getbufvar( b, "&modified" )
let m += 1
endif
endfor
" add buffer names
if n == ''
let s .= '[No Name]'
else
let s .= n
endif
" add modified label [n+] where n pages in tab are modified
if m > 0
"let s .= '[' . m . '+]'
if t + 1 == tabpagenr()
let s .= '%#TabModifiedSel#'
else
let s .= '%#TabModified#'
endif
let s.= '+'
if t + 1 == tabpagenr()
let s .= '%#TabLineSel#'
else
let s .= '%#TabLine#'
endif
endif
" switch to no underlining and add final space to buffer list
"let s .= '%#TabLineSel#' . ' '
let s .= ' '
endfor
" after the last tab fill with TabLineFill and reset tab page nr
let s .= '%#TabLineFill#%T'
" right-align the label to close the current tab page
if tabpagenr('$') > 1
let s .= '%=%#TabLine#%999XX'
endif
return s
endfunction
set tabline=%!MyTabLine()
" }}} Tabline settings "
" Session information for :mksession {{{ "
set viminfo='1000,f1,<1000,:500,@500,/500,!
" ' Max number of previously edited files for which marks are
" remembered
" f remember marks
" < max number of lines saved per register
" : max items in commandline history
" @ max items in input-line history to be saved
" / max items in search pattern history
set ssop=blank,buffers,curdir,folds,help,options,tabpages,winsize,resize
" Enables saving and restoring
" blank empty windows
" buffers hidden and unloaded buffers
" curdir remember the cwd
" folds manually created folds, opened/closed folds and local fold opt
" help the help window
" options all options and mappings (also global vals for local opts)
" tabpages all tab pages instead of only the current one
" winsize window sizes (the windows inside vim)
" resize size of the vim window, lines and columns
" }}} Session information for :mksession "
" Plugin settings {{{ "
" Fugitive {{{ "
" https://github.com/tpope/vim-fugitive
" Maps .. to go up one level from fugitive blob and tree views
if has("autocmd")
augroup FugitiveGroup
" Clear autocmds for this group
autocmd!
autocmd User fugitive
\ if fugitive#buffer().type() =~# '^\%(tree\|blob\)$' |
\ nnoremap <buffer> .. :edit %:h<CR> |
\ endif
" Automatically delete hidden fugitive buffers
autocmd BufReadPost fugitive://* set bufhidden=delete
augroup end
endif
" }}} Fugitive "
" gitgutter {{{ "
" let g:gitgutter_map_keys = 0
"
" " nmap <leader>ht <Plug>GitGutterSignsToggle
" " nmap <leader>hp <Plug>GitGutterPreviewHunk
" " nmap <leader>hs <Plug>GitGutterStageHunk
" " nmap <leader>hu <Plug>GitGutterUndoHunk
" nnoremap <leader>ht :<c-u>GitGutterSignsToggle<cr>
" nnoremap <leader>hp :<c-u>GitGutterPreviewHunk<cr>
" nnoremap <leader>hs :<c-u>GitGutterStageHunk<cr>
" nnoremap <leader>hu :<c-u>GitGutterUndoHunk<cr>
" nmap [h <Plug>GitGutterPrevHunk
" nmap ]h <Plug>GitGutterNextHunk
" omap ih <Plug>GitGutterTextObjectInnerPending
" omap ah <Plug>GitGutterTextObjectOuterPending
" xmap ih <Plug>GitGutterTextObjectInnerVisual
" xmap ah <Plug>GitGutterTextObjectOuterVisual
" }}} gitgutter "
" vim-space {{{ "
"" http://github.com/jfelchner/vim-space
""
let g:space_no_buffers = 1
let g:space_no_tabs = 1
" }}} vim-space "
" tsuquyomi {{{ "
"" https://github.com/Quramy/tsuquyomi
""
let g:tsuquyomi_disable_quickfix = 1 " Use syntastic's shizzle instead
let g:syntastic_typescript_checkers = ['tsuquyomi']
let g:tsuquyomi_single_quote_import = 1
let g:tsuquyomi_completion_detail = 1
" let g:tsuquyomi_completion_preview = 1
" }}} tsuquyomi "
" Gist {{{ "
"" https://github.com/mattn/gist-vim
""
let g:gist_clip_command = 'xsel --clipboard -i'
let g:gist_detect_filetype = 1
" }}} Gist "
" Unite {{{ "
" Fuzzy match by default
call unite#filters#matcher_default#use(['matcher_fuzzy'])
call unite#filters#sorter_default#use(['sorter_rank'])
" Fuzzy matching for plugins not using matcher_default as filter
call unite#custom#source('outline,line,grep,session', 'matchers', ['matcher_fuzzy'])
" Ignore some things
" KEEP THESE IN SYNC WITH WILDIGNORE!
" Need to escape dots in the patterns!
call unite#custom#source('file_rec,file_rec/async,file_mru,file,grep',
\ 'ignore_pattern', join([
\ '\.swp', '\.swo', '\~$',
\ '\.git/', '\.svn/', '\.hg/',
\ '^tags$', '\.taghl$',
\ '\.ropeproject/', '\.pbxproj$', '\.xcodeproj', '\.vcproj',
\ 'node_modules/', 'bower_components/', 'typings/', 'libs/', 'log/', 'tmp/', 'obj/',
\ '/vendor/gems/', '/vendor/cache/', '\.bundle/', '\.sass-cache/',
\ '/tmp/cache/assets/.*/sprockets/', '/tmp/cache/assets/.*/sass/',
\ 'thirdparty/', 'Debug/', 'Release/', 'build/', 'dist/',
\ 'web/static/components/', 'web/static/external/', 'web/static/images/',
\ '\.pyc$', 'pb2\.py$', '\.class$', '\.jar$', '\.min\.js$',
\ '\.jpg$', '\.jpeg$', '\.bmp$', '\.png$', '\.gif$',
\ '\.o$', '\.out$', '\.obj$', '\.rbc$', '\.rbo$', '\.gem$',
\ '\.zip$', '\.tar\.gz$', '\.tar\.bz2$', '\.rar$', '\.tar\.xz$'
\ ], '\|'))
" call unite#custom#source('file_rec,file_rec/async,file_mru,file,grep', 'ignore_globs',
" \ split(&wildignore, ','))
let g:unite_source_rec_max_cache_files = 0
call unite#custom#source('file_rec,file_rec/async,file_mru,file,buffer,grep',
\ 'max_candidates', 0)
" Keep track of yanks
let g:unite_source_history_yank_enable = 1
" Prettier prompt
call unite#custom#profile('default', 'context', {
\ 'prompt': '» ',
\ 'start_insert': 1,
\ 'update_time': 200,
\ 'cursor_line_highlight': 'UniteSelectedLine',
\ 'direction': 'botright',
\ 'prompt_direction': 'top',
\ })
" Autosave sessions for unite-sessions
let g:unite_source_session_enable_auto_save = 1
" Non-ugly colors for selected item, requires you to set 'hi UnitedSelectedLine'
let g:unite_cursor_line_highlight = "UniteSelectedLine"
" Set to some better time formats
let g:unite_source_buffer_time_format = "%Y-%m-%d %H:%M:%S "
let g:unite_source_file_mru_time_format = "%Y-%m-%d %H:%M:%S "
" Use ag or ack as grep command if possible
if executable('rg')
let g:unite_source_grep_command = 'rg'
let g:unite_source_grep_default_opts = '-S --hidden --no-heading --vimgrep --iglob "!*.bcm" --iglob "!package-lock.json" --iglob "!yarn.lock"'
let g:unite_source_grep_recursive_opt = ''
elseif executable('ag')
let g:unite_source_grep_command = 'ag'
let g:unite_source_grep_default_opts = '--nocolor --nogroup --hidden --ignore-case --ignore tags'
let g:unite_source_grep_recursive_opt = ''
elseif executable('ack-grep')
let g:unite_source_grep_command = 'ack-grep'
let g:unite_source_grep_default_opts =
\ '--no-heading --no-color -a -H'
let g:unite_source_grep_recursive_opt = ''
endif
function! g:DoUniteFuzzy()
call unite#custom#source('file_rec/async,file/new', 'sorters', 'sorter_rank')
call unite#custom#source('file_rec/async,file/new', 'converters', 'converter_relative_word')
call unite#custom#source('file_rec/async,file/new', 'matchers', 'matcher_fuzzy')
exec "Unite -buffer-name=files file_rec/async file/new"
endfunction
function! g:DoUniteNonFuzzy()
call unite#custom#source('file_rec/async,file/new', 'sorters', 'sorter_nothing')
call unite#custom#source('file_rec/async,file/new', 'converters', 'converter_relative_word')
call unite#custom#source('file_rec/async,file/new', 'matchers', 'matcher_glob')
exec "Unite -buffer-name=files file_rec/async file/new"
endfunction
function! g:DoUniteFuzzyQuickfix()
call unite#custom#source('quickfix', 'sorters', 'sorter_rank')
call unite#custom#source('quickfix', 'matchers', 'matcher_fuzzy')
exec "Unite -buffer-name=quickfix quickfix"
endfunction
function! g:DoUniteNonFuzzyQuickfix()
call unite#custom#source('quickfix', 'sorters', 'sorter_nothing')
call unite#custom#source('quickfix', 'matchers', 'matcher_glob')
exec "Unite -buffer-name=quickfix quickfix"
endfunction
function! g:DoUniteFuzzyLine()
call unite#custom#source('line', 'sorters', 'sorter_rank')
call unite#custom#source('line', 'matchers', 'matcher_fuzzy')
exec "Unite -buffer-name=line line"
endfunction
function! g:DoUniteNonFuzzyLine()
call unite#custom#source('line', 'sorters', 'sorter_nothing')
call unite#custom#source('line', 'matchers', 'matcher_glob')
exec "Unite -buffer-name=line line"
endfunction
function! UltiSnipsCallUnite()
Unite -immediately -no-empty -vertical -buffer-name=ultisnips ultisnips
return ''
endfunction
" Bindings
" inoremap <silent><leader>l<tab> <C-R>=(pumvisible()? "\<LT>C-E>":"")<CR><C-R>=UltiSnipsCallUnite()<CR>
" nnoremap <silent><leader>l<tab> a<C-R>=(pumvisible()? "\<LT>C-E>":"")<CR><C-R>=UltiSnipsCallUnite()<CR>
nnoremap <silent><leader>lr :call g:DoUniteFuzzy()<CR>
nnoremap <silent><leader>lR :call g:DoUniteNonFuzzy()<CR>
nnoremap <silent><leader>lq :call g:DoUniteFuzzyQuickfix()<CR>
nnoremap <silent><leader>lQ :call g:DoUniteNonFuzzyQuickfix()<CR>
nnoremap <silent><leader>ll :call g:DoUniteFuzzyLine()<CR>
nnoremap <silent><leader>lL :call g:DoUniteNonFuzzyLine()<CR>
nnoremap <silent><leader>le :<C-u>Unite -buffer-name=files file_mru bookmark<CR>
nnoremap <silent><leader>lE :<C-u>Unite -buffer-name=files file_mru bookmark file_rec/async file/new<CR>
nnoremap <silent><leader>lb :<C-u>Unite -buffer-name=buffers buffer<CR>
nnoremap <silent><leader>lB :<C-u>Unite -buffer-name=buffers buffer_tab<CR>
nnoremap <silent><leader>ly :<C-u>Unite -buffer-name=yanks history/yank<CR>
nnoremap <silent><leader>lc :<C-u>Unite -buffer-name=changes change<CR>
nnoremap <silent><leader>lj :<C-u>Unite -buffer-name=jumps jump<CR>
nnoremap <silent><leader>lf :<C-u>Unite -buffer-name=jumps jump<CR>
nnoremap <silent><leader>l; :<C-u>Unite -buffer-name=commands history/command<CR>
nnoremap <silent><leader>l/ :<C-u>Unite -buffer-name=commands history/search<CR>
nnoremap <silent><leader>lo :<C-u>Unite -buffer-name=outline outline<CR>
nnoremap <silent><leader>la :<C-u>Unite -buffer-name=outline -vertical outline<CR>
nnoremap <silent><leader>lw :<C-u>Unite -buffer-name=location_list location_list<CR>
nnoremap <silent><leader>l* :<C-u>UniteWithCursorWord -buffer-name=line line<CR>
nnoremap <silent><leader>lg :<C-u>Unite -buffer-name=grep grep<CR>
nnoremap <silent><leader>lG "zyiw:<C-u>Unite -buffer-name=grepword grep<CR><CR><C-R>z<CR>
vnoremap <silent><leader>lG "zy:<C-u>Unite -buffer-name=grepword grep<CR><CR><C-R>z<CR>
nnoremap <silent><leader>ls :<C-u>Unite session<CR>
nnoremap <silent><leader>lt :<C-u>Unite -buffer-name=tags tag<CR>
nnoremap <silent><leader>lT :<C-u>Unite -buffer-name=tagfiles tag/file<CR>
nnoremap <silent><leader>li :<C-u>Unite -buffer-name=autotags tag/include<CR>
nnoremap <silent><leader>ld :<C-u>Unite -buffer-name=change-cwd -default-action=lcd directory_mru directory<CR>
nnoremap <silent><leader>l, :<C-u>UniteResume<CR>
nnoremap <silent><leader>lv :<C-u>UniteResume<CR>
nnoremap <silent><leader>lV :<C-u>UniteResume
nnoremap <leader>lS :<C-u>UniteSessionSave
nnoremap <silent>[R :<C-u>UnitePrevious<cr>
nnoremap <silent>]R :<C-u>UniteNext<cr>
function! s:unite_my_settings()
"Don't add parens to my filters
let b:delimitMate_autoclose = 0
"Keymaps inside the unite split
nmap <buffer> <nowait> <leader>d <Plug>(unite_exit)
nmap <buffer> <nowait> <C-c> <Plug>(unite_exit)
imap <buffer> <nowait> <C-c> <Plug>(unite_exit)
nnoremap <buffer> <C-n> <Plug>(unite_select_next_line)
nnoremap <buffer> <C-p> <Plug>(unite_select_previous_line)
nnoremap <buffer> <Up> 3<c-y>
nnoremap <buffer> <Down> 3<c-e>
inoremap <buffer> <Up> <esc>3<c-y>
inoremap <buffer> <Down> <esc>3<c-e>
inoremap <silent><buffer><expr> <C-j> unite#do_action('split')
nnoremap <silent><buffer><expr> <C-j> unite#do_action('split')
inoremap <silent><buffer><expr> <C-k> unite#do_action('vsplit')
nnoremap <silent><buffer><expr> <C-k> unite#do_action('vsplit')
endfunction
if has("autocmd")
augroup UniteSettingsGroup
" Clear autocmds for this group
autocmd!
autocmd FileType unite call s:unite_my_settings()
augroup end
endif
" }}} Unite "
" Denite {{{ "
" Denite config {{{ "
" Keymaps {{{ "
autocmd FileType denite call s:denite_my_settings()
function! s:denite_my_settings() abort
nnoremap <silent><buffer><expr> <CR>
\ denite#do_map('do_action')
nnoremap <silent><buffer><expr> d
\ denite#do_map('do_action', 'delete')
nnoremap <silent><buffer><expr> p
\ denite#do_map('do_action', 'preview')
nnoremap <silent><buffer><expr> <C-Space>
\ denite#do_map('quit')
nnoremap <silent><buffer><expr> q
\ denite#do_map('quit')
nnoremap <silent><buffer><expr> i
\ denite#do_map('open_filter_buffer')
nnoremap <silent><buffer><expr> I
\ denite#do_map('open_filter_buffer')
nnoremap <silent><buffer><expr> a
\ denite#do_map('open_filter_buffer')
nnoremap <silent><buffer><expr> A
\ denite#do_map('open_filter_buffer')
nnoremap <silent><buffer><expr> <esc>
\ denite#do_map('open_filter_buffer')
nnoremap <silent><buffer><expr> <Space>
\ denite#do_map('toggle_select').'j'
endfunction
autocmd FileType denite-filter call s:denite_filter_my_settings()
function! s:denite_filter_my_settings() abort
call deoplete#custom#buffer_option('auto_complete', v:false)
imap <silent><buffer> <esc> <Plug>(denite_filter_quit)
imap <silent><buffer> <c-o> <Plug>(denite_filter_quit)
inoremap <silent><buffer> <C-n>
\ <Esc><C-w>p:call cursor(line('.')+1,0)<CR><C-w>pA
inoremap <silent><buffer> <C-p>
\ <Esc><C-w>p:call cursor(line('.')-1,0)<CR><C-w>pA
inoremap <silent><buffer><expr> <C-Space>
\ denite#do_map('quit')
inoremap <silent><buffer><expr> <CR>
\ denite#do_map('do_action')
inoremap <silent><buffer><expr> <C-t>
\ denite#do_map('do_action', 'tabopen')
inoremap <silent><buffer><expr> <C-k>
\ denite#do_map('do_action', 'vsplit')
inoremap <silent><buffer><expr> <C-j>
\ denite#do_map('do_action', 'split')
endfunction
" }}} Keymaps "
" Default configs {{{ "
" auto_resize - Auto resize the Denite window height automatically.
" prompt - Customize denite prompt
" direction - Specify Denite window direction as directly below current pane
" winminheight - Specify min height for Denite window
" highlight_mode_insert - Specify h1-CursorLine in insert mode
" prompt_highlight - Specify color of prompt
" highlight_matched_char - Matched characters highlight
" highlight_matched_range - matched range highlight
let s:denite_options = {'default' : {
\ 'split': 'horizontal',
\ 'start_filter': 1,
\ 'auto_resize': 1,
\ 'source_names': 'short',
\ 'prompt': '> ',
\ 'winrow': 1,
\ 'vertical_preview': 0,
\ 'winheight': 5000,
\ 'maxcandidates': 5000,
\ 'filter_split_direction': 'botright',
\ }}
" Loop through denite options and enable them
function! s:profile(opts) abort
for l:fname in keys(a:opts)
for l:dopt in keys(a:opts[l:fname])
call denite#custom#option(l:fname, l:dopt, a:opts[l:fname][l:dopt])
endfor
endfor
endfunction
call s:profile(s:denite_options)
" }}} Default configs "
" Denite grep ripgrep config {{{ "
" if executable('fd')
" call denite#custom#var('file/rec', 'command',
" \ ['fd', '.'])
" endif
if executable('rg')
call denite#custom#var('file/rec', 'command',
\ ['rg', '--files', '--color', 'never'])
call denite#custom#var('grep', 'command', ['rg'])
call denite#custom#var('grep', 'default_opts',
\ ['--vimgrep', '--no-heading', '--color', 'never', '--smart-case'])
call denite#custom#var('grep', 'recursive_opts', [])
call denite#custom#var('grep', 'pattern_opt', ['--regexp'])
call denite#custom#var('grep', 'separator', ['--'])
call denite#custom#var('grep', 'final_opts', [])
endif
" }}} Denite grep ripgrep config "
call denite#custom#option('_', 'highlight_mode_insert', 'UniteSelectedLine')
" Denite mappings {{{ "
nnoremap <silent><leader>a: :<c-u>Denite command<cr>
nnoremap <silent><leader>a; :<c-u>Denite command_history<cr>
nnoremap <silent><leader>aG :<c-u>Denite grep:::`expand('<cword>')`<cr>
vnoremap <silent><leader>aG "zy:<c-u>Denite grep:::`@z`<cr>
nnoremap <silent><leader>aa :<c-u>Denite -split=vertical outline<cr>
nnoremap <silent><leader>aA :<c-u>Denite -split=vertical unite:outline<cr>
nnoremap <silent><leader>ab :<c-u>Denite buffer<cr>
nnoremap <silent><leader>ac :<c-u>Denite change<cr>
nnoremap <silent><leader>ad :<c-u>Denite directory_rec<cr>
nnoremap <silent><leader>ae :<c-u>Denite file_mru<cr>
nnoremap <silent><leader>ag :<c-u>Denite grep<cr>
nnoremap <silent><leader>ai :<c-u>Denite grep:::!<cr>
nnoremap <silent><leader>ah :<c-u>Denite help<cr>
nnoremap <silent><leader>aJ :<c-u>Denite jump<cr>
nnoremap <silent><leader>al :<c-u>Denite line<cr>
nnoremap <silent><leader>aL :<c-u>Denite -matchers=matcher_fuzzy line<cr>
nnoremap <silent><leader>ar :<c-u>Denite -winheight=15 file/rec<cr>
nnoremap <silent><leader>aR :<c-u>DeniteBufferDir -winheight=15 file/rec<cr>
nnoremap <silent><leader>at :<c-u>Denite tag<cr>
nnoremap <silent><leader>av :<c-u>Denite -resume<cr>
nnoremap <silent><leader>ay :<c-u>Denite register<cr>
nnoremap <silent><leader>aY :<c-u>Denite unite:history/yank<cr>
nnoremap <silent><leader>aq :<c-u>Denite quickfix<cr>
nnoremap <silent><leader>aQ :<c-u>Denite location_list<cr>
nnoremap <silent><leader>a/ :<c-u>Denite history:search<cr>
nnoremap <silent><leader>a<tab> :<c-u>Denite -split=vertical unite:ultisnips<cr>
nnoremap <silent><leader>a<space> :<c-u>Denite -split=floating contextMenu<cr>
nnoremap <silent><leader>ajr :<c-u>Denite -split=floating contextMenu<cr>
nnoremap <silent>]r :<c-u>Denite -resume -cursor-pos=+1 -immediately<cr>
nnoremap <silent>[r :<c-u>Denite -resume -cursor-pos=-1 -immediately<cr>
" Bindings
" TODO nnoremap <silent><leader>ay :<c-u>Denite yank<cr>
" TODO handle colons in selected text, the following doesn't quite work
" vnoremap <silent><leader>aG "zy:<c-u>Denite grep:::`substitute(@z, ":", "\\:", "")`<cr>
" }}} Denite mappings "
" }}} Denite config "
" fruzzy {{{ "
let g:fruzzy#usenative = 1
call denite#custom#source('_', 'matchers', ['matcher/fruzzy'])
" }}} fruzzy "
" }}} Denite "
" Rainbow-Parentheses-Improved-and2 {{{ "
"" Rainbow-Parentheses-Improved-and2 settings
"" http://github.com/vim-scripts/Rainbow-Parentheses-Improved-and2
""
" These are so ugly
"let g:rainbow_ctermfgs = [184, 39, 170, 162, 154, 9, 10, 11, 13, 14, 15]
" These are alright
"let g:rainbow_guifgs = ['#ffffff', '#000000']
"\ 'guifgs': ['#8E8EBE', '#8E8E8E', '#BE8EBE', '#BEBE8E', '#8EBE8E', '#BE8E8E'],
let g:rainbow_conf = {
\ 'guifgs': ['#A77990', '#8DC4C4', '#C6ACC6', '#ADBCA0', '#A2B1C1', '#C6A0B3', '#98A7B7', '#7B907C', '#B7AB9B', '#96C1AC', '#79A9A9', '#96838D', '#C6A890'],
\ 'ctermfgs': ['darkgray', 'darkblue', 'darkmagenta', 'darkcyan'],
\ 'operators': '_,_',
\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'],
\ 'separately': {
\ '*': {},
\ 'lisp': {
\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'],
\ 'ctermfgs': ['darkgray', 'darkblue', 'darkmagenta', 'darkcyan', 'darkred', 'darkgreen'],
\ },
\ 'vim': {
\ 'parentheses': [['fu\w* \s*.*)','endfu\w*'], ['for','endfor'], ['while', 'endwhile'], ['if','_elseif\|else_','endif'], ['(',')'], ['\[','\]'], ['{','}']],
\ },
\ 'tex': {
\ 'parentheses': [['(',')'], ['\[','\]'], ['\\begin{.*}','\\end{.*}']],
\ },
\ 'css': 0,
\ 'xml': {
\ 'parentheses': [['\v\<\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'))?)*\>','</\z1>']],
\ },
\ 'xhtml': {