mykolaharmash / git-jump

Improved navigation between Git branches.
MIT License
199 stars 5 forks source link

Vim keybindings #6

Open zachvalenta opened 3 years ago

zachvalenta commented 3 years ago

First off, cool looking project!

Rn it seems primary navigation via arrow buttons:

Navigate the list with ↓↑ arrows and hit enter ⏎ to switch into selected branch.

How about Vim keybindings?

mykolaharmash commented 3 years ago

Hey. Thank you for the suggestion!

Do you imagine something like ctrl+j/k instead of arrows?

zachvalenta commented 3 years ago

I was thinking just j/k themselves to stay on the home row. But ctrl+j/k workable as well.

mykolaharmash commented 3 years ago

The issue with pure j/k is that it's going to clash with the search string input, so I think there is no way around some modifier key, unfortunately. ctrl would be a good candidate as some popular tools like fzf use it as well and a lot of people might be used to it already.

zachvalenta commented 3 years ago

Good point on both counts! I think broot might do the same.

mykolaharmash commented 3 years ago

I'll try to find time to work on git-jump in the next couple of weeks, hopefully, will manage to squeeze in the Vim navigation 🤞

Btw, I personally love Vim navigation and have a simple setup with Hammerspoon to use it globally in macOS. Here is my config, using it I can use CapsLock + h/j/k/l instead of arrows in any text field and any app. Tbh, I don't remember when I touched the arrow keys the last time 🙂 Just a side note, might be helpful to you as well.

zachvalenta commented 3 years ago

Whoa, very cool, I've never come across Hammerspoon before...thanks for the tip!