So I have a folder open in Sublime Text 3.
This folder contains a structure like this:
src
build // I would like to hide this folder
.sass-cache // and this folder
node_modules // and this folder
task
test
In the folders pane on the left (the sidebar), I get the above folders. I would like to hide some of them from view and only see the remaining folders.
Is there a way to achieve folder hiding using a list or another file which is loaded on launch?
I was thinking something like a .gitignore file or such, which just lists folders or patterns to hide things from view.
You have to add a folder to the Sublime Text window in order to navigate via the sidebar. Go to File -> Open Folder... and select the highest directory you want to be able to navigate. Also, 'View -> Sidebar -> Show Sidebar' if it still doesn't show.
Right click on the folder and then select "Remove folder from project".
On MacOS, you can use "Project->Add Folder to Project". Or more generally, by setting "open_files_in_new_window": false (which is default true), the folder you dragged to sublime text will show in the same window.
To do so, you need to press Ctrl+K, then Ctrl+Shift+Up. You can repeat as many times as you like. Press Ctrl+K, then Ctrl+Shift+Up to open a new sub-window.
You need to set "folder_exclude_patterns"
and/or "file_exclude_patterns"
in your preferences. The defaults are as follows:
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS"],
"file_exclude_patterns": ["*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj","*.o", "*.a", "*.lib", "*.so", "*.dylib", "*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb", ".DS_Store", "*.class", "*.psd", "*.db", "*.sublime-workspace"]
Select Preferences -> Settings—User
, then add the following line:
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules", ".sass-cache", "build"]
If you are working in a project, select Project -> Edit Project
, and add the line above to the "settings"
dict. In both cases, make sure the file is valid JSON.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With