1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-18 20:11:17 +00:00

add support for colemak style vi bindings

this allows e/n in addition to j/k (same places on the keyboard on
colemak and qwerty) to be used as arrow keys when selecting a command
from the suggested fixups.

fixes #603
This commit is contained in:
wouter bolsterlee 2017-02-08 11:59:54 +01:00
parent 28a0150e45
commit ae68bcbac1

View File

@ -12,9 +12,10 @@ def read_actions():
while True:
key = get_key()
if key in (const.KEY_UP, 'k'):
# Handle arrows, j/k (qwerty), and n/e (colemak)
if key in (const.KEY_UP, 'k', 'e'):
yield const.ACTION_PREVIOUS
elif key in (const.KEY_DOWN, 'j'):
elif key in (const.KEY_DOWN, 'j', 'n'):
yield const.ACTION_NEXT
elif key in (const.KEY_CTRL_C, 'q'):
yield const.ACTION_ABORT