X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/d001cf9213aebde421dacfcbe3101dade4db9c51..b9f205ff99fd2494baaa1e2b5e0318265541d893:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index fdd0552..0341432 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -1,8 +1,3 @@ -" My vimrc. -" -" Author: Samir Benmendil -" - " runtimepath {{{1 set runtimepath ^=$XDG_CONFIG_HOME/vim set runtimepath +=$XDG_CONFIG_HOME/vim/after @@ -54,6 +49,7 @@ Plug 'sjl/gundo.vim' Plug 'thinca/vim-qfreplace' Plug 'tomtom/tcomment_vim' Plug 'tpope/vim-abolish' +Plug 'tpope/vim-characterize' Plug 'tpope/vim-endwise' Plug 'tpope/vim-eunuch' Plug 'tpope/vim-fugitive' @@ -613,8 +609,9 @@ nmap dd :tab split \| Gdiff \| wincmd h autocmd BufReadPost fugitive://* set bufhidden=delete function! GitToggle() - if buflisted(bufname('.git/index')) - bdelete .git/index + let l:status_buffer = bufname('^fugitive:///*/.git{/worktrees/*,}//$') + if buflisted(l:status_buffer) + execute 'bdelete '.l:status_buffer else Git 16wincmd_ @@ -640,7 +637,8 @@ nnoremap gb :G blame augroup fugitive_gstatus au! - autocmd BufWinEnter */.git/index resize 16 + autocmd User FugitiveIndex setlocal winfixheight + autocmd User FugitiveIndex nmap = augroup end " Gundo {{{2 @@ -684,6 +682,9 @@ let g:SignatureMap = { " switch let g:switch_mapping = "s" +let g:switch_custom_definitions = [ + \ ['yes', 'no'] + \ ] " spellrotate nmap z] (SpellRotateForward) @@ -837,8 +838,9 @@ let g:ycm_language_server = " vim-easy-align {{{2 " start interactive EasyAlign in visual mode -vmap (EasyAlign) -nmap ga (EasyAlign) +vmap :echohl WarningMsg \| echo "EasyAlign mapped to a now" \| echohl None +vmap a (EasyAlign) +nmap a (EasyAlign) " vim-gtest {{{2 let g:gtest#highlight_failing_tests = 0