From c011f2ed6a2a3db227729f6dd46f1a083dd8eb36 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Mon, 28 Oct 2024 16:54:58 +0100 Subject: [PATCH] vim:setts: Don't auto-open folds when searching This makes it a lot easier to restrict the search (besides searching in visual selection, which is quite limited). The cursor will still land on the closed fold but only once, independent of the number of hits inside of the fold. --- .config/vim/vimrc.d/30-settings.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/vim/vimrc.d/30-settings.vim b/.config/vim/vimrc.d/30-settings.vim index 8f2e3b3..787fa55 100644 --- a/.config/vim/vimrc.d/30-settings.vim +++ b/.config/vim/vimrc.d/30-settings.vim @@ -110,7 +110,8 @@ set breakindent let &showbreak = '\ ' " Replace concealable characters set conceallevel=1 - +" Do not automatically open folds when searching +set foldopen-=search if (exists('g:loaded_gitgutter')) " Augment the default `foldtext()` with an indicator whether the folded " lines have been changed.