Now that we've got some amazing Find, Everything & FAYT features, some ridiculosly powerful options are open to us. Can we take it to the next level?
DOpus can highlight matched portions of names with its builtin command like this:
You already have this implemented, so maybe can we have access to this function in scripts, too? Could be something like Item.highlightColumnPortions(colName: string, textOrPortions: string | Vector, [textcolor: string[, backcolor: string]])
?
- colName would be the column name obviously, name is probably the most common target, but could be any column, if a FAYT script implements a size, date, or some metadata related query.
- string would simply highlight all matching portions of the column value, or if a Vector is given, each number pair would be a "from-length" tuple, or "from-to" if that's what you prefer. E.g. Vector(0,3,15,3) would highlight 2x 3 chars in 1st variant, or Vector(0,3,15,18) would do the same in 2nd variant, depending on your choice. Or maybe a Map with from, to or index, len keys. Whatever works for you best.
- textcolor, backcolor would change the colors; e.g. in the screenshot above, textcolor would be rgb_code_for_white, backcolor would be rgb_code_for_lime.
- any maybe some flags like bold, italic, too? It's all up to you.
This could be used in FAYT scripts, or in script-triggered search results, where the script would loop over all items and highlight portions accordingly. Since FAYT scripts in my understanding do not necessarily have to select a subset of current lister's contents and open some search results, they could do a null-selection but implement the highlighting instead. And if complex OR'ed criteria are given, the script could highlight each part in red, yellow, blue, etc. A simple command could highlight the unit portion in size column, or time portion of date-time, only file_namestem portions of location, etc. Or one could hide the size column but color the names accordingly, i.e. biggest files red, medium files yellow, small files green. This is kinda similar to filter-labels but would give far more fine-granular control.
One thing I can't estimate is the performance impact. Feel free to call this idea too far out, or suggest alternatives, or reject altogether.