Sublime Forum

Keyboard shortcut or method to remove a folder from project

#1

I am trying to find a keyboard shortcut to remove a single folder from a project. Following this discussion, Bind "Project->Add Folder to Project" to key, I can currently add a folder to a project using i.e. the keybinding

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

I can remove a single folder using the mouse, by right clicking the folder on the sidebar (from ctrl+k, ctrl+b) and then selecting Remove Folder From Project. It would be helpful to know whether there is a way to remove the folder, either by using a direct keybinding or some combination of keyboard usage. Right now, I am able to activate and navigate through the folders to the sidebar using ctrl+0, but sublime does not seem to pick up the “right click” key (aka the standard shift+f10 combination) when the sidebar is active.

2 Likes

#2

Hi,
I also looking for do the same…

The Ctr+0 key are useful for navigate, but you can’t…

  • select folder
  • drop folder
  • find folder (typing the name)

:pensive:

0 Likes

#3

Hi drazde, I created a plugin for this purpose. You can install it via Package Control: https://packagecontrol.io/packages/AddRemoveFolder

2 Likes

Requesting tips for a few new user woes: new windows, macros, bookmarks
#4

is it possible to run this from terminal like?
$ subl --command "prompt_folder_remove" <folder>

Update 1:
I found a way
$ subl --command "remove_folder {\"dirs\": [\"/path/to/dir\"]}"

0 Likes