Sublime Forum

Unfolding on save

#1

I’m having an issue with keeping my code folded. Almost every time I save my file, it does a reload from disk and resets all folding and my place in the file.
Does anyone else have that problem, or any idea how to troubleshoot this? It’s making Sublime incredibly inconvenient to use :-/

Thanks in advance,
Peter

0 Likes

#2

Sounds like a plugin problem. What plugins are you using?

0 Likes

#3

I removed all packages just now except for the package manager itself, and I still lose code-folding when I hit save.
Any ideas what might be causing it?

-Peter

EDIT: After restarting sublime, it does seem to have helped… If it still happens I’ll update :smile:

0 Likes

#4

Yeah, it’s still happening… The only plugin I have active at the moment is “Better CoffeeScript” since that’s the language I’m developing in.
When I hit save it just reloads the file right afterwards, disregarding all my code folding.

Any suggestions?

Peter

0 Likes

#5

Better CoffeeScript might be touching the file or something.
Another thing you can look at is the BufferScroll plugin, which does much more than its name suggests.

0 Likes

#6

That sounds useful, but also as a workaround, I’d prefer to get to the root of the problem and get rid of it there.
I’ll develop without the Better CoffeeScript plugin today I guess (which means no syntax highlighting), just to make sure that’s actually the cause of the problem. If not, it might be related to the fact that I’ve got this file open on our debian server over a filemount, that that triggers the reload…
But if I don’t get the problem today anymore, then it’s definitely related to the CoffeeScript plugin…

-Peter

0 Likes

#7

Ok, I’ve still got the problem…
I’ve uninstalled Better CoffeeScript, and the problem remains. I’ve installed Buffer Scroll and the problem remains. :-/
Code Folding is really important to me in my project, and it seems to be broken. Is there anything related to the samba connection to the actual file (on debian) that might cause this behaviour? e.g. (random theory) there’s a larger delay between pressing save and it being written to the (remote) disk, causing sublime to see the disk version of the file having a newer timestamp than the last save in sublime. i.e. save at 14:05:01 and the file ends up with a timestamp of 14:05:02 causing Sublime to think it needs to reload this “newer” file. Again, just a random thought since I’m running out of ideas…
Hopefully someone here has one or two to throw my way,

-Peter

0 Likes

#8

Hi
I have this problem too…

0 Likes

#9

It’s not necessary to necro several related duplicate threads at once when you have a problem; you can pick one of them and link to the others, or start a new post and link to the others.

1 Like