Sublime Forum

[solved] How to prevent ST from populating workspace's history

#1

Hello,

I’m trying to create “clean” .sublime-project and .sublime-workspace files, to automate new projects creations, by simply copying those ST files into each new project I create, given that they have the same fodlers structure (so ptahs in the .sublime-project just have to be relative ones).

For this, I simply perform these actions :

  1. I launch a blank instance of ST.
  2. I click on Project > Add folder to project…
  3. I chose a folder in one of my existing project (I’ll edit the path to make it relative and non-specific to that project later).
  4. I save the project with a specific name depending on the folder added. It automatically creates the .sublime-workspace.
  5. I open the .sublime-project file, and edit the path to make it relative to the folder where I store ST project/workspace files (in each project, I have a folder for it, always named the same).

Then I repeat this process for each set of ST workspace/root folder I want for my future projects.

Finally, I plan to zip the few ST files created, in order to extract them when I create new projects, for me to have ready-to-use sets of ST workspaces.

PROBLEM

  • It automatically adds files recently opened, under the "file_history": node in the .sublime-workspace file.
  • It also adds entries under the "find_history": node.
  • Also under the "selected_items": nodes (there’s two of them).

I don’t want these informations to show up. I know this is intended in ST design, but the problem is that I have flushed files history in the File > Open recent menu ; so they shouldn’t show up, especially if the workspace is freshly created.

If I don’t want files history or any type of interaction history to show up in a fresh new workspace, I should be able to do that, no matter how ST has been designed.

WHAT I TRIED

  • I cleared File history in ST’s menu.
  • I opened the .sublime-workspace file in ST, and deleted the nodes I talked about previously.
  • I launched a blank instance of ST, while no other one was running, just to double-check that the Files history was flushed. It is, definitely.

RESULT

Whenever I reopen the workspace, its file seems to have been automatically edited by ST, and the nodes reappear, with a long files history coming from nowhere.

SUSPECTED REASONS

ST stores informations somewhere in a general setting.

REQUEST

Please help me to find where ST stores those files history.


Config :

Windows 10
ST v3 (portable mode), stable channel, build 4169

Sources related to this topic :

:link: Why is a sublime-workspace file automatically created when I open my sublime-project?
:link: How to clear ST3 search history?

0 Likes

#2

Ok, I just understood that while being legit to notice the history strange behavior, the resquest is non-sensical :

  • The reason why the history is stored somewhere despite flushing it may be obscure…
  • … but the reason why it reappears in the .sublime-workspace file is logical : if I launch the freshly created (and edited to remove history traces) workspace, it just adds files history in it.

The two mechanisms are unrelated.

So, to not see those entries reappearing, I just have to open the workspace file in a blank ST instance, clean it and save it, then not launch it before zipping it in an archive.

I close this topic, given that it has no meaning to remove history storing in a workspace. Feel free to answer about the history entries persisting despite flushing them.

0 Likes