Amethyst icon indicating copy to clipboard operation
Amethyst copied to clipboard

Vim keys mod# + j and mod# + k are reversed compared to vim

Open 0xR opened this issue 5 years ago • 4 comments

Describe the bug In vim j moves a line down and k moves a line up. In amethyst j moves counter clockwise, which is up, while k moves clockwise which is down.

To Reproduce Create a layout where you have 3 windows stacked on top of each other. Focus on the middle window and use the default hotkeys for focussing or moving a window.

mod1+j will move the focus to the window below and mod1+k will move the focus to the window atop. Same goes for moving the with mod2+j and mod2+k.

0xR avatar Jun 29 '20 07:06 0xR

of course you can update the hotkeys as a workaround, but sane defaults are still valuable

0xR avatar Jun 29 '20 08:06 0xR

Yeah, this drives me crazy, but there's 7 years of configurations with it the way it is and I've struggled with how to properly manage that.

ianyh avatar Jul 26 '20 01:07 ianyh

J=CCW makes perfect sense to me.

This assumes "Vi is best" (of course) and it depends on "where on the circle" our perspective starts from (the top).

Perhaps given no horizontal indication, most English readers assume "right then down". But at the end of a line it's "down, left, right" (no up). Whereas J (down) is left of K (up) on QWERTY. Granted J (down) travels up through multiple windows before typically one main window in WIDE mode.

The Sun rotates right hourly, the Moon rotates left nightly, the Stars rotate right seasonally, and except in retrograde, the Planets rotate leftward through the Zodiac as seen from the Northern hemisphere.

I'm with Vi and the Moon on this one. :)

alexgenaud avatar Jul 07 '23 10:07 alexgenaud

@0xR , @ianyh perhaps you do in fact agree with what "J" CCW should do (left from-top, down left-side, right bottom, up right-side, left from-top, ...) but not what Amethyst actually does.

#1523

J=CCW in WIDE layout should rotate leftward along the top among the main windows and rightward along the bottom among the non-main windows (but today WIDE rotates leftward through non-main).

J=CCW in TALL layout should rotate downward on the left-side among the main windows and upward on the right-side among the non-main windows (but today TALL rotates upward through main)

Likewise, when increasing the main-count:

  • if we think windows should rotate CCW: then the bottom right windows should move to the top right... or
  • if we think windows should rotate CW: then the bottom left window should move to the top left.

But in all cases, today, these behaviours are zig-zagging (Z or N shapes) rather than visually circular rotation.

alexgenaud avatar Jul 08 '23 12:07 alexgenaud