-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
724 lines (598 loc) · 19.4 KB
/
vimrc
File metadata and controls
724 lines (598 loc) · 19.4 KB
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set t_Co=256
set backspace=indent,eol,start
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = " "
let g:mapleader = " "
" time after leader (or g) to type other letter
set timeoutlen=400
" Sets how many lines of history VIM has to remember
set history=300
set visualbell
" Enable filetype plugin
filetype plugin indent on
syntax on
" Set to auto read when a file is changed from the outside
set autoread
" Fast saving
nnoremap <leader><space> :wa<CR>
nnoremap <leader>w :w!<CR>
" fast quiting
noremap <leader>qq :q!<CR>
" Fast editing of the .vimrc
map <leader>e :e! ~/.vim/vimrc<CR>
" When vimrc is edited, reload it
autocmd! bufwritepost vimrc source ~/.vimrc
" file to save many configs
set viminfo='1000,f1,<500,h,n$HOME/.vim/viminfo
set formatoptions=tqn
set showcmd
set smartcase " Do smart case matching
set autowriteall " Automatically save before commands like :next and :make
" to quit a buffer and remove it from buffer list
noremap <leader>q :w<CR>:Bclose<CR>
noremap <leader>d :Bclose<CR>
command! Bclose call <SID>BufcloseCloseIt()
function! <SID>BufcloseCloseIt()
let l:currentBufNum = bufnr("%")
let l:alternateBufNum = bufnr("#")
if buflisted(l:alternateBufNum)
buffer #
else
bnext
endif
if bufnr("%") == l:currentBufNum
new
endif
if buflisted(l:currentBufNum)
execute("bdelete ".l:currentBufNum)
endif
endfunction
" open file at previous known position
if has("autocmd")
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif
endif
" Searching
set gdefault
set hlsearch
set ignorecase "Ignore case when searching
set hlsearch "Highlight search things
set magic "Set magic on, for regular expressions
set showmatch "Show matching bracets when text indicator is over them
set mat=2 "How many tenths of a second to blink
map <silent> <leader>/ :noh<CR>
" Turn off incremental searching for files over 10,000,000 bytes. It's too
" slow.
" function! IncSearch()
" if line2byte(line("$")) < 10000000
" set incsearch
" else
" set noincsearch
" endif
" endfunction
" autocmd BufReadPost * call IncSearch()
set incsearch
" When pressing <leader>cd switch to the directory of the open buffer
"map <leader>cd :cd %:p:h<CR>
nnoremap <leader>cd :cd %:p:h<CR>:pwd<CR>
"set autochdir
" make move behave ok whith wrapping lines
vnoremap gj j
nnoremap gj j
vnoremap gk k
nnoremap gk k
vnoremap j gj
nnoremap j gj
vnoremap k gk
nnoremap k gk
map gm :call cursor(0, virtcol('$')/2)<CR>
" vim grep command
set grepprg=/bin/grep\ -nH\ $*
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" window navigation
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
nnoremap <right> :bnext<CR>
nnoremap <left> :bprevious<CR>
noremap <C-J> <C-W>j
noremap <C-K> <C-W>k
noremap <C-H> <C-W>h
noremap <C-L> <C-W>l
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" set wildmenu
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set wildmenu
set wildmode=longest,list
"set wildmode=longest:full
set wildignore=*.pyc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => VIM user interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set 3 lines to the curors - when moving vertical..
set so=3
set ruler "Always show current position
set cmdheight=1 "The commandbar height
" Useful on some European keyboards
map ½ $
imap ½ $
vmap ½ $
cmap ½ $
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Statusline
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set laststatus=2
" Format the statusline
"set statusline=%=bufs:\ %{buftabs#statusline()}
"set statusline=%<CWD:\ %r%{CurDir()}%h\ \ %F%m%r%h\ %w\ Line:\ %l/%L:\ %p%%\ %(Column:\ %c%)
"set statusline=%<%F%m%r%h%w\ L:%l/%L\ %p%%\|%(C:%c%)%=%{buftabs#statusline()}
set statusline=\|L:%l/%L\ %p%%\|%(C:%c%)
"let g:buftabs_in_statusline=1
function! CurDir()
let curdir = substitute(getcwd(), '/Users/amir/', "~/", "g")
return curdir
endfunction
" allows to recover cut text in insert mode
"inoremap <c-u> <c-g>u<c-u>
"inoremap <c-w> <c-g>u<c-w>
"inoremap <c-w> <c-o>db
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
syntax enable "Enable syntax hl
" Color scheme
if has("gui_running")
set guioptions-=T
"set background=dark
set background=light
set t_Co=256
set background=light
"colorscheme moria
colorscheme solarized
else
"set background=dark
set background=light
"colorscheme blackboard
colorscheme solarized
"colorscheme default
"colorscheme transparent
"colorscheme moria
endif
set cursorline
"hi CursorLine term=Grey90 cterm=Grey90 guibg=Grey90
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" autocomands
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" automatically insert "#!/bin/sh" line for *.sh files
"au BufEnter *.sh if getline(1) == "" | :call setline(1, "#!/bin/sh") | endif
" idem for python
"au BufEnter *.py if getline(1) == "" | :call setline(1, "#!/usr/bin/env python") | endif
" Define a function that can tell me if a file is executable
function! FileExecutable (fname)
execute "silent! ! test -x" a:fname
return v:shell_error
endfunction
" Automatically make Python and Shell scripts executable if they aren't already
"au BufWritePost *.sh,*.py if FileExecutable("%:p") | silent !chmod a+x % endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set encoding=utf8
set smarttab
set linebreak
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
set sidescroll=3
set list
set listchars=tab:\ \ ,precedes:<,extends:>,trail:· ",eol:¶
" remove trailing spaces with F11
map <F11> :%s/\s\+$//g<CR>:nohlsearch<CR>
"map <leader>t2 :setlocal shiftwidth=2<cr>
"map <leader>t4 :setlocal shiftwidth=4<cr>
"map <leader>t8 :setlocal shiftwidth=4<cr>
syn match tab display "\t"
hi link tab Error
set expandtab
autocmd BufRead *.go set noexpandtab
autocmd BufRead *.py set textwidth=100
autocmd BufEnter *.py set tabstop=4 shiftwidth=4 expandtab
autocmd BufEnter *.py retab
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab indentkeys-=0# indentkeys-=<:> foldmethod=indent nofoldenable
"set textwidth=79
autocmd BufRead *.py match ErrorMsg '\%>118v.\+'
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
autocmd Filetype ruby setlocal ts=2 sts=2 sw=2
autocmd Filetype python setlocal ts=4 sts=4 sw=4
" readjust sentence
map <leader>s gqis
" Customs mapping for convenience
map <leader>o o
map <leader>O O
map <leader>k ik$
map <leader>K i
map <leader>j i
imap <C-A> <Home>
" imap <C-E> <End>
" for restructured text
imap yypVr-o
map <leader>z yypVr
autocmd BufEnter *.rst.txt set syntax=rst
autocmd BufEnter *.txt set nowrap
"map <leader>x :w<cr>:silent !rst2html.py % > %.html<cr>
autocmd BufWrite *.rst.txt :call DeleteTrailingWS()
"autocmd BufRead *.txt map <leader>ll :silent !rst2html % > %.html
" for wiki à la google code
autocmd BufNewFile,BufRead *.wiki set ft=googlecodewiki
"Delete trailing white space, useful for Python ;)
func! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//ge
exe "normal `z"
endfunc
command! DeleteTrailingWS call DeleteTrailingWS()
" useful for python folding
set foldmethod=indent
set foldlevel=99
" from:
" http://concisionandconcinnity.blogspot.com/2009/07/vim-part-ii-matching-pairs.html
" matching pairs
inoremap ( ()<Left>
inoremap [ []<Left>
inoremap { {}<Left>
" coding
inoremap LD LOG.debug(())<Left><Left>
"autocmd Syntax html,vim inoremap < <lt>><Left>
function! ClosePair(char)
if getline('.')[col('.') - 1] == a:char
return "\<Right>"
else
return a:char
endif
endf
inoremap ) <c-r>=ClosePair(')')<CR>
inoremap ] <c-r>=ClosePair(']')<CR>
inoremap } <c-r>=ClosePair('}')<CR>
function! InAnEmptyPair()
let cur = strpart(getline('.'),getpos('.')[2]-2,2)
for pair in (split(&matchpairs,',') + ['":"',"':'"])
if cur == join(split(pair,':'),'')
return 1
endif
endfor
return 0
endfunc
func! DeleteEmptyPairs()
if InAnEmptyPair()
return "\<Left>\<Del>\<Del>"
else
return "\<BS>"
endif
endfunc
inoremap <expr> <BS> DeleteEmptyPairs()
" for quotes
function! QuoteDelim(char)
let line = getline('.')
let col = col('.')
if line[col - 2] == "\\"
"Inserting a quoted quotation mark into the string
return a:char
elseif line[col - 1] == a:char
"Escaping out of the string
return "\<Right>"
else
"Starting a string
return a:char.a:char."\<Left>"
endif
endf
inoremap " <c-r>=QuoteDelim('"')<CR>
" only imap for txt files
"inoremap ' <c-r>=QuoteDelim("'")<CR>
imap ' <c-r>=QuoteDelim("'")<CR>
"autocmd BufEnter *.txt iunmap <silent> '
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Spell checking
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" F8 toggles spelling
nnoremap <F8> :setlocal spell!<CR>
"Shortcuts using <leader>
"map <leader>n ]s
"map <leader>p [s
"map <leader>z zg
"map <leader>r z=
" next error/warning
map <leader>n :lnext<CR>
map <leader>p :lprevious<CR>
" eclim sort validation
" let g:EclimValidateSortResults = "severity"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Files and backups
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set backup
set wb
set swapfile
set backupdir-=.
set backupdir^=~/.tmp/backup//,/tmp//
" persistant undo file
set undofile
set undodir=~/.tmp/vim_undos//,/tmp//
" swap files
set directory=~/.tmp/swp//,/tmp//
""""""""""""""""""""""""""""""
" => Visual mode related
""""""""""""""""""""""""""""""
" In visual mode when you press * or # to search for the current selection
vnoremap <silent> * :call VisualSearch('f')<CR>
vnoremap <silent> # :call VisualSearch('b')<CR>
nnoremap <silent> * :let @/='\<<C-R>=expand("<cword>")<CR>\>'<CR>:set hls<CR>
" From an idea by Michael Naumann
function! CmdLine(str)
exe "menu Foo.Bar :" . a:str
emenu Foo.Bar
unmenu Foo
endfunction
function! VisualSearch(direction) range
let l:saved_reg = @"
execute "normal! vgvy"
let l:pattern = escape(@", '\\/.*$^~[]')
let l:pattern = substitute(l:pattern, "\n$", "", "")
if a:direction == 'b'
execute "normal ?" . l:pattern . "^M"
elseif a:direction == 'gv'
call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.')
elseif a:direction == 'f'
execute "normal /" . l:pattern . "^M"
endif
let @/ = l:pattern
let @" = l:saved_reg
endfunction
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General Abbrevs
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
iab xdate <c-r>=strftime("%d/%m/%y %H:%M:%S")<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Omni complete functions
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"autocmd FileType css set omnifunc=csscomplete#CompleteCSS
" If you prefer the Omni-Completion tip window to close when a selection is
" made, these lines close it on movement in insert mode or when leaving
" insert mode
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
autocmd InsertLeave * if pumvisible() == 0|pclose|endif
set iskeyword-=#
" deoplete
let g:python3_host_prog = "/usr/local/opt/python@3.8/bin/python3"
let pythonthreehome = "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8"
let pythonthreedll = "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/libpython3.8.dylib"
" let pythonthreehome = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7"
" let pythonthreedll = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/libpython3.7m.dylib"
let g:deoplete#enable_at_startup = 1
"let g:deoplete#options#auto_complete_popup = "manual"
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<Tab>" :
\ deoplete#complete()
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
""inoremap <silent><expr> <TAB>
""\ pumvisible() ? "\<C-n>" :
""\ <SID>check_back_space() ? "\<TAB>" :
""\ deoplete#manual_complete()
""function! s:check_back_space() abort "{{{
""let col = col('.') - 1
""return !col || getline('.')[col - 1] =~ '\s'
""endfunction"}}}
" supertab
"let g:SuperTabDefaultCompletionType = "<C-N>"
"let g:SuperTabDefaultCompletionType = "context"
"let g:SuperTabCompletionContexts = ['s:ContextText', 's:ContextDiscover']
"let g:SuperTabContextTextOmniPrecedence = ['&completefunc', '&omnifunc']
"let g:SuperTabContextDiscoverDiscovery =
" \ ["&completefunc:<c-x><c-u>", "&omnifunc:<c-x><c-o>"]
"set completeopt=menuone ",longest
" for ruby
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" python
"autocmd FileType python source ~/.vim/bundle/my_config/ftplugin/python.vim
" Yankring
noremap <leader>" :YRShow <CR>
"let g:yankring_manage_numbered_reg = 1
let g:yankring_max_history = 1000
let g:yankring_dot_repeat_yank = 1
let g:yankring_map_dot = 1
let g:yankring_history_dir = '~/.vim/'
" TODO: deleted place text in numbered registers
"map x @'x
"map c ""c
"map d ""d
" CommandT
"let g:CommandTFileScanner = 'git'
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 25
nnoremap <leader>x :Vexplore<CR>
" augroup ProjectDrawer
" autocmd!
" autocmd VimEnter * :Vexplore
" augroup END
" Taglist
" let Tlist_Ctags_Cmd='/usr/bin/ctags'
" nnoremap <leader>tt :TlistToggle<CR>:TlistUpdate<cr>
" let Tlist_Use_Right_Window = 1 " taglist open on the right
" let Tlist_Exit_OnlyWindow = 1 " exit if taglist is last window open
" let Tlist_Show_One_File = 1 " Only show tags for current buffer
" "let Tlist_Enable_Fold_Column = 0 " no fold column (only showing one file)
" let Tlist_Compact_Format = 1
" let Tlist_File_Fold_Auto_Close = 1
" let tlist_sql_settings = 'sql;P:package;t:table'
" let tlist_ant_settings = 'ant;p:Project;r:Property;t:Target'
" let g:ctags_statusline=1
" " Automatically start script
" let generate_tags=1
" config for go in tagbar
let g:tagbar_type_go = {
\ 'ctagstype' : 'go',
\ 'kinds' : [
\ 'p:package',
\ 'i:imports:1',
\ 'c:constants',
\ 'v:variables',
\ 't:types',
\ 'n:interfaces',
\ 'w:fields',
\ 'e:embedded',
\ 'm:methods',
\ 'r:constructor',
\ 'f:functions'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 't' : 'ctype',
\ 'n' : 'ntype'
\ },
\ 'scope2kind' : {
\ 'ctype' : 't',
\ 'ntype' : 'n'
\ },
\ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent'
\ }
" tagbar quick access
noremap <leader>b :TagbarToggle<CR>
" go language
"let s:tlist_def_go_settings = 'go;g:enum;s:struct;u:union;t:type;' .
\ 'v:variable;f:function'
" NERDCommenter
nmap g- <Plug>NERDCommenterComment
nmap g+ <Plug>NERDCommenterUncomment
" gundo
map <leader>g :GundoToggle<CR>
let g:gundo_width = 60
let g:gundo_preview_height = 40
let g:gundo_right = 1
set undofile " Maintain undo history between sessions
set undodir=~/.vim/undodir
" F2 shows relative line numbers
nnoremap <F2> :call RltvNmbr#RltvNmbrCtrl(1)<cr>
" F3 unshows relative line numbers
nnoremap <F3> :call RltvNmbr#RltvNmbrCtrl(0)<cr>
" Rainbow parenthesis
nnoremap <F4> :ToggleRaibowParenthesis<cr>
" snipmate
let g:snips_author = 'Louis Plissonneau'
" task list
map <leader>v <Plug>TaskList
" bufstat
"let g:bufstat_bracket_around_bufname = 1
"nmap <leader>bb :buffers<CR> " same as :ls
" sort buffer as least recently used
let g:bufstat_sort_function = 'BufstatSortReverseMRU'
" bufExplorer
let g:bufExplorerDefaultHelp=0
let g:bufExplorerShowRelativePath=1
" latex-suite
let g:tex_flavor='latex'
" use C-space instead of C-J for jumping to <++>
map <C-CR> <Plug>IMAP_JumpForward
imap <C-CR> <Plug>IMAP_JumpForward
map <C-S-CR> <Plug>IMAP_DeleteAndJumpForward
imap <C-S-CR> <Plug>IMAP_DeleteAndJumpForward
" already mapped to insert item on next line
"imap <C-CR> <Plug>IMAP_JumpForward
"inoremap <C-S-CR> <Esc><Plug>IMAP_JumpForward i
" for imap to stop complete (ex for FTTH)
"let g:Imap_FreezeImap = 1
" for being able to type é
imap <buffer> ii<space> <Plug>Tex_InsertItemOnThisLine
imap <buffer> inn<space> <Plug>Tex_InsertItemOnNextLine
" REPLIS: vim-latex replis automatiquement certaines sections et environnements
" ou commandes. La liste de ce qui doit être replié est géré par les varibales
" globales suivantes. Les replis se font en partant de la fin de la liste puis
" en remontant. Les defaut sont dans folding.vim (~/.vim/ftplugin/latex-suite/)
let g:Tex_FoldedSections="part,chapter,section"
",%%fakesection,subsection"
let g:Tex_FoldedEnvironments="verbatim,comment,eq,figure,table,tabular,tikzpicture,thebibliography,abstract,frame"
let g:Tex_FoldedMisc = 'preamble,<<<' " >>>
let g:Tex_MultipleCompileFormats="pdf"
" COMPILATION VISUALISATION: par defaut on compile avec pdflatex et on utilise
" evince
let g:Tex_ViewRule_pdf = "evince"
let g:Tex_DefaultTargetFormat="pdf"
"""""""""""""""""
" screen title
"set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:p:h\")})%)%(\ %a%)\ -\ %{v:servername}
"autocmd BufEnter * let &titlestring = "[vim(" . expand("%:t") . ")]"
"if &term == "screen"
" let &titlestring=expand("%:t")
" set t_ts=k
" set t_fs=\
" set title
"endif
"""""""""""""""""
highlight clear SpellBad
highlight SpellBad term=standout ctermfg=1 term=underline cterm=underline
highlight clear SpellCap
highlight SpellCap term=underline cterm=underline
highlight clear SpellRare
highlight SpellRare term=underline cterm=underline
highlight clear SpellLocal
highlight SpellLocal term=underline cterm=underline
"""""""""""""""""
" for bash plugin not to change Ctrl-J
let g:BASH_Ctrl_j = 'off'
"""""""""""""""""
" pylint no quickfix
let g:pylint_onwrite = 0
let g:pylint_cwindow = 0
"""""""""""""""""
set mouse=a
"""""""""""""""""
" tmux
" Bind <leader>y to forward last-yanked text to Clipper
"nnoremap <leader>y :call system('nc localhost 8377', @0)<CR>
"""""""""""""""""
"let g:pydiction_location = '~/.vim/bundle/pydiction/complete-dict'
"
"""""""""""""""""
" fzf config
set rtp+=/usr/local/opt/fzf
nmap <leader>F :Files<CR>
nmap <leader>f :GFiles<CR>
let g:fzf_files_options = 'bat --style=numbers --color=always {} | head -500'
" set statusline+=%#warningmsg#
" set statusline+=%{SyntasticStatuslineFlag()}
" set statusline+=%*
" ALE config "
let g:ale_sh_shellcheck_options = '-x'
let g:ale_sh_shellcheck_change_directory = 0
let g:ale_sh_shellcheck_exclusions = "SC1091"
let g:ale_fix_on_save = 1
let ale_lint_on_text_changed = 1
let g:ale_go_gometalinter_options = '--fast'
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'python': ['black', 'isort']
\}
let g:ale_linters = {
\ 'go': ['golint', 'gofmt', 'gometalinter']
\}
" 'go': ['golangci-lint', 'golint', 'gofmt', 'gometalinter', 'staticcheck']