Sublime Forum

Don't show files with certain extensions

#1

Hello

I use sublime3 for editing *.ts and *.html files in angular2 base frontend application.
Each form/raport has own dedicated subdirectory.
All this subdirectories belongs to app directory.

For each .ts file npm background daemon generate 2 more files, one ending in .js , second ends in .js.map
I have 5 .ts file in each subdirectories. So ten more file arise and I don’t need to edit them.

Is any possibility to develop one plugin to hide in app tree view (and recursive) all files ending in .js and js.map ?
Maybe this plugin can use one json file.
For example mask.json in app directory where will be specified the extensions that I want to not display in the tree view.

Thank you …
Best regards.

0 Likes

#2

no need to use a plugin - just add the *.js and *.js.map extensions to your "file_exclude_patterns" user or project preferences file

// folder_exclude_patterns and file_exclude_patterns control which files
// are listed in folders on the side bar. These can also be set on a per-
// project basis.
"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"],
3 Likes

#3

Thank you.

1 Like

#4

Note that for projects, these settings must go into the preferences of the folder you want to include. See also http://docs.sublimetext.info/en/latest/file_management/file_management.html#the-sublime-project-format.

4 Likes