Sublime Forum

Code is folded automatically on sublime start

#1

I’m encountering the following strange behavior.
Every time I open Sublime, viewing a specific file “papername.tex”, it will automatically fold all the code. I have to press Cmd-K Cmd-J to unfold it.
I tried the following:

  • Deleted the *.sublime-project and *.sublime-workspace files
  • Renamed the file. Then everything is fine. But when I give it back the old name, the behavior reappears.
  • Other files, in the same project or different ones, will not behave this way.
  • The behavior doesn’t occur when I open the specific file from a current Sublime session. It only happens when Sublime starts, and the file is the first one to be opened.

So my question is: where do I find the setting which seems to be by default attached to this file and automatically folds all the code on start?

0 Likes

#2

That’s something that a package or plugin that you’ve installed is doing for you. If you share a list of the packages that you’re using we can probably use that to figure out which one is doing this.

0 Likes

#3

Thanks! Of the packages that I have installed, most likely the culprit is among one of:
BracketHighlighter, Latex-cwl, LaTeXing, LaTeXTools, LaTeXYZ, Sync Settings
I noticed that the behavior occurs just after Sync Settings syncs. I tried unfolding and then re-syncing but it doesn’t solve it. The behavior is for a LaTeX file.

The full list of installed packages is:
AlignTab,
Anaconda,
BracketHighlighter,
Git,
GitGutter,
LaTeX-cwl,
LaTeXing,
LaTeXTools,
LaTeXYZ,
MarkdownEditing,
MarkdownPreview,
MarkdownTOC,
org_agenda,
orgmode,
Package Control,
PackageResourceViewer,
Shell Exec,
SideBarEnhancements,
Sync Settings,
Typewriter

0 Likes

#4

I would imagine that the issue is that one of these packages wants to auto-fold files on open/startup. Since it only seems to happen with latex files (unless it’s only that specific file?) I would immediately suspect one of the latex packages.

I’m not familiar with any of them, but some quick checking shows that Latexing mentions some sort of folding functionality in it’s settings.

I’d suggest trying to disable them one at a time and see if that affects things at all.

0 Likes

#5

BracketHighlighter does not auto fold code, so you can go ahead rule that one out.

0 Likes

#6

Remove orgmode and org_agenda packages and you will be fine after that.
Issue related: issue#74

0 Likes

#7

Thanks @amei! Indeed it is orgmode (having org_agenda on doesn’t seem to cause issues).

It seems the author of orgmode thinks the issue is fixed?

I’ve used orgmode for a while and it only started causing trouble a few days ago. Is there a way to clear its settings? I tried uninstalling it and removing related folders, but on re-install the issue is back.
It’s localized to one machine and one specific file (on other machines, for the same file, it’s not a problem).

0 Likes

#8

I found myself with the same problem and could only solve this by deleting a file.
I don’t know what OS you have, but the file you would like to delete is orgmode-store.bin.gz.

On linux, it is located in /home/ USERNAME /.config/sublime-text-3/Packages/Settings/

0 Likes

#9

Great, thanks, that worked! On macOS the file orgmode-store.bin.gz is in:
/Users/username/Library/Application Support/Sublime Text 3/Packages/Settings

0 Likes

#10

My pleasure!
Because of your post, yesterday i discovered orgmode and it pleased me a lot.

0 Likes