Sublime Forum

Trying to find certain command definitions

#1

The Project -> “Open Project…” option executes a command called “prompt_open_project_or_workspace.” Where is this command defined? I’m looking all over and cannot find it.

Alternatively, I’m trying to see if it’s possible to create a plugin that will allow a default location for the “open project” prompt. I figure taking a look at the “prompt_open_project_or_workspace” command would be illuminating.

Any know anything about this?

0 Likes

#2

It’s probably built-in (possibly in C++).

The Open Project… command defaults to the last directory you were in. On my system (OS X) this is saved in ~/Library/Preferences/com.sublimetext.3.plist in the key NSNavLastRootDirectory. I would imagine it’s not too hard to find this in Windows or Linux. You could maybe write a plugin that would modify this before executing prompt_open_project_or_workspace, although I’m not sure if that’ll work while Sublime is running.

0 Likes