Don't search folded text when searching
Problem description
I am a frequent user of code folding in ST3. I use the feature because it's a convenient way to hide code I don't care about while working on nearby code that I do. Perhaps unsurprising, I also use search a lot. When searching, folded areas containing a match are unfolded to show the match. This is annoying because I already know I don't care about the results from the folded regions and I have to manually re-fold the section.
Preferred solution
- When a folded area is opened for a search result, ST3 "remembers" this. and
- When the user moves focus away from the folded region (e.g. moving the text input cursor out of it) it is automatically closed
Alternatives
- Config file option that toggles whether folded areas are searched at all or
- Button in search bar to toggle the whether folded areas are searched at all
I too would love to have a "search without unfolding" feature or behavior (preferably, a checkbox). After having spent a hot minute of meticulous custom folding, it can be very frustrating when the search just randomly undoes it all. Makes me want to think carefully if I really need to search right now :^(