2 hi Comment ctermfg=black ctermbg=NONE cterm=bold
3 "hi Comment ctermfg=darkgray cterm=bold
4 hi Conceal ctermfg=black ctermbg=NONE cterm=bold
5 hi CursorLine cterm=none guibg=NONE
6 hi CursorLineNr ctermfg=white cterm=NONE
7 hi FoldColumn ctermfg=black ctermbg=none cterm=bold
8 hi Folded ctermfg=black ctermbg=NONE cterm=bold
9 hi LineNr ctermfg=black ctermbg=none cterm=bold
10 hi Pmenu ctermbg=magenta ctermfg=black
11 hi PmenuSel ctermbg=darkmagenta ctermfg=black
12 hi PmenuSbar ctermfg=gray ctermbg=black
13 hi PmenuThumb ctermfg=white
14 hi Search ctermfg=black ctermbg=yellow
15 hi SignColumn ctermbg=black
16 hi SpecialKey ctermfg=black cterm=bold
17 hi StatusLine term=bold,reverse ctermfg=white ctermbg=blue cterm=none
18 hi StatusLineNC term=reverse ctermfg=blue ctermbg=none cterm=underline
19 hi Visual ctermfg=black ctermbg=yellow cterm=none
20 hi WarningMsg ctermbg=darkyellow ctermfg=white
21 au FileType xml hi xmlAttrib ctermfg=green
22 au FileType xslt hi xmlNamespace ctermfg=red
23 au FileType xslt hi xmlAttrib ctermfg=green
24 au FileType * hi Special ctermfg=red
25 "au FileType haskell hi Comment ctermfg=DarkGreen
26 au FileType haskell hi Identifier ctermfg=LightGray
28 " Seek term under cursor
29 nmap <silent> * :set hls<CR>:let @/="\\<<C-r><C-w>\\>"<CR>/<BS>
30 " Seek subterm under cursor
31 nmap <silent> µ :set hls<CR>:let @/="<C-r><C-w>"<CR>/<BS>
48 " Maintain Visual Mode after shifting > and <
53 vmap I :m '<-2<CR>gv=gv
54 vmap K :m '>+1<CR>gv=gv
57 " Fix <Home>, <End>, <C-Left>, etc. when vim is in tmux;
58 " tmux will send xterm-style keys when xterm-keys is on
59 execute "set <xHome>=\e[7~"
60 execute "set <xEnd>=\e[8~"
61 execute "set <xRight>=\e[1;*C"
62 execute "set <xLeft>=\e[1;*D"
63 execute "set <xUp>=\e[1;*A"
64 execute "set <xDown>=\e[1;*B"
72 set completeopt=menu,menuone,popup,longest
73 set diffopt=internal,filler,closeoff,algorithm:histogram,indent-heuristic
76 set cpoptions+=M " ignore backslashes in % matching
78 silent !mkdir -p ~/.cache/neovim/swap
79 set directory=$HOME/.cache/neovim/swap
84 function! GetFoldExprFromIndent()
85 " Calcule l'indentation en fonction des tabulations
86 " et espaces au début des lignes
87 let line = getline(v:lnum)
88 let tabs = matchend(line,"^\t*")
89 let spaces = matchend(line,"^[ \t]*") - tabs
90 return tabs + ((spaces + 3) / 4)
92 set foldexpr=GetFoldExprFromIndent()
105 set path=.,/usr/include,/usr/local/include,,
115 set maxmempattern=2000
125 "set runtimepath=$HOME/.vim,$VIMRUNTIME,$VIM
126 set sessionoptions=curdir,folds
130 "set statusline+=\ %l:%c
131 "set statusline=\ %{get(b:,'coc_current_function','')}
133 "set statusline+=%#ErrorMsg#%{CocStatusDiagnosticError()}%*
134 "set statusline+=\ %{CocStatus()}
135 set statusline+=%{LinterStatus()}
136 set statusline+=\ %m%R\ %Y
142 silent !mkdir -p ~/.cache/neovim/view
143 set viewdir=$HOME/.cache/neovim/view
144 set viminfo+=n$HOME/.cache/neovim/info
147 set whichwrap+=<,>,[,]
148 set wildignore=*.a,*.d,*.o,*.so,*~,*.cmo,*.cmi,*.cmx,*.cmxs,*.cma,*.cmxa,*.byte,*.native,*.hi
150 set wildmode=list:longest,full
153 " When editing a file, always jump to the last known cursor position.
154 " Don't do it when the position is invalid or when inside an event handler
155 " (happens when dropping a file on gvim).
156 autocmd BufReadPost *
157 \ if line("'\"") > 0 && line("'\"") <= line("$") |
158 \ exe "normal g`\"" |
161 if (&term == "screen" || &term == "screen.linux")
165 if has("gui_running")
168 set titlestring=VIM:\ %F\ %a%r%m
179 "set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:p:h\")})%)%(\ %a%)\ -\ %{v:servername}
180 auto BufEnter * :set title | let &titlestring = 'VIM: ' . expand('%:p')
181 "auto VimLeave * :set t_ts=
\ek
\e\
183 let space = &shiftwidth == 0 ? &tabstop : &shiftwidth
184 if (&term == "linux" || &term == "screen.linux")
185 "set foldtext=substitute(getline(v\:foldstart),'^\\(\\s*\\)',{m->substitute(m[1],'\\('.repeat('\ ',&shiftwidth).'\\\|\\t\\)','\|'.repeat('.',&shiftwidth-1),'g')},'').'\ \ ('.(v\:foldend-v\:foldstart+1).')\ '
186 "set fillchars=fold:_
187 set list listchars=nbsp:+,tab:\|.,trail:_,extends:>,precedes:<
188 set foldtext=getline(v\:foldstart).'\ \ ('.(v\:foldend-v\:foldstart+1).')\ '
190 "set foldtext=substitute(getline(v\:foldstart),'^\\(\\s*\\)',{m->substitute(m[1],'\\('.repeat('\ ',&shiftwidth).'\\\|\\t\\)','⎢'.repeat('·',&shiftwidth-1),'g')},'').'\ \ ('.(v\:foldend-v\:foldstart+1).')\ '
191 "set fillchars=fold:·
192 set foldtext=getline(v\:foldstart).'\ \ ('.(v\:foldend-v\:foldstart+1).')\ '
193 set list listchars=nbsp:¬,tab:⎢·,trail:·,extends:>,precedes:<
196 "let g:indentLine_char_list = ['⎢']
197 "" Concealed text is not highlighted by the visual mode, this is annoying.
198 ""let g:indentLine_concealcursor = 'incv'
199 "let g:indentLine_faster = 1
200 "let g:indentLine_first_char = '⎢'
201 "let g:indentLine_leadingSpaceChar = '·'
202 "let g:indentLine_leadingSpaceEnabled = 1
203 "let g:indentLine_showFirstIndentLevel = 1
204 "let g:indentLine_bgcolor_term = 'NONE'
205 "let g:indentLine_defaultGroup = 'Folded'
207 if (v:version >= 700)
208 hi TabLine term=bold,reverse ctermfg=white ctermbg=blue cterm=none
209 hi TabLineFill term=bold,reverse ctermfg=none ctermbg=blue cterm=none
210 hi TabLineSel term=reverse ctermfg=white ctermbg=none cterm=bold
211 imap <C-S-tab> <Esc>:tabprevious<CR>i
212 imap <C-t> <Esc>:tabnew<CR>
213 imap <C-tab> <Esc>:tabnext<CR>i
214 nmap <C-S-tab> :tabprevious<CR>
215 nmap <Esc><tab> :bnext<CR>
216 nmap <C-t> :tabnew<CR>
217 "nmap <C-tab> :tabprevious<CR>
218 "nmap <tab> :tabnext<CR>
219 nmap <C-tab> :bprevious!<CR>
220 nmap <tab> :bnext!<CR>
221 nmap td :tabclose<CR>
222 nmap ti :tabfirst<CR>
227 nmap tn :tabnew<Space>
228 nmap tt :tabedit<Space>
229 nmap <C-i> :bprevious!<CR>
230 nmap <C-j> :lprevious<CR>
231 nmap <C-l> :lnext<CR>
232 nmap <C-k> :bnext!<CR>
233 nmap <C-w>k :wincmd j<CR>
234 nmap <C-w>i :wincmd k<CR>
235 nmap <C-w>j :wincmd h<CR>
236 nmap <C-w>l :wincmd l<CR>
238 set sessionoptions+=tabpages
240 if (v:version >= 704)
241 silent !mkdir -p ~/.cache/vim/undo
242 set undodir=~/.cache/vim/undo/
244 autocmd BufWritePre /tmp/* setlocal noundofile
245 autocmd BufWritePre */sec/* setlocal noundofile
247 fun! TrimWhitespace()
248 let l:save = winsaveview()
249 keeppatterns %s/\s\+$//e
250 call winrestview(l:save)
252 autocmd BufRead .envrc setfiletype sh
253 "autocmd BufRead *.hamlet setfiletype html
254 "autocmd BufRead *.julius setfiletype javascript
255 "autocmd BufRead *.lucius setfiletype css
256 autocmd BufRead *.ledger setfiletype ledger
257 autocmd BufRead *.lhs setfiletype haskell
258 autocmd BufRead HLint.hs setfiletype txt
259 autocmd BufRead *.purs
260 \ setfiletype purescript |
262 "autocmd BufRead *.nix set syntax=zsh | set expandtab
263 autocmd BufNewFile,BufRead *.nix
264 \ hi nixAntiquotation ctermfg=cyan |
267 \ set foldmethod=indent
268 autocmd BufWritePre *.nix :call TrimWhitespace()
269 autocmd BufNewFile,BufRead *.py
273 autocmd BufNewFile,BufRead *.hs set expandtab
274 autocmd BufNewFile,BufRead *.tct set filetype=tct | set expandtab
275 autocmd BufWritePost * if &diff == 1 | diffupdate | endif
278 autocmd FileType qf setlocal wrap
280 " If doing a diff. Upon writing changes to file, automatically update the differences
285 let b:match_words = '«:»,“:”'
287 nmap <Leader>a <Plug>(EasyAlign)
288 vmap <Enter> <Plug>(EasyAlign)
289 let g:easy_align_ignore_groups = ['Comment', 'String', 'ledgerTransaction', 'ledgerTag', 'jccComment', 'jccTransaction']
291 let g:netrw_liststyle = 3
292 "let g:netrw_cursorline = 0
293 let s:netrw_usercul = 0
296 let g:buffergator_display_regime = "bufname"
297 let g:buffergator_show_full_directory_path = 0
298 let g:buffergator_viewport_split_policy = 'R'
299 let g:buffergator_autoupdate = 1
300 let g:buffergator_autodismiss_on_select = 0
301 let g:buffergator_suppress_keymaps = 1
302 nmap <leader>bq :bp <BAR> bd #<CR>
303 "let g:buffergator_mru_cycle_loop = 1
304 nmap <leader>i :BuffergatorMruCyclePrev<cr>
305 nmap <leader>k :BuffergatorMruCycleNext<cr>
306 nmap <leader>bl :BuffergatorOpen<cr>
307 nmap <leader>T :enew<cr>
308 set cpoptions+=M " ignore backslashes in % matching
310 let g:html_expand_tabs = 0
311 let g:html_ignore_conceal = 0
312 let g:html_ignore_folding = 1
313 let g:html_number_lines = 0
314 let g:html_use_xhtml = 0
316 "map <C-p> :CtrlPBuffer<CR>
317 "let g:ctrlp_working_path_mode = 'c'
318 "let g:ctrlp_map = '<Leader>t'
319 "let g:ctrlp_match_window_bottom = 0
320 "let g:ctrlp_match_window_reversed = 0
321 "let g:ctrlp_custom_ignore = '\v\~$|\.(o|swp|pyc|wav|mp3|ogg|blend)$|(^|[/\\])\.(hg|git|bzr)($|[/\\])|__init__\.py'
322 "let g:ctrlp_working_path_mode = 0
323 "let g:ctrlp_dotfiles = 0
324 "let g:ctrlp_switch_buffer = 0
327 "map <silent> tu :call GHC_BrowseAll()<CR>
328 "map <silent> tw :call GhcModType<CR>
329 map <silent> hc :GhcModTypeClear<CR>
330 map <silent> he :GhcModExpand<CR>
331 map <silent> hi :GhcModTypeInsert<CR>
332 map <silent> hs :GhcModSigCodegen<CR>
333 map <silent> hs :GhcModSplitFunCase<CR>
334 map <silent> ht :GhcModType<CR>
338 nmap <F5> :Hoogle <C-R><C-W><CR>
340 "let g:TimeKeeperUpdateFileTimeSec = 5
341 ""let g:TimeKeeperStartOnLoad = 1
342 "let g:TimeKeeperUseFlatFile = 0
343 "nmap <silent> <F8> :call TimeKeeper_ToggleTaskWindow()<cr>
344 "call TimeKeeper_StartTracking()
346 let g:RecoverPlugin_Delete_Unmodified_Swapfile = 1
348 let g:calendar_number_of_months = 1
349 let g:calendar_wruler = 'di lu ma me je ve sa'
350 let g:calendar_monday = 1
351 function MyCalAction(day,month,year,week,dir)
352 " day : day you actioned
353 " month : month you actioned
354 " year : year you actioned
355 " week : day of week (Mo=1 ... Su=7)
356 " dir : direction of calendar
358 "let calendar_action = 'MyCalAction'
359 "hi link ALEError Error
360 "hi Warning term=underline cterm=underline ctermfg=Yellow gui=undercurl guisp=Gold
361 "hi link ALEWarning Warning
362 "hi link ALEInfo SpellCap
364 "let g:echodoc#enable_at_startup = 1
365 "let g:echodoc#type = 'signature'
367 "let g:gitgutter_grep = 'rg'
368 let g:gitgutter_grep = 'grep'
369 let g:gitgutter_diff_args = '--diff-algorithm=histogram'
370 let g:gitgutter_map_keys = 0
371 let g:gitgutter_sign_added = '+'
372 let g:gitgutter_sign_modified = '±'
373 let g:gitgutter_sign_modified_removed = '-'
374 let g:gitgutter_sign_removed = '_'
375 let g:gitgutter_sign_removed_first_line = '▔'
376 let g:gitgutter_sign_priority = 9
377 hi GitGutterAdd ctermfg=green
378 hi GitGutterDelete ctermfg=red
379 hi GitGutterChange ctermfg=yellow
380 hi GitGutterChangeDelete ctermfg=red
381 nmap [c <Plug>(GitGutterPrevHunk)
382 nmap ]c <Plug>(GitGutterNextHunk)
383 nmap <Leader>p <Plug>(GitGutterPreviewHunk)
384 nmap <Leader>+ <Plug>(GitGutterStageHunk)
385 nmap <Leader>- <Plug>(GitGutterUndoHunk)
387 "let g:deoplete#enable_at_startup = 1
388 "call deoplete#custom#option('sources', {
389 "\ '_': ['ale', 'buffer', 'around'],