New Columns and Sort Commands #1120
Replies: 4 comments 8 replies
-
Nice work! You moved quite quick on this :) How's the documentation on this? Getting stat output has been on my list for netman for a while, so if you have done most of the leg work in getting it visualized for neo-tree, I will almost certainly "borrow" it for the netman integration, as long as I can puzzle through how to use it :) |
Beta Was this translation helpful? Give feedback.
-
What you would need to do is to get this {
birthtime = {
sec = 1692617750
},
mtime = {
sec = 1692617750
},
size = 11453,
} That would make it just work as is. What is probably better is to change all of the component functions in This would make implementing |
Beta Was this translation helpful? Give feedback.
-
Tagging @tmummert as they were the author of the initial discussion post #1104. Does this set of features address what you envisioned? |
Beta Was this translation helpful? Give feedback.
-
I have opened the corresponding issue 1123. |
Beta Was this translation helpful? Give feedback.
-
I just released a pair of cool new features that some people will like, and some won't. Those new features are:
position=current
), it will show extra columns for Size, Type, and Last Modified. Created is available as well but disabled by default. See below for how to disable all of them.The new sort is in addition to the existing sort functionality. If you sort by name, that is the old sort rules and options. If you sort by anything else, the name sort becomes the tie breaker. The default mapping for sorting is
o
+ a letter for each choice of column. If you just hito
and pause the help sub-menu will pupup to guide you to the available choices.Performance Impact
In my tests the impact was minimal, but it's perceivable if you are showing thousands of files and directories. It does do an extra lookup for each node to get these extra stats, and of course there is much more to render on the screen.
How to Disable
To disable the newly added columns, add this to your config:
If the columns are not used, and you don't sort by one of the fields that require it, there will not be any extra file stat lookups.
Extras
To make this happen the way I wanted it to work, I also added a few new utility features that you may find of interest:
required_width
property that determines the minimum width of the window before that component is rendered.enabled
property. Ifenabled === false
it will not be rendered. The default isenabled = true
.show_help
command can now be configured to show a sub-menu, which is helpful for multi character commands. To use it, just pass a config object with atitle
andprefix_key
:Beta Was this translation helpful? Give feedback.
All reactions