Sublime Forum

How to bind key to "Project > Edit Project"?

#1

Is there a way to assign a key command to “Project > Edit Project”? The word “project” is in “Preferences > Key Bindings - Default” exactly once.

I’m curious of the broader question as well: How do you assign key commands to arbitrary menu items, even if they’re not in the default bindings file?

Thanks.

0 Likes

#2

Open the file
/Default/Main.sublime-menu

that has the list of commands of the main menu bar, then just add you to your key bindings file, another option is to look into the the console, with View -> Show Console
the after runing the following code
sublime.log_commands(True)
a lot of commands will be shown there as you execute these

0 Likes

#3

[quote=“tito”]another option is to look into the the console, with View -> Show Console
the after runing the following code
sublime.log_commands(True)
a lot of commands will be shown there as you execute these[/quote]

That’s so easy!!

This command is logged:

command: open_file {"file": "${project}"}

Which translates to this key-binding item:

{ "keys": "ctrl+shift+alt+p"], "command": "open_file", "args": {"file": "${project}"} },

Thank you, tito.

0 Likes