Sublime Forum

ST 4 not restricted to project folder anymore?

#1

Hi there

I use and love ST since a year or so and recently upgraded to v4. Now the indexing goes wild (100% CPU since many hours), searching in files appearently searches the whole hard drive and the hover-code-references suggest very-far-away places.

So it seems that the index and search are not restricted to the project folder anymore? I have no idea why and how or what I am doing wrong, and couldn’t find anything via Google.

Does anyone have an idea?

Best regards
Michel

0 Likes

#2

Does it occur in safe mode ?

1 Like

#3

It doesn’t occur in safe mode! cool.

Any idea how I can isolate the cause?

Edit: These are my custom preferences:

{
	"auto_match_enabled": false,
	"color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme",
	"ignored_packages":
	[
		"Vintage",
	],
	"shift_tab_unindent": true,
	"theme": "Default.sublime-theme",
	"word_wrap": true
}
0 Likes

#4

I’d suggest disabling your packages one by one (by putting them in ignored_packages) and checking. It might be possible that one of them is causing the indexer to go crazy.

1 Like

#5

Thank you!

I am just not sure how to move the packages. I am on Mac and when I choose “Preferences -> Browse Packages” it opens the file explorer with path /Users/me/Library/Application Support/Sublime Text 3/Packages.

  • isn’t it wrong that that folder is called “Sublime Text 3” as I am running v4?
  • should I move the subfolders somewhere else to disable them? there seems to be more things in neighboring folder “Installed Packages”
0 Likes

#6

You don’t have to move packages. That’s what the ignored_packages settings is about. For example, if you have a package ExamplePackage installed, then you update the ignored_packages settings of your user preferences as ignored_packages: ["Vintage", "ExamplePackage"]. That will cause ST to unload that package and it’s like that package not being installed even though it’s installed (It ignores any changes to ST from that package without the user having to uninstall it).

1 Like

#7

Ok, I got it solved, thank you!

Actually I added all packages to ignored_packages but that didn’t fix it.

I then saved the workspace and checked it, and in the folders setting was /users/me, appearently that’s why it indexed everything. I manually removed that folder, then chose Project -> Remove all folders and Project -> Add folder, restarted and it works :slight_smile:

No idea how the workspace got corrupted but I am happy now.

0 Likes

#8

Actually I added all packages to ignored_packages but that didn’t fix it.

Disabling the packages is usually done to see if the problem comes from packages. If it persists after disabling everything and doesn’t happen in safe mode, the problem would lie somewhere else of course (in your case the workspace file). Safe mode of course is a pristine environment and wouldn’t have picked up the workspace file.

Anyways glad you have your problem figured out !

0 Likes

#9

No idea how the workspace got corrupted but I am happy now.

Note that the folders added to a project are not part of the workspace, they are part of the project file.

Safe mode of course is a pristine environment and wouldn’t have picked up the workspace file.

Workspaces are picked up in safe mode, only the session, plugins and configs are pristine.

0 Likes

#10

I am confused then. I am assuming safe mode as an environment you get when installing ST for the very first time (There’s nothing in it). And workspace file are defined in the session file to keep track of it, right ? If the session is clean, I don’t see how workspaces are picked up.

0 Likes

#11

Workspaces (as in .sublime-workspace files) are listed in several places, those are obviously empty when starting in safe mode. However opening a project directly will still load the accompanying workspace, as will opening that workspace directly.

0 Likes

#12

Sorry for the confusion, I didn’t have a workspace file beforehand.

I always used “File -> Open” to open my project directory and then ST re-opens the last used directory on application start. I can’t see a .sublime-project file but I guess there is a “last used” one somewhere.

0 Likes