tex
tex copied to clipboard
Implement Sort mode
Right now, only a single mode is supported, which I would tentatively call Navigation.
It would be cool to have more modes, this issue is specifically for Sort mode. We could use the same keybindings as lf:
map sn :set sortby natural; set info
map ss :set sortby size; set info size
map st :set sortby time; set info time
The idea being that when in Navigation mode, pressing s transitions the program to Sort mode and awaits one of n,s,t or ESC to go back to Navigation. We could go one step further and show the appropriate column too, but that would require some thinking as the layout system is pretty basic at the moment and there's no notion of tables/columns.
Sounds like we need a state machine
On Mon, 12 Nov 2018, 21:47 Marco Sampellegrini <[email protected] wrote:
Right now, only a single mode is supported, which I would tentatively call Navigation. It would be cool to have more modes, this issue is specifically for Sort mode. We could use the same keybindings as lf:
map sn :set sortby natural; set info map ss :set sortby size; set info size map st :set sortby time; set info time
The idea being that when in Navigation mode, pressing s transitions the program to Sort mode and awaits one of n,s,t or ESC to go back to Navigation. We could go one step further and show the appropriate column too, but that would require some thinking as the layout system is pretty basic at the moment and there's no notion of tables/columns.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alpacaaa/lame-fs/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AEuoDBsk3MJXKV_oXdVBTiE0JzyzF8pQks5uudd5gaJpZM4YaXTJ .
Core.update is a state machine already, I think. We simply need to add more state to it, in this specific case a currentMode with its state would do.