mawww / kakoune

mawww's experiment for a better code editor
http://kakoune.org
The Unlicense
9.96k stars 715 forks source link

Feature request: repeat option in view menu #2637

Open vbauerster opened 5 years ago

vbauerster commented 5 years ago

View menu has four scroll items hjkl for left, down, up and right respectively. To scroll repeatedly there are two options available at the moment:

  1. pressing v[hjkl] constantly
  2. locking view menu by pressing V

Both ways not so convenient, second way introduces a kind of sub-mode, which has to be exit explicitly.

It would be nice to have repeat option for scrolling keys, because usually they are pressed repeatedly. So instead of pressing vj repeatedly, one would press v one time, then j repeatedly. Tmux has same approach in its bind-key command (flag -r) and repeat-time option, in order to avoid pressing prefix all the time.

vbauerster commented 5 years ago

Alternative approach would be make lock menu repeat-time aware. So if none of the keys declared in the lock menu is pressed within specified time, it should quit automatically without having to press esc.

lenormf commented 5 years ago

Related: #996

occivink commented 5 years ago

One easy solution is to remap the view keys to take you back to view mode, like so:

map global view h hv
map global view j jv
map global view k kv
map global view l lv

Any other keypress will exit the view mode. As for the timing thing, I think this would be possible to implement too if timers were exposed (#2337)