I tried to simulate a Miller columns layout (albeit with only 2 columns) in vifm using tree, because I believe it to be a more useful type of folder preview, as it allows to swiftly peek through the content of many folders without having to enter them.
For me it's like you enter them, but always in control of parent directory, which is counter-intuitive. Tree-like view is somewhere in between, I guess.
would it be better to implement native directory preview in vifm
It's already implemented although the purpose is different and there is no depth limit.
vifm's preview pane always displays a blank line on top, causing a shift.
Maybe this should be controlled by s
in 'tuioptions'
.
tree sorts directories alphabetically regardless of cAsE, unless its output is piped to sort -f, but still, executable files sort before folders, which is not the same order as in vifm.
Hard to work around this tree
, builtin implementation just sorts by name (in case sensitive way on *nix). It's possible to make it sort as current view at the cost of some slowdown (meta-data for each file must be queried).
Since tree is not aware of the width of vifm's preview pane (which can vary depending on the terminal size), files with long file names spill over multiple lines instead of being trimmed.
This one is easy, just set 'nowrap'
option.
Finally, there are other minor inconsistency issues, but they are not paramount right now.
Do you think that they can be resolved
Why use tree
for a single level? Wouldn't ls
be better choice? E.g.:
fileviewer .*/,*/ ls --group-directories-first --classify --color %c