dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 2da19b033eab33a30b54fca89cf9363bc2d6cb79
parent 66c0071525eaf97c9f0e3e9301abcf00fbe34e8b
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Mon, 13 Jan 2020 14:27:21 +0100

Fixed accidental plugin deletion


Former-commit-id: 33ec60fafba717257b76e2a611bd6ec4ca93a391
Diffstat:
Mvim/vimrc | 319+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 319 insertions(+), 0 deletions(-)

diff --git a/vim/vimrc b/vim/vimrc @@ -1,5 +1,324 @@ " vim: foldmethod=marker foldlevel=0 let mapleader=" " " Set the mapleader to be space +" Plugins {{{ +" Installation {{{ +" Install vim-plug if needed +if empty(glob('~/.vim/autoload/plug.vim')) + silent execute "!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') + +" A color table with xterm color codes +Plug 'guns/xterm-color-table.vim' + +" Simple commenting +Plug 'tpope/vim-commentary' + +" Emmet but simpler +Plug 'rstacruz/sparkup' + +" Endwise - smart do-end, if-fi, if-end, case-esac, etc. +Plug 'tpope/vim-endwise' + +" Surround - super useful plugin for surrounding stuff with quotes/brackets/tags +Plug 'tpope/vim-surround' + +" Eunuch - shell commands but in vim +Plug 'tpope/vim-eunuch' + +" A tag overview on the right side +Plug 'majutsushi/tagbar' + +" Personal hypertext files +Plug 'vimwiki/vimwiki' + +" Git wrapper from tpope +Plug 'tpope/vim-fugitive' + +" Undo tree visualiser +Plug 'simnalamburt/vim-mundo' + +" Quickfix window mappings +Plug 'romainl/vim-qf' + +" Repeat everything with '.' +Plug 'tpope/vim-repeat' + +" Distraction-free editing +Plug 'junegunn/goyo.vim' + +" Better CSV editing +Plug 'chrisbra/csv.vim' + +" Display ANSI color codes +Plug 'vim-scripts/AnsiEsc.vim' + +" Disable hlsearch after finished searching +Plug 'romainl/vim-cool' + +" Vim + latex +Plug 'lervag/vimtex' + +" Snippets +Plug 'SirVer/ultisnips' + +" Improve K +Plug 'gastonsimone/vim-dokumentary' + +" Open devdocs for a keyword +Plug 'romainl/vim-devdocs' + +" Fuzzy finder in vim +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf.vim' + +" Better abbrevation and substitution +Plug 'tpope/vim-abolish' + +" An improved grep +Plug 'rking/ag.vim' + +" Highlight hex colors +Plug 'chrisbra/colorizer' + +" Pywal scheme in vim +Plug 'dylanaraps/wal.vim' + +" Documentation skeleton generator +Plug 'kkoomen/vim-doge' + +" Show git changes in the sign column +Plug 'airblade/vim-gitgutter' + +" Bracket bindings for filetypes +Plug 'arp242/jumpy.vim' + +" Substitute preview +Plug 'markonm/traces.vim' + +" Omnifuncs +Plug 'myhere/vim-nodejs-complete' +Plug 'othree/html5.vim' +Plug 'vim-scripts/OmniCppComplete' +Plug 'vim-scripts/pythoncomplete' + +" Alignment +Plug 'junegunn/vim-easy-align' +" +" Peek contents of registers +Plug 'junegunn/vim-peekaboo' + +" Latex symbol to unicode +Plug 'joom/latex-unicoder.vim' + +" Smooth ^U/^D scrolling +Plug 'psliwka/vim-smoothie' + +" Markdown support +Plug 'plasticboy/vim-markdown' + +" Asynchronous popery +Plug 'tpope/vim-dispatch' + +" &path for filetypes +Plug 'tpope/vim-apathy' +call plug#end() +" }}} +" Config {{{ +" Tagbar {{{ +" Maps +nnoremap <leader>tt :TagbarToggle<CR> +nnoremap <leader>to :TagbarOpen fj<CR> + +" tagbar language definitions +let g:tagbar_type_vimwiki = { + \ 'ctagstype':'vimwiki' + \ , 'kinds':['h:header'] + \ , 'sro':'&&&' + \ , 'kind2scope':{'h':'header'} + \ , 'sort':0 + \ , 'ctagsbin':'vwtags.py' + \ , 'ctagsargs': 'default' + \ } + +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' + \ } +let g:tagbar_type_markdown = { + \ 'ctagstype' : 'markdown', + \ 'kinds' : [ + \ 'c:Heading L1', + \ 's:Heading L2', + \ 'S:Heading L3', + \ 't:Heading L4', + \ 'T:Heading L5', + \ 'u:Heading L6' + \ ], + \ 'sort': 0 + \ } + +let g:tagbar_type_scss = { + \ 'ctagstype' : 'scss', + \ 'kinds' : [ + \ 'm:Mixins', + \ 'f:Functions', + \ 'v:Variables', + \ 'c:Classes', + \ 'i:IDs', + \ 't:Tags', + \ 'd:Media', + \ 'p:Placeholders' + \ ], + \ 'sort': 0 + \ } +let g:tagbar_type_conf = { + \ 'ctagstype' : 'lfrc', + \ 'kinds' : [ + \ 'c:Commands', + \ 'm:Maps' + \ ], + \ 'sort': 0 + \ } +let g:tagbar_type_zsh = { + \ 'ctagstype' : 'zsh', + \ 'kinds' : [ + \ 's:Source scripts', + \ 'e:Environment variables', + \ 'f:Functions', + \ 'm:Mappings' + \ ], + \ 'sort': 0 + \ } +" }}} +" Doge {{{ +let g:doge_mapping = '<leader>gd' +" }}} +" Goyo {{{ +let g:goyo_width = "80%" +let g:goyo_height = "85%" +" }}} +" Vimtex {{{ +let g:tex_flavor='latex' +let g:vimtex_view_method='general' +let g:vimtex_quickfix_mode=0 +let g:tex_conceal='abdmg' +" }}} +" Ultisnips {{{ +let g:UltiSnipsExpandTrigger = '<tab>' +let g:UltiSnipsJumpForwardTrigger = '<tab>' +let g:UltiSnipsJumpBackwardTrigger = '<s-tab>' +let g:UltiSnipsSnippetDirectories = [$DOTFILES.'/vim/ultisnips'] +let g:UltiSnipsEditSplit = "vertical" +cabbrev USE UltiSnipsEdit +" }}} +" Dokumentary {{{ +" Improve what K does +let g:dokumentary_docprgs = {'ruby': 'ri {0} | col -b'} +" }}} +" Abolish {{{ +" Work with variants of words easily +let g:abolish_save_file = $DOTFILES.'/vim/abolish_save_file.vim' +" }}} +" Ag {{{ +nnoremap <leader>/ :Ag<space> +" }}} +" Fzf {{{ +set rtp+=~/.fzf +let g:fzf_action = { + \ 'ctrl-t': 'tab split', + \ 'ctrl-i': 'split', + \ 'ctrl-v': 'vsplit' } +nnoremap <leader>F :Files<CR> +nnoremap <leader>B :Buffers<CR> +nnoremap <leader>G :Lines<CR> +" }}} +" Vimwiki {{{ +let tlist_vimwiki_settings = 'wiki;h:Headers' +let g:vimwiki_table_mappings = 0 " avoid vimwiki conflict with Ultisnips + +let wiki = {} +let wiki.path = '/Users/alex/Dropbox/vimwiki/' +let wiki.path_html = '/Users/alex/Dropbox/vimwiki_html' +let wiki.template_path = '/Users/alex/Dropbox/vimwiki/templates' +let wiki.template_ext = '.tpl' +let wiki.syntax = 'default' +let wiki.ext = '.txt' +let g:vimwiki_list = [wiki] +let g:vimwiki_global_ext = 0 +let g:vimwiki_ext2syntax = {'.wiki': 'default'} + +nnoremap <leader>wc :VimwikiCheckLinks<CR> +" }}} +" Sessions {{{ +nmap <leader>ss <Plug>SaveSession +nmap <leader>sl <Plug>LoadSession +nmap <leader>sd <Plug>DeleteSession +nmap <leader>sq <Plug>CloseSession +" }}} +" Sparkup {{{ +let g:sparkupExecuteMapping = '<C-x><C-e><CR>' +let g:sparkupNextMapping = '<C-x><C-e><tab>' +" }}} +" Haskell {{{ +let hs_highlight_delimiters = 1 +let hs_highlight_boolean = 1 +let hs_highlight_types = 1 +let hs_highlight_more_types = 1 +" }}} +" EasyAlign {{{ +" Start interactive EasyAlign in visual mode (e.g. vipga) +xmap ga <Plug>(EasyAlign) + +" Start interactive EasyAlign for a motion/text object (e.g. gaip) +nmap ga <Plug>(EasyAlign) +" }}} +" Peekaboo {{{ +let g:peekaboo_compact=1 +" }}} +" Mundo {{{ +nnoremap <leader>u :MundoToggle<CR> +" }}} +" Vim-qf {{{ +nmap <leader>qn <Plug>(qf_qf_next) +nmap <leader>qp <Plug>(qf_qf_previous) +nmap <leader>qf <Plug>(qf_qf_toggle) +" }}} +" Dispatch {{{ +" Disable default maps +let g:dispatch_no_maps = 1 + +" Only enable those I'll actually use +nnoremap `<CR> :Dispatch<CR> +nnoremap '<CR> :Start<CR> +" }}} +" }}} +" }}} " General {{{ " Set the colors " Use true color