antonmedv / walk

Terminal file manager
MIT License
3.24k stars 88 forks source link

Add vim key bindings hjkl #8

Closed kencx closed 1 year ago

kencx commented 2 years ago

Adds support for hjkl. Closes #2.

Fuzzy search mode is activated with / and deactivated with Esc. Changing directories also deactivates it.

For now, this is a breaking change. Making it configurable with export LLAMA_VIM_KEYBINDINGS=true seems to require multiple switch case statements, which is quite messy imo. Unless there is a better way?

Note: The git diff seems to have gone wonky after nesting the switch statement within an else.

antonmedv commented 2 years ago

Current mode should also be available.

antonmedv commented 2 years ago

which is quite messy imo.

So this is a challenge. Add feature and simply code.

kencx commented 2 years ago

Managed to implement configurable vim mode.

Any feedback is appreciated :)

kencx commented 2 years ago

Updated with the recent changes.

antonmedv commented 1 year ago

Done!