-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
executable file
·2528 lines (2286 loc) · 93.4 KB
/
vimrc
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
" vim:fdm=marker
"
set nocompatible
filetype indent plugin on
syn on
" Platform setup {{{1
" On Windows, also use '.vim' instead of 'vimfiles'; this makes synchronization
" across (heterogeneous) systems easier.
if (has('win16') || has('win32') || has('win64'))
set shellquote=\"
set shell=cmd
set shellcmdflag=/c
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after
" let g:python3_host_prog='c:\Users\cba\scoop\apps\python\current\python.exe'
" set pythonthreedll='c:\Users\cba\scoop\apps\python\current\python37.dll'
"set pythonthreedll=python37.dll
" set pythonthreehome='c:\Users\cba\scoop\apps\python\current'
set directory=.,$TMP,$TEMP
au GUIEnter * simalt ~x
elseif has("nvim")
let g:python3_host_prog='/usr/bin/python'
" set runtimepath=/mnt/c/Users/allencb/.config/nvim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,/mnt/c/Users/allencb/.config/nvim/after
"set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,/mnt/c/Users/allencb/.vim/after
" else
" set shell=/home/cba/.local/bin/xonsh
endif
" set shell=/home/cba/.local/bin/xonsh
" set shell=/usr/bin/bash
set shell=/usr/bin/zsh
set winaltkeys=no
set encoding=utf-8
"
" Be nice and check for multi_byte even if the config requires
" multi_byte support most of the time
if has("multi_byte")
" Windows cmd.exe still uses cp850. If Windows ever moved to
" Powershell as the primary terminal, this would be utf-8
if (has('win16') || has('win32') || has('win64'))
set termencoding=cp850
endif
" Let Vim use utf-8 internally, because many scripts require this
set encoding=utf-8
setglobal fileencoding=utf-8
" Windows has traditionally used cp1252, so it's probably wise to
" fallback into cp1252 instead of eg. iso-8859-15.
" Newer Windows files might contain utf-8 or utf-16 LE so we might
" want to try them first.
set fileencodings=ucs-bom,utf-8,utf-16le,cp1252,iso-8859-15
endif
" Setting up the directories {
set backup " Backups are nice ...
if has('persistent_undo')
set undodir='~/.undodir/'
set undofile " So is persistent undo ...
set undolevels=1000 " Maximum number of changes that can be undone
set undoreload=10000 " Maximum number lines to save for undo on a buffer reload
endif
" GVIM- (here instead of .gvimrc)
"To maximize the initial Vim window under WindowsEdit
"Put the following in your vimrc to maximize Vim on startup (from :help win16-maximized):
" If you don't want to remove all autocommands, you can instead use a variable
" to ensure that Vim includes the autocommands only once: >
if !has('gui_running')
set t_Co=256
endif
set noshowmode
" else
" if &term == 'xterm' || &term == 'screen'
" set t_Co=256 " Enable 256 colors to stop the CSApprox warning and make xterm vim shine
" endif
" "set term=builtin_ansi " Make arrow and other keys work
" endif
"if has('win32')
"" if has('nvim')
"" let localvimpath='~/AppData/Local/nvim/site'
"" endif
"else
"" let localvimpath='~/.config/nvim'
"endif
if !empty($CONEMUBUILD)
" echom "running in conemu"
" if !has('gui')
"set term=$TERM " Make arrow and other keys work
set termencoding=utf8
if !has('nvim')
set term=xterm
endif
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
colorscheme industry
" colorscheme default
endif
" Appearance {{{1
"
set title
set background=dark " Assume a dark background
" color manuscript_modified
" color solarized
"color jellybeans
color zenburn_modified
" Vim UI {
"set background=dark " Assume a dark background
"let g:zenburn_high_Contrast=1
let g:prd_fontList="Source_Code_Pro:h9,CamingoCode:h8,Andale_Mono:h10,Menlo:h10,Consolas:h10,Courier_New:h10"
let g:prd_fontIdx = 1
let g:prd_paperIdx = 7
let g:prd_lineNrIdx = 1
let g:prd_wrapIdx = 2
"set guifont=Anka/Code:h9,Consolas:h9
" set guifont=Source_Code_Pro:h9,CamingoCode:h10,Andale_Mono:h10
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" UI stuff
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set guioptions-=e
" set guioptions-=m
" set guioptions+=M
" set guioptions+=A
" set guioptions+=k
if has('win32')
if has('nvim')
" call GuiWindowMaximized(1)
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
endif
endif
set termguicolors
" color cursor based on mode
set gcr=a:block
" mode aware cursors
set gcr+=o:hor50-Cursor
set gcr+=n:Cursor
set gcr+=i-ci-sm:InsertCursor
set gcr+=r-cr:ReplaceCursor-hor20
set gcr+=c:CommandCursor
set gcr+=v-ve:VisualCursor
set gcr+=a:blinkon0
hi InsertCursor ctermfg=15 guifg=#fdf6e3 ctermbg=37 guibg=#2aa198
hi VisualCursor ctermfg=15 guifg=#fdf6e3 ctermbg=125 guibg=#d33682
hi ReplaceCursor ctermfg=15 guifg=#fdf6e3 ctermbg=65 guibg=#dc322f
hi CommandCursor ctermfg=15 guifg=#fdf6e3 ctermbg=166 guibg=#cb4b16
highlight Cursor guifg=white guibg=black
highlight iCursor guifg=white guibg=steelblue
set guicursor=n-v-c:block-Cursor
set guicursor+=i:ver25-iCursor
set guicursor+=n-v-c:blinkon0
set guicursor+=i:blinkwait10
let mapleader = ";"
let maplocalleader = ";"
set mouse=a " Automatically enable mouse usage
set mousehide " Hide the mouse cursor while typing
"set autowrite " Automatically write a file when leaving a modified buffer
set shortmess+=filmnrxoOtT " Abbrev. of messages (avoids 'hit enter')
set viewoptions=folds,options,cursor,unix,slash " Better Unix / Windows compatibility
set history=1000 " Store a ton of history (default is 20)
" set spell " Spell checking on
set hidden " Allow buffer switching without saving
" let cursor go beyond eol"
set virtualedit=block " onemore " allow for cursor beyond last character
" Excluding version control directories
" set wildignore+=*/.git/*,*/.hg/*,*/.svn/* " Linux/MacOSX
set wildignore+=*\\.git\\*,*\\.hg\\*,*\\.svn\\* " Windows ('nohellslash')
" set showtabline=2
"set tabpagemax=10
set so=1
set lbr
set dy=
set nornu
set cuc
"set cc=80
set nospell
set spell spelllang=en_us
"
" fix pause when leaving insert mode
set ttimeoutlen=50
let g:clipbrdDefaultReg = '+'
set modelines=5
set colorcolumn=79,131
set tabpagemax=15 " Only show 15 tabs
set showmode " Display the current mode
set cursorline " Highlight current line
highlight clear SignColumn " SignColumn should match background for
" things like vim-gitgutter
highlight clear LineNr " Current line number row will have same background color in relative mode.
" Things like vim-gitgutter will match LineNr highlight
if has('cmdline_info')
set ruler " Show the ruler
set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%) " A ruler on steroids
set showcmd " Show partial commands in status line and
" Selected characters/lines in visual mode
endif
set backspace=indent,eol,start " Backspace for dummies
set linespace=0 " No extra spaces between rows
set nu " Line numbers on
set showmatch " Show matching brackets/parenthesis
set incsearch " Find as you type search
set hlsearch " Highlight search terms
set winminheight=0 " Windows can be 0 line high
set ignorecase " Case insensitive search
set smartcase " Case sensitive when uc present
set wildmenu " Show list instead of just completing
set wildmode=list:longest,full " Command <Tab> completion, list matches, then longest common part, then all.
set whichwrap=b,s,h,l,<,>,[,] " Backspace and cursor keys wrap too
set scrolljump=5 " Lines to scroll when cursor leaves screen
set scrolloff=3 " Minimum lines to keep above and below cursor
" set foldenable " Auto fold code
set list
set listchars=tab:»·,trail:·,extends:#,nbsp:. " Highlight problematic whitespace
" FINDING FILES:
" Search down into subfolders
" Provides tab-completion for all file-related tasks
set path+=**
" TAG JUMPING:
" Create the `tags` file (may need to install ctags first)
command! MakeTags !ctags -R .
" NOW WE CAN:
" - Use ^] to jump to tag under cursor
" - Use g^] for ambiguous tags
" - Use ^t to jump back up the tag stack
" }
" Formatting {{{2
set wrap " Wrap long lines
""set nowrap " Wrap long lines
set autoindent " Indent at the same level of the previous line
set shiftwidth=4 " Use indents of 4 spaces
set shiftround " when indenting, round odd number of leading spaces to nearest shiftwidth
set expandtab " Tabs are spaces, not tabs
set tabstop=4 " An indentation every four columns
set softtabstop=4 " Let backspace delete indent
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
set splitright " Puts new vsplit windows to the right of the current
set splitbelow " Puts new split windows to the bottom of the current
"set matchpairs+=<:> " Match, to be used with %
set pastetoggle=<F12> " pastetoggle (sane indentation on pastes)
"set comments=sl:/*,mb:*,elx:*/ " auto format comment blocks
" GUI Settings {
if has ('unix') " On Linux use + register for copy-paste
set clipboard=unnamedplus
elseif has ('gui') " On mac and Windows, use * register for copy-paste
set clipboard=unnamed
endif
" use * register for unnamed - this works better in Windows"
if has ('w32')
set clipboard=unnamed
endif
" unnamedplus seems to copy anything selected into clipboard, try unnamed 20160902
" set clipboard+=unnamed
" Guifont Droid Sans Mono Dotted
" Guifont Consolas
" set default printing to not use syntax highlighting; this will probably
" break the intent of using Hardcopy function below
set printoptions=number:y
" set printoptions = syntax:n,number:y
hi Pmenu guifg=#000000 guibg=#F8F8F8 ctermfg=black ctermbg=Lightgray
hi PmenuSbar guifg=#8A95A7 guibg=#F8F8F8 gui=NONE ctermfg=darkcyan ctermbg=lightgray cterm=NONE
hi PmenuThumb guifg=#F8F8F8 guibg=#8A95A7 gui=NONE ctermfg=lightgray ctermbg=darkcyan cterm=NONE
" other customizations {{{2
set completeopt=menu,preview,longest
" }
" Ctags {
set tags+=./tags; " D:/dev/hybris/bin
" Make tags placed in .git/tags file available in all levels of a repository
let gitroot = substitute(system('git rev-parse --show-toplevel'), '[\n\r]', '', 'g')
if gitroot != ''
let &tags = &tags . ',' . gitroot . '/.git/tags'
endif
" }
" Python stuff {{{2
"
" Indent Python in the Google way.
let s:maxoff = 50 " maximum number of lines to look backwards.
let pyindent_nested_paren="&sw*2"
let pyindent_open_paren="&sw*2"
" end Google python indenting
" disable numbers plugin because it may be causing display issues
let g:enable_numbers = 0
"
" Session List {
" set sessionoptions-=buffers
set sessionoptions-=help
set sessionoptions-=blank
" set sessionoptions=blank,buffers,curdir,folds,tabpages,winsize
nmap <leader>sl :SLoad<CR>
nmap <leader>ss :SSave<CR>
" }
" For snippet_complete marker.
if has('conceal')
set conceallevel=2 concealcursor=i
endif
"
"
" Disable the neosnippet preview candidate window
" When enabled, there can be too much visual noise
" especially when splits are used.
" set completeopt-=preview
" }
"
set relativenumber
" nmap <Leader>ww :tabe ~/gdrive/text/index.txt<CR>
" nmap <Leader>2ww :tabe ~/Documents/UniFirst/wiki/index.txt<CR>
" disable error beep, flash window instead:
set vb
" nnoremap <silent> <C-]> :exe "tjump ".expand("<cscope>")<CR>
" nmap <leader>f :set guifont=*<CR>
" mucomplete recommendations
" <c-h> and <c-l> cycles completion methods
" set completeopt+=menu,menuone
set shortmess+=c
" set completeopt+=noinsert,noselect
"
" nnoremap gm m
" nmap <F5> :TODOToggle<CR>
" :noremap <silent> <Leader>vs :<C-u>let @z=&so<CR>:set so=0 noscb<CR>:bo vs<CR>Ljzt:setl scb<CR><C-w>p:setl scb<CR>:let &so=@z<CR>
set nofoldenable
let g:unite_force_overwrite_statusline = 0
" let g:vimfiler_force_overwrite_statusline = 0
" let g:vimshell_force_overwrite_statusline = 0
"
" FILE BROWSING {{{4
" Tweaks for browsing
let g:netrw_banner=1 " disable annoying banner
let g:netrw_browse_split=4 " open in prior window
let g:netrw_altv=1 " open splits to the right
let g:netrw_liststyle=3 " tree view
let g:netrw_list_hide=netrw_gitignore#Hide()
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
" NOW WE CAN:
" - :edit a folder to open a file browser
" - <CR>/v/t to open in an h-split/v-split/tab
" - check |netrw-browse-maps| for more mappings
" We can also set the width of the window. The value is set in percent of the total window width:
let g:netrw_winsize = 25
" Toggle explore with Ctrl-e
" let loaded_netrwPlugin = 1
set timeout " for mappings
set timeoutlen=1000 " default value
set ttimeout " for key codes
set ttimeoutlen=10 " unnoticeable small value
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" STATUS LINE {{{4
" see: :help 'statusline
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" set statusline= "reset
" set statusline+=%#todo# "set color
" set statusline+=[ "open bracket char
" set statusline+=%n "buffer number
" set statusline+=%M "modifiable/modified flag
" set statusline+=%R "Readonly flag
" set statusline+=%W "Preview window flag
" set statusline+=]%* "close bracket & reset color
" set statusline+=%< "cut from here if line is too long
" set statusline+=./%f "relative path of the filename
" set statusline+=[%{strlen(&fenc)?&fenc:'wtf-enc'}\| "file encoding
" set statusline+=%{&ff}\| "file format
" set statusline+=%{strlen(&ft)?&ft:'zomg'}] "file type
" set statusline+=%= "left/right separator
" set statusline+=%{fugitive#statusline()}\ "git branch
" set statusline+=%c, "cursor column
" set statusline+=%l/%L "cursor line/total lines
" set statusline+=\ (%P) "escaped space, percent through file
set laststatus=2
" " Broken down into easily includeable segments
" set statusline=[\%{mode()}\]
set statusline=%<%f\ " Filename
set statusline+=%w%h%m%r " Options
set statusline+=%{fugitive#statusline()} " Git Hotness
set statusline+=\ [%{&ff}/%Y] " Filetype
" set statusline+=\ [%{getcwd()}] " Current dir
set statusline+=\ [ "open bracket char
set statusline+=%.25{anzu#search_status()} "limit to 25 chars
set statusline+=]\ +[ "open bracket char
set statusline+=%.25{@+} " ditto for clipbd
set statusline+=] "open bracket char
set statusline+=%= "align right
set statusline+=char:%b\ 0x%B "char under cursor
set statusline+=\ [%{&fo}]\ " formatoptions
set statusline+=%p%%\ offset\ %o\ "percent of file, offset from start"
set statusline+=col\ %c\ "column
set statusline+=line\ %l/%L "line #/total lines
" set statusline+=col\ %c%V:%b "column, virtual column number if different, char value under cursor
set statusline+=%#warningmsg# " Syntastic error flag
" set statusline+=%{SyntasticStatuslineFlag()} " Syntastic error flag
set statusline+=%* " Syntastic error flag %b/%B)\ %p%% " Right aligned file nav info
" :call libcallnr("vimtweak64.dll", "EnableMaximize", 1)
" set lines=90
" set columns=300
" set completeopt=menuone,noinsert,noselect
set gdefault " use global flag by default in s: commands
" Zoom / Restore window.
command! ZoomToggle call s:ZoomToggle()
" in neovim, equivalent of .vim directory is C:\Users\allencb\AppData\Local\nvim\site
"
" Plug options: {{{1
"
"| Option | Description |
"| ----------------------- | ------------------------------------------------ |
"| `branch`/`tag`/`commit` | Branch/tag/commit of the repository to use |
"| `rtp` | Subdirectory that contains Vim plugin |
"| `dir` | Custom directory for the plugin |
"| `as` | Use different name for the plugin |
"| `do` | Post-update hook (string or funcref) |
"| `on` | On-demand loading: Commands or `<Plug>`-mappings |
"| `for` | On-demand loading: File types |
"| `frozen` | Do not update unless explicitly specified |
"
" More information: https://github.com/junegunn/vim-plug
if has('vim_starting')
if has('nvim')
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
call plug#begin('~/.config/nvim/site/plugged')
else "if (has('win16') || has('win32') || has('win64'))
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
endif
" writing aids {{{2
Plug 'ajh17/VimCompletesMe'
" Plug 'ap/vim-buftabline'
"*" "Plug 'bronson/vim-trailing-whitespace'
"*" "Plug 'chemzqm/denite-extra'
"*" "Plug 'chemzqm/unite-location'
"*" "Plug 'chrisbra/NrrwRgn'
"*" "Plug 'chrisbra/Recover.vim'
"*" "Plug 'craigemery/vim-autotag'
"*" "Plug 'Dalker/vim-now'
"*" "Plug 'davidhalter/jedi-vim', { 'for': 'python', 'frozen': '1'}
Plug 'dhruvasagar/vim-table-mode'
Plug 'tmhedberg/SimpylFold', {'for': 'python'}
Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
Plug 'godlygeek/tabular'
Plug 'reedes/vim-pencil'
" Plug 'internationa1/write-as.vim'
"*" "Plug 'Dimercel/todo-vim'
"*" "Plug 'drmingdrmer/xptemplate'
"*" "Plug 'ervandew/supertab'
"*" "Plug 'eugen0329/vim-esearch'
"*" "Plug 'evansalter/vim-checklist'
" Plug 'fmoralesc/vim-pad'
"*" "Plug 'fweep/vim-tabber/'
"*" "Plug 'geetarista/ego.vim'
"*" "Plug 'gioele/vim-autoswap'
"*" "Plug 'henrik/vim-indexed-search' "*"anzu replaces
"*" "Plug 'honza/vim-snippets'
"*" "Plug 'https://github.com/fmoralesc/vim-pad'
"*" "Plug 'itchyny/lightline.vim'
"*" "Plug 'jamessan/vim-gnupg'
"*" "Plug 'juneedahamed/vc.vim'
"*" "Plug 'justinmk/vim-sneak'
"*" "Plug 'KabbAmine/lazyList.vim'
"*" "Plug 'KeyboardFire/vim-minisnip'
"*" "Plug 'klen/python-mode', { 'for': 'python' }
"*" "Plug 'Konfekt/FastFold'
"*" "Plug 'ktonga/vim-follow-my-lead'
" Plug 'lukaszkorecki/workflowish'
Plug 'tarnas14/workflowish'
"*" help {{{2
Plug 'lifepillar/vim-cheat40' "*" 20170928
Plug 'tomtom/zeal_vim'
"*" "Plug 'lifepillar/vim-mucomplete' "*" 20170825
"*" "Plug 'Lokaltog/vim-easymotion' "*" replaced by vim-sneak
"*" "Plug 'lucasoman/vim-listfile'
"*" "Plug 'LucHermitte/lh-brackets'
"*" "Plug 'LucHermitte/lh-dev'
"*" "Plug 'LucHermitte/lh-style'
"*" "Plug 'LucHermitte/lh-vim-lib'
"*" "Plug 'LucHermitte/mu-template'
"*" "Plug 'maralla/completor.vim'
"*" "Plug 'marcopaganini/mojave-vim-theme'
"*" "Plug 'mbbill/vimExplorer'
"*" "Plug 'mfukar/robotframework-vim'
"*" "Plug 'michalbachowski/vim-wombat256mod'
"*" "Plug 'mileszs/ack.vim' - now using ripgrep rg
"*" "Plug 'mir-mal/reco'
"*" "Plug 'mmai/vim-markdown-wiki'
"*" "Plug 'mmai/vim-markdown-wiki' "*" doesn't seem to work 20151208, but
"*" "Plug 'mrtazz/simplenote.py'
"*" "Plug 'mrtazz/simplenote.vim', {'frozen': '1'}
"*" "Plug 'mtth/scratch.vim'
"*" "Plug 'nathanaelkane/vim-indent-guides'
"*" "Plug 'osyo-manga/vim-over'
"*" "Plug 'Raimondi/delimitMate'
"*" "Plug 'romgrk/winteract.vim'
"*" "Plug 'Rykka/riv.vim'
"*" "Plug 'saltstack/salt-vim', {'frozen': '1'}
" Plug 'Shougo/denite.nvim'
"*" "Plug 'Shougo/denite.nvim', {'frozen': '1'}
"*" "Plug 'Shougo/deoplete.nvim', has('nvim') ? {'do': ':UpdateRemote"Plugins' } : { 'on': []}
"*" "Plug 'Shougo/neocomplete.vim' , has('gui') ? {} : { 'on': [] }
"*" "Plug 'Shougo/neomru.vim'
"*" "Plug 'Shougo/neosnippet'
"*" "Plug 'Shougo/neosnippet-snippets'
"*" "Plug 'Shougo/neoyank.vim'
"*" "Plug 'Shougo/unite-outline'
"*" "Plug 'Shougo/unite.vim'
"*" "Plug 'Shougo/vimfiler.vim'
"*" "Plug 'Shougo/vimproc'
"*" "Plug 'Shougo/vimproc'
"*" "Plug 'Shougo/vimproc' this is in http://www.kaoriya.net/software/vim/ install directory
"*" "Plug 'Shougo/vimproc', {'frozen': '1'}
"*" "Plug 'sirver/ultisnips'
"*" "Plug 'skywind3000/asyncrun.vim'
"*" "Plug 'svermeulen/vim-easyclip'
"*" "Plug 'szw/vim-ctrlspace'
"*" "Plug 'terryma/vim-expand-region'
"*" "Plug 'terryma/vim-multiple-cursors'
"*" "Plug 'tommcdo/vim-lion'
"*" "Plug 'tomtom/stakeholders_vim'
"*" "Plug 'tomtom/tcomment_vim'
"*" "Plug 'tomtom/tskeleton_vim'
" Plug 'tomtom/ttodo_vim'
"*" "Plug 'tpope/vim-fireplace'
"*" "Plug 'trevorrjohn/vim-obsidian'
"*" "Plug 'tsukkee/unite-tag'
"*" "Plug 'tweekmonster/braceless.vim'
"*" "Plug 'tyru/restart.vim'
"*" "Plug 'ujihisa/unite-font'
"*" "Plug 'unblevable/quick-scope'
"*" "Plug 'vadv/vim-chef'
"*" "Plug 'vim-airline/vim-airline'
"*" "Plug 'vim-airline/vim-airline-themes'
"*" "Plug 'vim-scripts/cwiki'
"*" "Plug 'vim-scripts/DrawIt'
"*" "Plug 'vim-scripts/Efficient-python-folding'
"*" "Plug 'vim-scripts/Headlights' , has('gui') ? {} : { 'on': []}
"*" "Plug 'vim-scripts/hyperlist', {'frozen': '1'}
"*" "Plug 'vim-scripts/jpythonfold.vim'
"*" "Plug 'vim-scripts/matchit.zip'
"*" "Plug 'vim-scripts/restore_view.vim'
"*" "Plug 'vim-scripts/searchfold.vim'
"*" "Plug 'vim-scripts/SideBar.vim'
"*" "Plug 'vim-scripts/snippet.vim'
"*" "Plug 'vim-scripts/Tabmerge'
"*" "Plug 'vim-scripts/TFS'
"*" "Plug 'vim-scripts/txt.vim'
"*" "Plug 'vim-scripts/vcscommand.vim'
"*" "Plug 'vim-scripts/VerticalHelp'
Plug 'vim-scripts/VisIncr'
" organization {{{2
"*" "Plug 'vimoutliner/vimoutliner'
"*" "Plug 'vimoutliner/vimoutliner', { 'frozen': '1' }
"*" "Plug 'visi-pivi-sivi/leerkan-vim-colors'
"*" "Plug 'vitalk/vim-simple-todo'
"*" "Plug 'webdevel/tabulous'
"*" "Plug 'wellle/targets.vim'
"*" "Plug 'wincent/ferret'
"*" "Plug 'xolox/vim-notes', { 'frozen': '1' }
"*" "Plug 'xolox/vim-session'
"*" put pandoc stuff last so that .txt gets interpreted as pandoc
"*", has('nvim') ? {} : { 'on': [] }
"*" coding {{{2
Plug 'hail2u/vim-css3-syntax', { 'for': 'css' }
Plug 'pangloss/vim-javascript', { 'for': 'js' }
Plug 'scrooloose/syntastic'
Plug 'stephpy/vim-yaml'
Plug 'vim-scripts/HTML-AutoCloseTag', { 'for': 'html' }
" Plug 'vim-scripts/VimClojure'
"*" version control {{{3
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-fugitive'
"*" python {{{3
" Plug 'ambv/black'
Plug 'fs111/pydoc.vim', { 'for': 'python'}
Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins' }
Plug 'vim-scripts/python.vim', { 'for': 'python' }
Plug 'vim-scripts/python_match.vim', { 'for': 'python' }
"*" "Plug 'altercation/vim-colors-solarized'
"*" "Plug 'bhurlow/vim-parinfer'
"*""Plug 'davidhalter/jedi-vim', { 'for': 'python'}
"*" search {{{2
Plug 'osyo-manga/vim-anzu'
" Plug 'dyng/ctrlsf.vim'
Plug 'easymotion/vim-easymotion'
Plug 'haya14busa/incsearch.vim'
Plug 'haya14busa/incsearch-easymotion.vim'
Plug 'equalsraf/neovim-gui-shim' , has('nvim') ? {} : { 'on': [] }
Plug 'lotabout/skim', { 'dir': '~/.skim', 'do': './install' }
Plug 'lotabout/skim.vim'
Plug 'ludovicchabant/vim-gutentags'
" Plug 'majutsushi/tagbar'
Plug 'xolox/vim-easytags'
" Plug 'Yggdroot/LeaderF', { 'do': '.\install.sh' }
" Plug 'Yggdroot/LeaderF-marks'
Plug 'junegunn/fzf' ", { 'do': './install --bin' }
Plug 'ibhagwan/fzf-lua'
Plug 'vijaymarupudi/nvim-fzf'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'junegunn/fzf.vim'
" Plug 'pbogut/fzf-mru.vim'
" Plug 'rhysd/clever-f.vim' " https://github.com/rhysd/clever-f.vim
" replaced by easymotion
"*" pkb {{{2
" Plug 'brtastic/vorg'
Plug 'vim-voom/VOoM'
Plug 'dbeniamine/todo.txt-vim'
"*" "Plug 'humiaozuzu/tabbar'
" Plug 'jceb/vim-orgmode'
" Plug 'filaretov/vim-orgzly'
"*" "Plug 'jeetsukumaran/vim-filebeagle'
"*" "Plug 'joereynolds/deoplete-minisnip'
"*" "Plug 'joereynolds/vim-minisnip'
Plug 'junegunn/vim-journal'
Plug 'junegunn/vim-peekaboo'
Plug 'kshenoy/vim-signature'
" Plug 'vimwiki/vimwiki', { 'branch': 'dev' }
"*" "Plug 'luochen1990/rainbow'
Plug 'alok/notational-fzf-vim'
Plug 'isene/hyperlist.vim'
Plug 'wren/jrnl.vim'
"*" utilities {{{2
" Plug 'akinsho/bufferline.nvim'
" Plug 'francoiscabrol/ranger.vim'
" Plug 'kevinhwang91/rnvimr'
" Plug 'vim-ctrlspace/vim-ctrlspace'
" Plug 'kevinhwang91/rnvimr', {'do': 'make sync'}
Plug 'folke/which-key.nvim'
Plug 'kevinhwang91/nvim-bqf'
" Plug 'ipod825/vim-netranger'
" Plug 'rafaqz/ranger.vim'
Plug 'mbbill/undotree'
" Plug 'mg979/vim-xtabline'
Plug 'mhinz/vim-hugefile'
Plug 'mhinz/vim-startify'
Plug 'ms-jpq/chadtree', {'branch': 'chad', 'do': ':UpdateRemotePlugins'}
" if has('nvim')
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" else
" Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
" endif
Plug 'Shougo/neco-syntax'
Plug 'tomtom/autolinker_vim'
Plug 'tomtom/tlib_vim'
" Plug 'tpope/vim-speeddating'
Plug 'vim-scripts/ingo-library'
"*" "Plug 'vim-scripts/LargeFile' "*" replaced by vim-hugefile
Plug 'vim-scripts/Printer-Dialog'
Plug 'vim-scripts/utl.vim'
Plug 'voldikss/vim-floaterm'
"*" "Plug 'sandeepcr529/Buffet.vim'
"*" "Plug 'scrooloose/nerdtree'
"*""Plug 'zchee/deoplete-jedi'
Plug 'tpope/vim-characterize'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-unimpaired'
Plug 'tweekmonster/exception.vim'
Plug 'vifm/vifm.vim'
Plug 'vim-pandoc/vim-pandoc'
Plug 'vim-pandoc/vim-pandoc-after'
Plug 'vim-pandoc/vim-pandoc-syntax'
Plug 'vim-scripts/CaptureClipboard'
Plug 'xolox/vim-misc'
Plug 'xolox/vim-shell'
Plug 'Yggdroot/indentLine'
"*" UI {{{2
Plug 'romgrk/barbar.nvim'
Plug 'molok/vim-smartusline'
Plug 'xolox/vim-colorscheme-switcher'
"*" "Plug 'zefei/vim-wintabs'
"*" endif
"*" if has('nvim')
call plug#end()
endif
" Functions {{{1
function! s:ZoomToggle() abort
if exists('t:zoomed') && t:zoomed
execute t:zoom_winrestcmd
let t:zoomed = 0
else
let t:zoom_winrestcmd = winrestcmd()
resize
vertical resize
let t:zoomed = 1
endif
endfunction
command! Hardcopy call Hardcopy()
function! Hardcopy()
set printoptions=syntax:n,number:n,paper:letter,duplex:off
setlocal formatoptions=tw
setlocal textwidth=86
normal gg
normal gqG
let colors_save = g:colors_name
colorscheme print_bw
hardcopy
execute 'colorscheme' colors_save
endfun
command! Hardcopyl call Hardcopyl()
function! Hardcopyl()
set printoptions=syntax:n,number:n,paper:letter,duplex:off
setlocal formatoptions=
setlocal textwidth=132
normal gg
normal gqG
let colors_save = g:colors_name
colorscheme print_bw
hardcopy
execute 'colorscheme' colors_save
endfun
function! GetGooglePythonIndent(lnum)
" Indent inside parens.
" Align with the open paren unless it is at the end of the line.
" E.g.
" open_paren_not_at_EOL(100,
" (200,
" 300),
" 400)
" open_paren_at_EOL(
" 100, 200, 300, 400)
call cursor(a:lnum, 1)
let [par_line, par_col] = searchpairpos('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|String\\)$'")
if par_line > 0
call cursor(par_line, 1)
if par_col != col("$") - 1
return par_col
endif
endif
" Delegate the rest to the original function.
return GetPythonIndent(a:lnum)
endfunction
function! ToggleExplorer()
if exists("t:expl_buf_num")
let expl_win_num = bufwinnr(t:expl_buf_num)
if expl_win_num != -1
let cur_win_nr = winnr()
exec expl_win_num . 'wincmd w'
close
exec cur_win_nr . 'wincmd w'
unlet t:expl_buf_num
else
unlet t:expl_buf_num
endif
else
exec '1wincmd w'
Vexplore
let t:expl_buf_num = bufnr("%")
endif
endfunction
"function! s:my_cr_function() abort
" return deoplete#close_popup() . "\<CR>"
"endfunction
function! Cream_case_title(mode)
" Title Case -- uppercase characters following whitespace
if a:mode == "v"
normal gv
" Hack: fix Vim's gv proclivity to add a line when at line end
if virtcol(".") == 1
normal '>
" line select
normal gV
" up one line
normal k
" back to char select
normal gV
"""" back up one char
"""normal h
endif
else
let mypos = Cream_pos()
" select current word
normal v
normal aw
endif
" yank
normal "xy
" lower case entire string
let @x = tolower(@x)
" capitalize first in series of word chars
let @x = substitute(@x, '\w\+', '\u&', 'g')
" lowercase a few words we always want lower
let @x = substitute(@x, '\<A\>', 'a', 'g')
let @x = substitute(@x, '\<An\>', 'an', 'g')
let @x = substitute(@x, '\<And\>', 'and', 'g')
let @x = substitute(@x, '\<In\>', 'in', 'g')
let @x = substitute(@x, '\<The\>', 'the', 'g')
" lowercase apostrophe s
let @x = substitute(@x, "'S", "'s", 'g')
" fix first word again
let @x = substitute(@x, '^.', '\u&', 'g')
" fix last word again
let str = matchstr(@x, '[[:alnum:]]\+[^[:alnum:]]*$')
let @x = substitute(@x, str . '$', '\u&', 'g')
"" optional lowercase...
"let n = confirm(
" \ "Lowercase additional conjunctions, adpositions, articles, and forms of \"to be\"?\n" .
" \ "\n", "&Ok\n&Cancel", 2, "Info")
"if n == 1
" " lowercase conjunctions
" let @x = substitute(@x, '\<After\>', 'after', 'g')
" let @x = substitute(@x, '\<Although\>', 'although', 'g')
" let @x = substitute(@x, '\<And\>', 'and', 'g')
" let @x = substitute(@x, '\<Because\>', 'because', 'g')
" let @x = substitute(@x, '\<Both\>', 'both', 'g')
" let @x = substitute(@x, '\<But\>', 'but', 'g')
" let @x = substitute(@x, '\<Either\>', 'either', 'g')
" let @x = substitute(@x, '\<For\>', 'for', 'g')
" let @x = substitute(@x, '\<If\>', 'if', 'g')
" let @x = substitute(@x, '\<Neither\>', 'neither', 'g')
" let @x = substitute(@x, '\<Nor\>', 'nor', 'g')
" let @x = substitute(@x, '\<Or\>', 'or', 'g')
" let @x = substitute(@x, '\<So\>', 'so', 'g')
" let @x = substitute(@x, '\<Unless\>', 'unless', 'g')
" let @x = substitute(@x, '\<When\>', 'when', 'g')
" let @x = substitute(@x, '\<While\>', 'while', 'g')
" let @x = substitute(@x, '\<Yet\>', 'yet', 'g')
" " lowercase adpositions
" let @x = substitute(@x, '\<As\>', 'as', 'g')
" let @x = substitute(@x, '\<At\>', 'at', 'g')
" let @x = substitute(@x, '\<By\>', 'by', 'g')
" let @x = substitute(@x, '\<For\>', 'for', 'g')
" let @x = substitute(@x, '\<From\>', 'from', 'g')
" let @x = substitute(@x, '\<In\>', 'in', 'g')
" let @x = substitute(@x, '\<Of\>', 'of', 'g')
" let @x = substitute(@x, '\<On\>', 'on', 'g')
" let @x = substitute(@x, '\<Over\>', 'over', 'g')
" let @x = substitute(@x, '\<To\>', 'to', 'g')
" let @x = substitute(@x, '\<With\>', 'with', 'g')
" " lowercase articles
" let @x = substitute(@x, '\<A\>', 'a', 'g')
" let @x = substitute(@x, '\<An\>', 'an', 'g')
" let @x = substitute(@x, '\<The\>', 'the', 'g')
" " lowercase forms of to be
" let @x = substitute(@x, '\<Be\>', 'be', 'g')
" let @x = substitute(@x, '\<To\> \<Be\>', 'to be', 'g')
" let @x = substitute(@x, '\<To\> \<Do\>', 'to do', 'g')
" " lowercase prepositions
" " lowercase conjunctions
"endif
" reselect
normal gv
" paste over selection (replacing it)
normal "xP
" return state
if a:mode == "v"
normal gv
else
execute mypos
endif
endfunction
" set tabline=%!MyTabLine() " custom tab pages line
function! MyTabLine()
let s = ''
" loop through each tab page
for i in range(tabpagenr('$'))
if i + 1 == tabpagenr()
let s .= '%#TabLineSel#'
else
let s .= '%#TabLine#'
endif
if i + 1 == tabpagenr()
let s .= '%#TabLineSel#' " WildMenu
else
let s .= '%#Title#'
endif
" set the tab page number (for mouse clicks)
let s .= '%' . (i + 1) . 'T '
" set page number string
let s .= i + 1 . ''
" get buffer names and statuses
let n = '' " temp str for buf names
let m = 0 " &modified counter
let buflist = tabpagebuflist(i + 1)
" loop through each buffer in a tab
for b in buflist
if getbufvar(b, "&buftype") == 'help'
" let n .= '[H]' . fnamemodify(bufname(b), ':t:s/.txt$//')
elseif getbufvar(b, "&buftype") == 'quickfix'
" let n .= '[Q]'
elseif getbufvar(b, "&modifiable")
let n .= fnamemodify(bufname(b), ':t') . ', ' " pathshorten(bufname(b))
endif
if getbufvar(b, "&modified")
let m += 1
endif
endfor
" let n .= fnamemodify(bufname(buflist[tabpagewinnr(i + 1) - 1]), ':t')
let n = substitute(n, ', $', '', '')
" add modified label
if m > 0
let s .= '+'
" let s .= '[' . m . '+]'
endif
if i + 1 == tabpagenr()
let s .= ' %#TabLineSel#'
else
let s .= ' %#TabLine#'
endif
" add buffer names
if n == ''
let s.= '[New]'
else
let s .= n
endif
" switch to no underlining and add final space
let s .= ' '
endfor
let s .= '%#TabLineFill#%T'
" right-aligned close button
" if tabpagenr('$') > 1
" let s .= '%=%#TabLineFill#%999Xclose'
" endif
return s
endfunction
" Initialize directories {
function! InitializeDirectories()
let parent = $HOME
let prefix = 'vim'
let dir_list = {
\ 'backup': 'backupdir',
\ 'views': 'viewdir',