X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/45aee1d5282bfca1a6d9b7c13676e346da40bf1c..81e54577d68c9bf2093c1e0766beba7a769e81e7:/vim/vimrc diff --git a/vim/vimrc b/vim/vimrc index 2d6d066..8b9b5c1 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 @@ -31,7 +26,18 @@ nnoremap ,h :SidewaysLeft:delmarks z nnoremap ,l :SidewaysRight:delmarks z "}}} Plug 'andrewradev/switch.vim' -Plug 'bling/vim-airline' +if !has('nvim') + Plug 'bling/vim-airline' "{{{2 + let g:airline#extensions#whitespace#enabled = 1 + let g:airline#extensions#tabline#enabled = 1 + let g:airline#extensions#searchcount#enabled = 0 + let g:airline_powerline_fonts = 1 + + let g:asyncrun_status = "stopped" + " let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}']) + "}}} +endif + Plug 'chrisbra/checkattach' Plug 'derekwyatt/vim-fswitch' Plug 'elzr/vim-json' @@ -54,6 +60,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' @@ -579,15 +586,6 @@ inoremap gUiwgi nmap qq :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" " plugins options {{{1 -" airline {{{2 -let g:airline#extensions#whitespace#enabled = 1 -let g:airline#extensions#tabline#enabled = 1 -let g:airline#extensions#searchcount#enabled = 0 -let g:airline_powerline_fonts = 1 - -let g:asyncrun_status = "stopped" -let g:airline_section_error = airline#section#create_right(['%{g:asyncrun_status}']) - " checkattach {{{2 let g:checkattach_filebrowser = 'ranger' let g:checkattach_once = 'y' @@ -613,8 +611,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 +639,7 @@ nnoremap gb :G blame augroup fugitive_gstatus au! + autocmd User FugitiveIndex setlocal winfixheight autocmd User FugitiveIndex nmap = augroup end @@ -684,6 +684,9 @@ let g:SignatureMap = { " switch let g:switch_mapping = "s" +let g:switch_custom_definitions = [ + \ ['yes', 'no'] + \ ] " spellrotate nmap z] (SpellRotateForward) @@ -837,8 +840,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