From 1cf1d5f484a8744fd0ab3f38f7b493beb2625b61 Mon Sep 17 00:00:00 2001 From: Ian Keane Date: Wed, 15 Jul 2020 13:48:08 -0400 Subject: [PATCH] Cleanup and new plugins --- vim/.vimrc | 63 +++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/vim/.vimrc b/vim/.vimrc index 1752b55..003e214 100755 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -30,7 +30,7 @@ Plug 'sainnhe/vim-color-forest-night' Plug 'justinmk/vim-sneak' Plug 'axvr/zepl.vim' - Plug 'kovisoft/slimv' + " Plug 'kovisoft/slimv' Plug 'tpope/vim-vinegar' Plug 'preservim/nerdtree' Plug 'vimwiki/vimwiki' @@ -39,29 +39,24 @@ Plug 'junegunn/gv.vim' Plug 'rbong/vim-flog' Plug 'tpope/vim-unimpaired' + " Clojure + Plug 'guns/vim-clojure-static' " syntax + Plug 'tpope/vim-fireplace' + Plug 'guns/vim-sexp' + Plug 'tpope/vim-sexp-mappings-for-regular-people' + Plug 'dylanaraps/wal.vim' + " Plug 'tpope/vim-salve' + " cljfold - " Todo: - " GV - " Gundo (or undotree?) - " Emmett - " Fugitive - " Vimwiki - " Plug 'ryanss/vim-hackernews' - " Plug 'mbbill/undotree' or Plug 'sjl/gundo.vim' - " Plug 'tpope/vim-projectionist' - " Plug 'mileszs/ack.vim' - " Plug 'vim-pandoc/vim-pandoc' - " Plug 'alfredodeza/pytest.vim' - " Plug 'docker/docker' - " Plug vim-scripts/indentpython.vim - " +" " Todo: +" " call plug#end() "}}} " appearance {{{ - colorscheme zenburn - " colorscheme wal + " colorscheme zenburn + colorscheme wal syntax on " Enable syntax set encoding=utf-8 " Keep utf-8 encoding set scrolloff=2 " Keep at least 3 lines above and below cursor @@ -164,7 +159,7 @@ " Clear search highlighting with leader-space nnoremap :noh - + " Underline with line of the same length nnoremap - yypv$r- @@ -202,11 +197,18 @@ "}}} " slimv{{{ - let g:slimv_repl_split=2 - let g:slimv_repl_split_size=10 -" + " let g:slimv_repl_split=2 + " let g:slimv_repl_split_size=10 + "}}} + +" clojure {{{ + " TODO: make only work in clojure files + nnoremap e :Eval " eval form + nnoremap E :%Eval " eval file +" }}} + " split pane navigation {{{ " Map vertical split to \ w, switch to it, open explorer, prompt for filename " TODO: make new window prompt use fzf @@ -304,14 +306,11 @@ "}}} " git commands {{{ -" TODO: map fugitive commands -" TODO: check out gv etc -" TODO: bind hunk committing - " Gitgutter hunk view nmap ghv (GitGutterPreviewHunk) nmap ghn (GitGutterNextHunk) nmap ghp (GitGutterPrevHunk) nmap ghf (GitGutterFold) + nmap ghs (GitGutterStageHunk) " Controls fugitive diff split direction set diffopt=vertical "}}} @@ -329,7 +328,7 @@ \ foldmethod=expr \ foldlevel=0 | \ endif - + function! FoldRegex(lnum,pat,context) " get start/end positions for context lines let startline=a:lnum-a:context @@ -340,11 +339,11 @@ while endline > line('$') let endline-=1 endwhile - + let returnval = 2 - + let pos=getpos('.') - + " search from current line to get matches ON the line call cursor(a:lnum, 1) let matchline=search(a:pat,'cW',endline) @@ -362,9 +361,9 @@ let returnval = 1 endif endif - + call setpos('.',pos) - + return returnval endfun