Reputation: 2170
After opening Sublime Text 3, I chose to open a folder. This was a git repo, containing some folders that were static files which are cluttering up the folder list.
When I right-click on a folder, there is no 'close' option. The antonym of open is close, not delete, so I'm definitely not clicking that!
I've heard Sublime is very scriptable, is there some way I can add a close button to the right-click menu of the folder list?
edit: I just created a test directory structure: test/ test/testA/ test/testB/ test/testC/
opened the test folder from Sublime Text 3, then clicked delete from the right-click menu on testB, after clicking confirm or yes to confirm, I saw the directory WAS ACTUALLY DELETED, not deleted from Sublime's state. :(
Upvotes: 50
Views: 28285
Reputation: 6330
I'm using Sublime Text 3. Right click on the folder and then select "Remove folder from project". Guess you don't have it in the older versions.
Upvotes: 109
Reputation: 102862
If you have Package Control installed (and you definitely should!), take a look at the SideBarEnhancements
plugin. It adds a whole lot of extra functionality to the side bar, most of it accessible by the context (right-click) menu.
If you want to prevent certain folders from being viewed when you open a parent folder in the sidebar, use the "folder_exclude_patterns"
setting in your preferences. The default is
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS"],
but you could add anything you want, like "static"
, for example. If you do want to add something, make sure you copy all the values above as well if you want to continue excluding them.
Aside from that, I'm not really sure what you mean about "closing" a folder in the side bar. You can click on the little triangles to the left of the folder's name to expand or compress it, and in the context menu there's an option to Remove Folder from Project
if it's the root (highest level) one in the hierarchy. There is no way to "close" a folder in the manner you're describing (hiding it from view) in filesystem navigation programs like Windows Explorer, Finder, etc., so unfortunately I'm not sure what exactly you mean.
Upvotes: 2
Reputation: 12824
The file list shows all the contents of the folder you have opened as they are in the file system. "Close" is not an operation that applies there. You might want to "hide" some of the items, but there is no such feature AFAIK.
Upvotes: -1