From a3ede8f8bcaaa6fb3c6e15b5c1da25ba4f88916c Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Sun, 1 May 2022 14:42:58 +0200 Subject: [PATCH] vim: Use `gitgutter`'s `foldtext()` Use `gitgutter`'s `foldtext()` to display an indicator if a fold contains lines that have been changed. This is necessary as {,neo}vim does not display signs next to folded lines. --- .config/vim/vimrc.d/30-settings.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.config/vim/vimrc.d/30-settings.vim b/.config/vim/vimrc.d/30-settings.vim index 72a5249..3d260fa 100644 --- a/.config/vim/vimrc.d/30-settings.vim +++ b/.config/vim/vimrc.d/30-settings.vim @@ -76,6 +76,11 @@ set iskeyword+=- " Do not automatically insert at EOF if missing set nofixendofline +if (exists('g:loaded_gitgutter')) + " Augment the default `foldtext()` with an indicator whether the folded + " lines have been changed. + set foldtext=gitgutter#fold#foldtext() +endif " Netrw