From da32211e2be61f9d9818dfc03f510d847fab1c69 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 19 May 2018 12:20:19 +0200 Subject: Update vim config --- pkgs/vim/conf/rc.vim | 12 +++++++++--- pkgs/vim/conf/vim-color-akr/colors/akr.vim | 4 ++-- pkgs/vim/custom.nix | 6 ++++-- pkgs/vim/plugins.nix | 8 ++++++++ 4 files changed, 23 insertions(+), 7 deletions(-) (limited to 'pkgs/vim') diff --git a/pkgs/vim/conf/rc.vim b/pkgs/vim/conf/rc.vim index 6ad5d7b..fcd49b3 100644 --- a/pkgs/vim/conf/rc.vim +++ b/pkgs/vim/conf/rc.vim @@ -20,8 +20,6 @@ set directory=~/.vim/swap//,. set wrap set tabstop=4 shiftwidth=4 set backspace=indent,eol,start -set listchars=tab:\ \ -set list set linebreak set hlsearch @@ -29,6 +27,8 @@ set incsearch set ignorecase set smartcase +set wildchar= wildmenu wildmode=full + let mapleader="," map s :let @/="" @@ -50,6 +50,9 @@ autocmd FileType pandoc setlocal nonumber autoread autocmd FileType pandoc let g:airline#extensions#whitespace#checks=['indent', 'trailing', 'long'] autocmd FileType tex set conceallevel=2 +nnoremap :bnext +nnoremap :bprev + " select previous line on file reload, useful when cycling file extensions autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | execute "normal! g`\" zz" | endif nnoremap :CounterpointNext @@ -98,7 +101,8 @@ let g:goyo_width = 90 let g:goyo_margin_top = 1 let g:goyo_margin_bottom = 0 -nnoremap :UndotreeToggle +nnoremap :call BufferList() +nnoremap :UndotreeToggle nnoremap :GitGutterToggle nnoremap :TagbarToggle nnoremap :Goyo @@ -113,6 +117,8 @@ let g:ctrlp_custom_ignore = { \ 'file': '\.o$\|\.d$' \ } +let g:ackprg = 'ag --vimgrep' + let g:undotree_SetFocusWhenToggle = 1 let g:tagbar_autoclose = 1 diff --git a/pkgs/vim/conf/vim-color-akr/colors/akr.vim b/pkgs/vim/conf/vim-color-akr/colors/akr.vim index 127f022..8ff58d8 100644 --- a/pkgs/vim/conf/vim-color-akr/colors/akr.vim +++ b/pkgs/vim/conf/vim-color-akr/colors/akr.vim @@ -48,7 +48,7 @@ hi Conditional gui=bold guifg=#aadb0f guibg=NONE hi MatchParen gui=bold guifg=NONE guibg=NONE hi Special gui=NONE guifg=#808080 guibg=NONE -hi SpecialKeyTab gui=NONE guifg=NONE guibg=#212121 +hi Tabs gui=NONE guifg=NONE guibg=#212121 hi ColorColumn gui=NONE guifg=NONE guibg=#000000 hi Conceal gui=NONE guifg=#808080 guibg=NONE @@ -100,4 +100,4 @@ hi prologClauseHead gui=NONE guifg=#aadb0f guibg=NONE hi IndentGuidesEven gui=NONE guifg=#424242 guibg=#2D2D2D hi IndentGuidesOdd gui=NONE guifg=#424242 guibg=#2D2D2D -match SpecialKey '^\s\+' +match Tabs /[\t]\+/ diff --git a/pkgs/vim/custom.nix b/pkgs/vim/custom.nix index a6c86af..25eea09 100644 --- a/pkgs/vim/custom.nix +++ b/pkgs/vim/custom.nix @@ -11,16 +11,18 @@ in { names = [ "ctrlp" "undotree" + "goyo" + "ack-vim" + "tagbar" "vim-unimpaired" "vim-airline" "vim-gitgutter" - "goyo" "vim-localvimrc" - "tagbar" "vim-addon-nix" "vim-autoformat" "vim-polyglot" "vim-counterpoint" + "vim-bufferlist" "vim-csexact" "vim-color-akr" ];} diff --git a/pkgs/vim/plugins.nix b/pkgs/vim/plugins.nix index 801fb1e..71314b8 100644 --- a/pkgs/vim/plugins.nix +++ b/pkgs/vim/plugins.nix @@ -26,7 +26,15 @@ in { rev = "93d8fd9d18a378ab3db39411300716129358211c"; sha256 = "02spr4mhj2035q45j8bf502jgpq76a518nv913zx46byfbl69lps"; }; + }; + "vim-bufferlist" = buildVimPlugin { + name = "vim-bufferlist"; + src = fetchgit { + url = "https://github.com/roblillack/vim-bufferlist"; + rev = "bb571a6dcbf19aa72d320545d376e1d13a8853a3"; + sha256 = "0ddp9lzl5yv6xwqrqy0dzvd9b5igf6dm5pbyrl2bm0bg586zx3gr"; }; + }; "vim-color-akr" = buildVimPlugin { name = "vim-csexact"; src = ./conf/vim-color-akr; -- cgit v1.2.3