sublime_text icon indicating copy to clipboard operation
sublime_text copied to clipboard

More intelligent automatic code unfolding when using Find function

Open Meshparts opened this issue 3 years ago • 3 comments

Take this situation:

Code with multiple indentation levels is folded on level 1
User opens the find toolbar and searches for a string
ST3 jumps to first hit in the code and unfolds the indentation path until that position in code

The thing that could be improved here, is to let the equivalent indentation levels, that do not contain the hit, in a folded state.

For example, if the hit is in the indentation level 1>2>3, then all other levels 3 under the unfolded level 2 should remain folded.

I hope it’s clear what I mean, if not, please ask for more detail. I think this function could be very usefull.

Regards Alexandru

Meshparts avatar Apr 24 '21 14:04 Meshparts

The issue title does not match the description imo.

I too would love to have a "search without unfolding" feature or behavior (maybe 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 (°<︵° )

WoodrowShigeru avatar Oct 08 '22 13:10 WoodrowShigeru

From your answer I think you are talking about a completly different feature. The title fits the content. Just read carefully.

Meshparts avatar Oct 08 '22 14:10 Meshparts

I see, you are talking about the action of "step 3" being optimizable. I read that as "This is how it currently is and it's annoying." (And then I didn't read the rest because this already felt like the right place)

I was indeed searching for my own problem in another issue, before creating a duplicate one. Never mind.

WoodrowShigeru avatar Oct 10 '22 11:10 WoodrowShigeru