From 79be97c081da2125cc237baf59cf0d872c17a1ff Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Sat, 12 Sep 2020 19:08:22 +0530 Subject: [PATCH] Revert "nvim: Switch to signify" See open issue https://github.com/mhinz/vim-signify/issues/345 Makes signify completely unusable if the undo hunks feature is desired. This reverts commit b25091fae69f379a2c0b10cd340d0867504f75af. --- nvim/.config/nvim/after/plugin/gitgutter.vim | 11 +++++++++++ nvim/.config/nvim/after/plugin/signify.vim | 10 ---------- nvim/.config/nvim/init.vim | 2 +- nvim/.config/nvim/plugin_settings.vim | 12 ++++++++++++ 4 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 nvim/.config/nvim/after/plugin/gitgutter.vim delete mode 100644 nvim/.config/nvim/after/plugin/signify.vim diff --git a/nvim/.config/nvim/after/plugin/gitgutter.vim b/nvim/.config/nvim/after/plugin/gitgutter.vim new file mode 100644 index 0000000..14897fc --- /dev/null +++ b/nvim/.config/nvim/after/plugin/gitgutter.vim @@ -0,0 +1,11 @@ +nnoremap ]c :GitGutterNextHunk +nnoremap [c :GitGutterPrevHunk +nnoremap ghs :GitGutterStageHunk +nnoremap ghu :GitGutterUndoHunk +nnoremap ghp :GitGutterPreviewHunk +nnoremap ghq :GitGutterQuickFix +nnoremap ghf :GitGutterFold +omap ih (GitGutterTextObjectInnerPending) +omap ah (GitGutterTextObjectOuterPending) +xmap ih (GitGutterTextObjectInnerVisual) +xmap ah (GitGutterTextObjectOuterVisual) diff --git a/nvim/.config/nvim/after/plugin/signify.vim b/nvim/.config/nvim/after/plugin/signify.vim deleted file mode 100644 index 316da9b..0000000 --- a/nvim/.config/nvim/after/plugin/signify.vim +++ /dev/null @@ -1,10 +0,0 @@ -nnoremap ghu :SignifyHunkUndo -nnoremap ghp :SignifyHunkDiff -nmap ]c (signify-next-hunk) -nmap [c (signify-prev-hunk) -nmap ]C 9999]c -nmap [C 9999[c -omap ih (signify-motion-inner-pending) -xmap ih (signify-motion-inner-visual) -omap ah (signify-motion-outer-pending) -xmap ah (signify-motion-outer-visual) diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index ed0df01..30bc646 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -20,7 +20,7 @@ Plug 'tmux-plugins/vim-tmux-focus-events' " Git support Plug 'rhysd/git-messenger.vim' Plug 'tpope/vim-fugitive' -Plug 'mhinz/vim-signify' +Plug 'airblade/vim-gitgutter' Plug 'rhysd/conflict-marker.vim' Plug 'whiteinge/diffconflicts' Plug 'salcode/vim-interactive-rebase-reverse' diff --git a/nvim/.config/nvim/plugin_settings.vim b/nvim/.config/nvim/plugin_settings.vim index 6e564ba..8f7eedc 100644 --- a/nvim/.config/nvim/plugin_settings.vim +++ b/nvim/.config/nvim/plugin_settings.vim @@ -1,3 +1,15 @@ +" Let vim-gitgutter do its thing on large files +let g:gitgutter_max_signs=1000 +let g:gitgutter_map_keys = 0 +let g:gitgutter_highlight_linenrs = 1 +let g:gitgutter_preview_win_floating = 1 +let g:gitgutter_use_location_list = 0 +let g:gitgutter_sign_added = '+a' +let g:gitgutter_sign_modified = '+m' +let g:gitgutter_sign_removed = '-r' +let g:gitgutter_sign_removed_first_line = '^^' +let g:gitgutter_sign_modified_removed = 'mr' + " suda vim let g:suda_smart_edit = 1