"}}}
Plug 'alepez/vim-gtest'
Plug 'alx741/vinfo'
+Plug 'andrewradev/sideways.vim' " {{{2
+nnoremap <silent> ,h :SidewaysLeft<CR>:delmarks z<CR>
+nnoremap <silent> ,l :SidewaysRight<CR>:delmarks z<CR>
+"}}}
Plug 'andrewradev/switch.vim'
Plug 'bling/vim-airline'
Plug 'chrisbra/checkattach'
Plug 'octol/vim-cpp-enhanced-highlight'
Plug 'raimondi/delimitmate'
Plug 'sgeb/vim-diff-fold'
+Plug 'skywind3000/asyncrun.vim' " {{{2
+command! -bang -nargs=* -complete=file Make AsyncRun -save=2 -program=make @ <args>
+let g:asyncrun_open = 10
+"}}}
Plug 'shougo/unite.vim'
Plug 'shougo/vimproc.vim', {'do': 'make'}
Plug 'sjl/gundo.vim'
Plug 'wincent/loupe'
" colorschemes
-Plug 'morhetz/gruvbox'
+Plug 'morhetz/gruvbox' " {{{2
+let g:gruvbox_contrast_dark = 'hard'
+let g:gruvbox_contrast_light = 'soft'
+
+Plug 'arcticicestudio/nord-vim' " {{{2
+let g:nord_bold = 1
+let g:nord_italic = 1
+let g:nord_italic_comments = 1
+let g:nord_underline = 1
+let g:nord_uniform_status_lines = 0
+let g:nord_uniform_diff_background = 0
+let g:nord_cursor_line_number_background = 0
+let g:nord_bold_vertical_split_line = 0
+
+"}}}
" snippets
Plug 'sirver/ultisnips'
" staging
" Check LucHermites plugins: https://github.com/LucHermitte/lh-cpp
-Plug 'dense-analysis/ale' " {{{2
-let g:ale_echo_msg_format = '[%linter%] %code: %%s'
Plug 'git@github.com:/ram-z/vim-orgmode', { 'branch': 'dev' } " {{{2
Plug 'vim-scripts/syntaxrange'
let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles
let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static`
let g:haskell_backpack = 1 " to enable highlighting of backpack keywords
+
+let g:haskell_indent_before_where = 2
" }}}
Plug 'aklt/plantuml-syntax'
Plug 'mtth/scratch.vim' " {{{2
let g:scratch_no_mappings = 1
+ let g:scratch_autohide = 0
+"}}}
+
+Plug 'vim-utils/vim-man' " {{{2
+let g:man_width = 80
"}}}
call plug#end()
" colorscheme {{{1
syntax on
set background=dark
-let g:gruvbox_contrast_dark = 'hard'
-let g:gruvbox_contrast_light = 'soft'
-colorscheme gruvbox
-" override the background to be black
-highligh Normal ctermbg=None
+let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
+let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
+set termguicolors
+colorscheme $THEME
+"TODO see how I can integrate this into a theme that customises upstream Nord
+hi debugPC term=reverse ctermbg=8
" options {{{1
" moving around, searching and patterns {{{2
set listchars+=trail:·
augroup trailing
au!
- au InsertEnter * :set listchars-=trail:·
- au InsertLeave * :set listchars+=trail:·
+ au FileType qf setlocal listchars-=trail:·
+ au InsertEnter * set listchars-=trail:·
+ au InsertLeave * set listchars+=trail:·
augroup END
set scrolloff=5 " number of screen lines to show around the cursor
set diffopt+=filler " show filler lines
set diffopt+=vertical " always vertical split
set diffopt+=context:10 " 10 lines context between changes
+set diffopt+=internal
+set diffopt+=algorithm:patience
" reading and writing files {{{2
set modeline " read modelines
map <space> <leader>
" make
-function! Make()
+function! MakeWithOpt()
+ " TODO only do this if makeprg matches make
+ " if &makeprg =~ "make"
let l:make_dir = ""
if exists("b:make_dir")
let l:make_dir = "-C ".b:make_dir
+ elseif exists("t:make_dir")
+ let l:make_dir = "-C ".t:make_dir
elseif exists("g:make_dir")
let l:make_dir = "-C ".g:make_dir
endif
if exists("g:make_targets")
let l:make_targets = g:make_targets
endif
- execute "make! ".l:make_dir." ".l:make_targets
+ execute "Make ".l:make_dir." ".l:make_targets
endf
-nnoremap <leader>r :call Make()<cr>
+nnoremap <silent> <leader>r :call MakeWithOpt()<cr>
" unhighlight search
nnoremap <silent> <Leader>/ :silent nohl<CR>
nnoremap vv ^vg_
" Unfuck my screen
-nnoremap U :syntax sync fromstart<cr>:AirlineRefresh<cr>:redraw!<cr>
+nnoremap U
+ \ :syntax sync fromstart<cr>
+ \ :AirlineRefresh<cr>
+ \ :call popup_clear(1)<cr>
+ \ :redraw!<cr>
" Ranger
" nnoremap <leader>r :silent !ranger %:h<cr>:redraw!<cr>
" airline {{{2
let g:airline#extensions#whitespace#enabled = 1
let g:airline#extensions#tabline#enabled = 1
+let g:airline#extensions#searchcount#enabled = 0
let g:airline_powerline_fonts = 1
+let g:asyncrun_status = "stopped"
+let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}'])
+
" checkattach {{{2
let g:checkattach_filebrowser = 'ranger'
let g:checkattach_once = 'y'
" delete fugitive buffers when closed
autocmd BufReadPost fugitive://* set bufhidden=delete
-nnoremap <silent> <leader>gs :Git<CR>
+function! GitToggle()
+ if buflisted(bufname('.git/index'))
+ bdelete .git/index
+ else
+ Git
+ 16wincmd_
+ endif
+endfunction
+command! GitToggle :call GitToggle()
+command! GToggle GitToggle
+nnoremap <silent> <leader>gs :GitToggle<CR>
+
nnoremap <silent> <leader>gd :Gdiffsplit<CR>
nnoremap <silent> <leader>gc :echohl WarningMsg \| echo "use \<leader>gcc instead" \| echohl None<CR>
nnoremap <silent> <leader>gcc :tab G commit -v<CR>
nnoremap <silent> <leader>gca :tab G commit -v --amend<CR>
nnoremap <leader>gcf :tab G commit -v --fixup=
nnoremap <silent> <leader>gp :echohl WarningMsg \| echo "use \<leader>gpp instead" \| echohl None<CR>
-nnoremap <silent> <leader>gpp :G push<CR>
-nnoremap <silent> <leader>gpf :G push --force-with-lease<CR>
+nnoremap <silent> <leader>gpp :Git push \| copen<CR>
+nnoremap <silent> <leader>gpf :Git push --force-with-lease \| copen<CR>
+nnoremap <silent> <leader>gll :Git pull<CR>
+nnoremap <silent> <leader>gru :Git rebase --interactive @{upstream}<CR>
+nnoremap <silent> <leader>grp :Git rebase --interactive @{push}<CR>
nnoremap <silent> <leader>ga :Gwrite<cr>
nnoremap <silent> <leader>gb :G blame<cr>
augroup fugitive_gstatus
au!
- autocmd BufWinEnter */.git/index resize 16
+ autocmd User FugitiveIndex setlocal winfixheight
+ autocmd User FugitiveIndex nmap <buffer> <leader><space> =
augroup end
" Gundo {{{2
nnoremap <F7> :GundoToggle<CR>
+let g:gundo_prefer_python3 = 1
" indent-guides {{{2
let g:indent_guides_default_mapping = 0
" tcomments {{{2
let g:tcomment_textobject_inlinecomment = 'gic'
let g:tcomment#filetype#guess = 0
+"let g:tcomment#options = {'whitespace' : 'no'}
" ultisnips {{{2
let g:UltiSnipsEditSplit = 'vertical'
end
nnoremap <silent> [unite]a :<C-u>Unite grep:.::\12\17<CR>
nnoremap <silent> [unite]A :<C-u>Unite grep:.:-w:\12\17<CR>
-command! -nargs=1 Ag Unite grep:.::<args>
+command! -nargs=+ Ag Unite grep:.::<args>
" unite-file_rec {{{3
if executable('ag')
let g:ycm_complete_in_strings = 1
let g:ycm_autoclose_preview_window_after_insertion = 0
+let g:ycm_language_server =
+ \ [
+ \ {
+ \ 'name': 'haskell',
+ \ 'cmdline': [ 'haskell-language-server-wrapper', '--lsp' ],
+ \ 'filetypes': [ 'haskell', 'lhaskell' ]
+ \ },
+ \ ]
+
" vim-easy-align {{{2
" start interactive EasyAlign in visual mode
vmap <Enter> <Plug>(EasyAlign)