I have tried to find out any way to bind keyboard shortcuts to open recent (or) named project, but I couldn’t. I wonder if is possible
Keyboard shortcut for (recent) projects
OdatNurd
#2
I’m not sure what you mean by “recent or named project”, but:
-
Project > Quick Switch Project
from the menu will open a chooser to show you the projects that Sublime knows about (i.e. you previously used them); see the menu item for what key is bound to that by default on your platform. -
Project > Open Recent
lists the last 9 most recently used projects; you can bind the commandopen_recent_project_or_workspace
to a key, passing it"args": {"index": 0},
to have the key open the top item in the list,1
for the second, and so on
If you want to open a specific project, you can use the open_project_or_workspace
command to do so, for example:
{ "keys": ["ctrl+shift+h"],
"command": "open_project_or_workspace",
"args": {
"file": "/home/tmartin/local/src/omphalos/omphalos.sublime-project",
"new_window": true
},
},
You need to provide the full path the project or workspace file that you want to open; new_window
controls whether the new project replaces the content of the current window (false
) or a new window is created and the project is loaded in there (true
).
If the project is already open, then Sublime should just focus the already open project window (but that might vary by platform; not sure offhand).
2 Likes
juanfal
#3
That was exactly what I was looking for! Thanks a lot. (in fact I had something but I don’t know I couldn’t fix a weird mistake)
0 Likes