Sublime Forum

Sidebar filter files to include certain file types

#1

How can I

  1. Filter files in the sidebar to include certain file types? There is a file_exclude_patterns but, this would mean I have to enter hundreds and thousands of files to exclude when only I need a handful of files to be included.

  2. How can I show files first and then sub-folders for a folder displayed in sidebar?

  3. Related to tabs - How can I visually indicate using a background color or a line or an outer boundary on a tab for currently selected/active tab?

  4. When I click on a tab the sidebar is expanding and showing the file in the folder i.e., focusing the file in the folder in sidebar. How can I prevent this from happening? I don’t have the ‘focus file in sidebar’ installed.

Thanks!

0 Likes

#2

Why not use file_include_patterns ? It will only include those files whose patterns match what you have in it and exclude everything else.

Not sure what do you mean, but is View -> Sidebar -> Show Open Files something you are looking for ?

There is highlight_modified_tabs that will indicate which tabs are modified by a colored dash at the top of the tab boundary and also ST4 (specifically ST 4095) introduces inactive pane dimming, which will slightly dim out any inactive files, thus making the active tab/view stand out better. I am not sure if this can be done something from the themes side of thing.

I don’t think that’s a default behavior. It is possible you have a plugin that is revealing the file in the side bar when you switch views.

0 Likes

#3

For #1. I added file_include_patterns, but it did not work. Can you give an example? Plus, file_include_Patterns is not available in the sublime settings file.

for #2. I added a folder in sidebar. When I expand this folder I see many sub-folders and then files. How can I show the files first and then sub-folders?

for #3. it only works if I modify the contents of a tab which is when it shows a blue line on the tab. But, after I go to another tab the blue line disappears even though I return to the modified tab. This is an issue because the visual indication is not persistent and I cannot now tell which tabs have been modified and unsaved. If I save a modified/unsaved tab (file) then this color indication should disappear. The point is to see which tabs are modified and unsaved.
But, anyway what I was asking was if I select a tab then I want to change the background color and/or text color or show a boundary along the edge of tab or a colored line so I can easily see the active (currently selected) tab.

Another question: How can I double click a tab to close it?

Thanks.

0 Likes

#4

Hmm… I thought file_include_patterns would have been present as a global setting (Not sure, why). You certainly can do it on a per project basis actually https://www.sublimetext.com/docs/projects.html#folders

This is something that is possibly not user configurable.

The blue line should be still present, even if you navigate to another tab. Perhaps you have save_on_focus_lost set to true in user preferences. That would cause modified files to be saved if it loses focus (navigating to other tabs for example) and the blue indicator disappearing.

This may be possible via themes but I am not entirely sure. Someone more well versed in themes perhaps may have an answer.

Click events are possibly not recorded in the tab bar area. So I don’t think there is way to double click a tab and it closing.

0 Likes