Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text: "Remove all Folders from Project" Keybinding

I'm trying to add a keybinding for the menu item "Project > Remove all Folders from Project" in Sublime Text 2 but I can't find the correct command to use.

For "Project > Add Folder to Project..." this worked fine:

{ "keys": ["ctrl+shift+o"], "command": "prompt_add_folder" }

I've looked in the commands list in Packages/Default/Default.sublime-commands but 'remove all folders from project' isn't listed there.

I've tried things like

{ "keys": ["ctrl+shift+r"], "command": "remove_all_folders_from_project" }
and
{ "keys": ["ctrl+shift+r"], "command": "prompt_add_folder" }

but no luck.

like image 477
zeitoon Avatar asked Nov 15 '25 01:11

zeitoon


1 Answers

Default.sublime-commands contains the commands listed in the Command Palette. To see what commands are associated with which menu items, you need to look in Packages/Default/Main.sublime-menu. In this case, the entry is:

{ "command": "close_folder_list", "caption": "Remove all Folders from Project", "mnemonic": "m" },

So, your keymapping should be:

{ "keys": ["ctrl+shift+r"], "command": "close_folder_list" }
like image 167
MattDMo Avatar answered Nov 17 '25 20:11

MattDMo