max397574/better-escape.nvim

Possible to use in visual mode?

Closed this issue ยท 15 comments

Hi,

I wanted to ask if it would be somehow possible to also escape out of visual mode (or other things that are "cancelled" by pressing Escape) using this plugin

And sorry if that's a stupid question ๐Ÿ˜

This isn't possible (sadly) because the whole plugin is based around InsertChar
Also you don't "type" in visual mode. So you can't get delay there and that's what this plugin wants to fix.

Thank you @max397574 for the quick reply

That's sad ๐Ÿ™

That's actually the only reason that I haven't been able to fully commit to training my fingers to replace Escape with a character sequence since I would end up needing to press Escape anyways

So, I'm gonna close this one because it's not an issue with the plugin.

Please let me know if you find an alternative or something ๐Ÿ™‚

I just use jk as visual mapping to escape
this works rly well for me

Can I see how you're doing it?

vnoremap jk

So, I'm doing vnoremap jk <esc>, and the issue is that the first j I press becomes a no-op because I think it's waiting to see what the next char is to decide what to do ๐Ÿค”

so what's exactly the problem?

The fact that the first press of j doesn't do anything? ๐Ÿ˜†

that's not because of the mapping
it works for me

Really? Maybe you have a different timeoutlen than me, I have it set to 750

then it should just do nothing for 750 ms

That's what I meant ๐Ÿ™‚

The fact that the first press of j doesn't do anything?

I'm playing around with 100 to see how it works.

Question: how do you handle "modal" things (say, telescope, fzf, etc.), do you have something similar for them?

should work there as well (if you are in insert)

The issue with fzf that I have is that it's opening a terminal buffer, so I think it needs a different mapping for that

I don't know