Sublime Forum

Code Folding inconsistency?

#1

Hi all,

I have a feeling I could solve this by downloading some plugin or other, but it would be nice to have a fix incorporated into the main build.

I’m using Sublime Text 3, “Stable Channel, build 3059” and my code folding is inconsistent for some reason.

If I have for example:

class Foo(): def foo(self): for i in thing: pass'
“Fold level 3” will fold just the for loop, but “Fold level 2, 1” both fold the entire class. I would expect “Fold level 2” to fold the method only.

The reason I say it’s inconsistent is that for maybe 25% of my files it works properly, and for the other 75% the “fold level 2” is the same as “fold level 1”.

There must obviously be something different in my files, but as far as I can see in the text editor they are identical. I don’t know much about coding in general, I just write simple instrument control scripts to make my electrical engineering job easier.

Thanks,
Steven

0 Likes

Code folding inconsistencies between ST2 and ST3
Code folding level 2 issue
#2

I’m finding the same thing with Sublime Text 3 on OS X 10.9. Quite annoying!

EDIT: I’ve discovered that folding a level in my JavaScript file fails if an empty function declaration exists there. Like this: function MyFun() {}\n

0 Likes

#3

I am having this issue with Python code in Build 3114.

Folding level 2 does the same thing as folding level 1. This used to work as expected but no longer does.

EDIT: This does not appear to be a bug as it is only affecting a few of my files. Is there anything I should be on the lookout for in these files that would cause this behavior?

0 Likes

#4
1 Like

#5

I’m still getting this error - was there ever any fix?

0 Likes