X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/45aee1d5282bfca1a6d9b7c13676e346da40bf1c..b9f205ff99fd2494baaa1e2b5e0318265541d893:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index 2d6d066..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,6 +637,7 @@ nnoremap gb :G blame augroup fugitive_gstatus au! + autocmd User FugitiveIndex setlocal winfixheight autocmd User FugitiveIndex nmap = augroup end @@ -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