mapscii icon indicating copy to clipboard operation
mapscii copied to clipboard

vim keybinds

Open GideonWolfe opened this issue 4 years ago • 2 comments

The problem

When I open this program my hands instinctively try to adjust the map using the vim keys. This is the natural mode of navigation for countless TUI programs.

Proposed solution

h,j,k, and l are the classic left, down, up, right controls. You could keep zooming as a and z, but I would love to use J and K.

Additional context

I don't believe these keybinds would interfere with any preexisting options, and non vim users could easily stick to the arrow keys.

This also provides a framework for more keybinds. For example if you implement a search feature, the / key is already most peoples go-to and it makes the program easy to learn.

GideonWolfe avatar Mar 04 '20 19:03 GideonWolfe

I'm not sure how much work would need to be done but I just took a quick look at the source and it seems like someone already had a similar idea?

GideonWolfe avatar Mar 05 '20 00:03 GideonWolfe

HA! hjkl was my first reaction when I found this as well - looks they were added in https://github.com/rastapasta/mapscii/commit/fccacad3a24c5fc995eae2917f1d2cca91ecbb8d and work if running with npx but not in the wild :(

nahanil avatar Mar 05 '20 22:03 nahanil