RFE: Add an ability to define "smarter" collapses
Problem
Collapses are a nice feature, especially for people that use specific backup patterns for files. However, all collapses need to be defined per-name in the config. This isn't really reasonable for things like backup files, where any file name could have a backup that should be nested.
Description
What I'd like to see is some way to describe a variable pattern that we could use when writing collapse rules. Maybe something like this.
- capture_pattern: \*$ # some pattern to match all files or only ones a user wants
pattern: {capture_pattern}.bak$
importance: -1
collapse:
name: {capture_pattern}
Alternatives
The only current alternative I know is to specify a separate collapse rule for each file you want to have collapsed.
Additional information
Current directory view
Desired directory view (with "smart" collapse)
I see what you mean. It seems like a good feature to support. Just to be clear, pls does support another version of collapse that's based on extensions. That works to collapse .css files into their parent .scss files or .js files into their parent .ts files. It does what you want, up to some extent.