mawww / kakoune

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

Command to break out of locked user-mode #2846

Open losnappas opened 5 years ago

losnappas commented 5 years ago

Hi,

is there a command/way to break out of a locked mode? Consider this workflow,

  1. Start a locked usermode
  2. do something that doesn't require breaking out
  3. do a finisher that would entail breaking out of the mode

but I can't break out. Appending <esc><esc><esc>... to the command doesn't break me out, either. So then a manual <esc> is required, but it hinders the workflow and is confusing because you'd expect to break out.

ref

andreyorst commented 5 years ago

That's something similar to what mentioned in Hydra (:exit) emacs package (which is kinda similar to user modes)

Delapouite commented 5 years ago

The hydras colors concept is actually quite cool. Thanks for sharing. But to explore this direction, we would need to be able to use markup (faces) in :info boxes: https://github.com/mawww/kakoune/issues/2552

Screwtapello commented 4 years ago

I think what happens is when you're in a locked user-mode, the mapping is executed (including however many <esc> presses it includes), and then it re-enters the locked user-mode again.

This may also be related to #3441 and #2846. I'm sure I filed an issue about making user-modes into "real" modes that show up in ModeChange hooks, but I can't find it now.

alexherbo2 commented 4 years ago

It affects me in the surround.kak plugin, where a command leaves in insert mode.