wvanlint / twf

Standalone tree view file explorer, inspired by fzf.
271 stars 11 forks source link

left and right actions - feature request #4

Closed wwalker closed 4 years ago

wwalker commented 4 years ago

twf is pretty nice. Thanks for a nice tool !

I think it would improve the user experience if these actions existed.

Of course that is my personal cognitive bias :-)

I think that "GoLeft" is just a keymapping, but, GoRight is more complex

l RightArrow (GoRight):

h LeftArrow (GoLeft):

wvanlint commented 4 years ago

Thanks for reporting and glad you like it!

The keybindings support binding one key to a sequence of commands so that one can compose simple commands into a more powerful one e.g. enter::tree:selectPath;quit. The keybindings for your proposal would something as follows when the issue below is fixed (note that tree:open only opens as opposed to tree:toggle):

twf --bind="q::quit,enter::tree:selectPath;quit,k::tree:prev,j::tree:next,o::tree:toggle,h::tree:parent,l::tree:open;tree:next"

The behavior is not yet as expected due to tree:next depending on the last render. I'll fix that and I'll also write some more documentation about all the possible commands.

Will report back when that's done, thanks again for trying it out!

wvanlint commented 4 years ago

I fixed the above issue, and added the keybindings by default. :) Let me know if it works after upgrading with go get -u github.com/wvanlint/twf/cmd/twf or brew reinstall --HEAD wvanlint/twf/twf.