Sublime Forum

Add a "name" entry in sublime-project file format to name projects


The projects name is gathered from the file name of the .sublime-project file: {project-name}.sublime-project file. I think this falls somewhat short of what a “name” entry in the sublime-project file could achieve.

Consider this:

File xml-parser.sublime-project with contents:

    name: "PHP Sax XML Parser",
    // other settings ...

Using the name entry (which is maybe not suited for a file name), the fuzzy project search in Sublime could benefit a lot. And as a fallback (when no name entry is present, the current behavior could still kick in).



This would be useful if I have several web application projects and I name my project web-application.sublime-project.

So in the name property I could further specify which web application I am referring to:

// file ~/dev/project1/web-application.sublime-project
    name: "My awesome web application",
    // other settings

// file ~/dev/project2/web-application.sublime-project
    name: "The greatest web application",
    // other settings

This way I could search the project using the actual project name, and not having to identify which folder the project is in to determine which project I want to open.



Sorry, don’t want to be rude but, what about saving the project with a proper name like “my-awesome-web-app.sublime-project” and “the-best-webapp.sublime-project”?



Hi, not rude at all. It’s a valid point of discussion.

At the moment it is the only solution, to have the whole name in the file. But I think it is more flexible to have a proper name value in the project config.

The thing with the file name is that you could potentially end up with awful lengthy file names: the-most-awesome-project-in-the-world-that-i-have-not-yet-given-a-proper-name.sublime-project (not that I would name any projects like that, right…?)



Well, I usually chose a proper name starting from the folder of the project, I mean, I’m more comfortable in having like client_name-project_name than folder_with_generic_name then i’m usually fine by saving the project with the same name as the project’s folder, but that’s me.
In my work all the projects usually have an agency internal “codename” that we use for everything from git repos to issue tracker to email’s subject’ prefix etc to identify them in no time, from that I adopted the same pratice in my personal projects.



This would be super useful in our use-case of sublime, which is to have a project per VCS branch (where these branches eventually get turned into pull requests, to use github terminology).

Often times, we have similarly named leaf branches under different apps, e.g. app/foo/update-dependencies, so trying to cram everything into the filename doesn’t work well because it can’t include slashes.
The branches also tend to get created with auto-generated names, and only later get renamed, so at the very least it’d be helpful to be able to easily rename a project after it’s been opened.

Therefore, it’d be great if we could either:

  1. Explicitly name (and easily rename) a project while it’s open - the best solution - or
  2. Have a way to run save_project_and_workspace_as (to perform the rename) non-interactively. I couldn’t figure out how to give it a new name, it always pops up a save dialog.


There is an open issue for it

1 Like