Sublime Forum

Unwanted code unfold

#1

Example:

The second level is already folded, the first level is not
The cursor is placed somewehre on the first level
Using the keyboard shortcut I try to fold first level
Since the cursor is placed in the first level, the first level will not fold
But: all other lower levels that were already folded will be automatically unfolded
I think this is in general unwanted. Maybe it’s a bug?

0 Likes

#2

There is simply no “level” concept in the built-in fold/unfold command implementation (as well as in the plugin API). However, theoretically, someone can create a plugin which has the “level” concept but it (may) just not happen.

0 Likes

#3

I’m talking about the level of indentation that is used by the code folding function.

0 Likes

#4

The built-in fold/unfold is indentation-based.

0 Likes

#5

Of course there is a concept of “level”: Press CTRL+K+1 and the first elvel will be folded. Press CTRL+K+1 and the second level will be folded. And so on.

0 Likes

#6

Yes, that’s what I’m talking about.

0 Likes

#7

Nvm. It looks like I misunderstood what you are asking for.

0 Likes