vim-vixen icon indicating copy to clipboard operation
vim-vixen copied to clipboard

Swap keybinding J/K for next/previous tab

Open vlcinsky opened this issue 5 years ago • 5 comments

I'm opening this issue because:

  • [x] I'll report a bug
  • [ ] I'll propose a new feature

Description

Failure Information (for bugs)

Steps to Reproduce

  • Install Vim Vixen and keep default keybinding untouched.
  • Open couple of tabs.
  • Try to use J and K to move between tabs.

Problem: by default, J jumps to the right tab, K to the left. This is counter-intuitive as J is on the left and K on the right.

Fix is easy, remapping the keys in the addon, but I wonder, why it goes this way by default.

System configuration

  • Operating system: Debian Buster
  • Firefox version: 68.2.0esr (64 bits)
  • Vim-Vixen version: 0.25

vlcinsky avatar Nov 06 '19 09:11 vlcinsky

Agreed, vim bindings are all about spatial mapping. J should go left, K right. All other vim browser bindings I've used are mapped this way.

edrex avatar Nov 14 '19 17:11 edrex

J (down) and K (up) mean next and previous (not left and right) for me.

It is worth reconsidering default mapping as you said, because vimium and VimFx bind are opposite keys.

ueokande avatar Nov 17 '19 11:11 ueokande

I also think the default behavior should be switched. It's easy enough to fix though.

bergmul avatar Mar 14 '20 17:03 bergmul

As a pretty new vim user that is focusing on the vanilla keystrokes, I can understand why J would go DOWN a tab while K would go UP a tab. If I think of their physical relationship on the keyboard, yes it's confusing. However, if you instead trust your muscle memory and remember that tabs are opened top to bottom, then it's very intuitive.

More confusing would be thinking that j scrolls down while J (capital) goes to the LEFT [tab]. I'm sure you get used to it, but again as a new user who only uses vanilla keystrokes, this seemingly random associations would be confusing.

Though I will admit that h and l get almost no usage, especially with the modern web and its adaptive pages. Two keys in prime location going to waste. They would get much more use if they went left a tab and right a tab respectively.

LeonT-A avatar Aug 01 '20 17:08 LeonT-A

While swapping these bindings might make sense for people that don't use vim, it would be confusing for a vim user, just as @LeonT-A explained, so I hope it will never happen. I expect J to go forward in the list of tabs and K to go backward.

Most importantly it won't match flow of tabs in extensions that add vertical tab lists. This is natural:

vertical tab list in tree style tab

EtiamNullam avatar Jun 08 '22 18:06 EtiamNullam