Skip to content

Automatically create "anonymous" .sublime-project files when closing a window (not already saved in a .sublime-project) #3150

@evandrocoan

Description

@evandrocoan

Problem description

When you open Sublime Text with subl /some/full/path/directory and you close Sublime Text without saving it in a .sublime-project file, all your workspace and the open directory itself are lost when you close the "anonymous project" window (a Sublime Text window with open directories not saved in a .sublime-project file could be called a "anonymous" project).

Preferred solution

After you open Sublime Text with subl /some/full/path/directory and you close that window without saving first a .sublime-project file, Sublime Text automatically creates an "anonymous" project in his Data/cache/anonymousprojects directory, with the base name of the first directory opened on the recent-closed window, i.e., directory.sublime-project. If the file already exists, then it includes a timestamp on the directory name. Then, this "anonymous" project (and workspace) could be reopened later on, by going to the menu Project -> Open Recent -> directory.sublime-project

Additionally, a new command should also be added, the Renamed Project File, which would change the name of the project file in the Data/cache/anonymousprojects directory or any other place the .sublime-project file is on. This command would be useful to properly name my "anonymous" projects which do no get a nice name when automatically created, i.e., directory-2019-12-15.sublime-project

Related issues

  1. .sublime-project file without the file name part .sublime-project file without the file name part #828
  2. Layout not saving on Sublime Text 3 quit Layout not saving on Sublime Text 3 quit #1907

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions