Any way to specify files to hide or collapse in the editor?

Hi there! Most of my projects go through a compilation step, which ends up adding a lot of clutter to the editor sidebar. It would be great if I could collapse the folder that contains the output, or provide a config file telling the editor to hide certain files. Do you have anything like this on your roadmap? Thanks!

hi rolandcrosby,

you can already hide certain files! To do that, create a file called .gitignore and put the files/directories you want to hide there. It also works with glob patterns (like: build/*).

After you finish modifying the file, wait up to 10 second for the editor to refresh and reflect the changes :slight_smile:

let us know if this fixes your issue, and happy coding!

aha! I already had .gitignore files in my projects, but it looks like Git and Glitch parsed them slightly differently. My .gitignore files specified paths like /lib/ and /dist/ in order to only match directories called lib and dist in the root of my projects. This works correctly with Git itself:

$ ls -R1
lib
src

./lib:
test.js

./src:
test.js
$ cat .gitignore
/lib/
$ git status
On branch master

Initial commit

Untracked files:
.gitignore
src/

nothing added to commit but untracked files present

But Glitch doesn’t hide these files - in Glitch it only works if I omit the preceding / from the paths in the .gitignore file.

1 Like

Thanks for reporting :slight_smile: we are aware of the fact that our .gitignore parser is not 100% accurate, and we’ll work toward a solution. Can you use the lib/ notation without the preceding /, or does it break your workflow?

Thanks again!

Oh, your solution works fine with my workflow (such as it is) - just thought I should let you know about the discrepancy. Thanks for your help!