Closed JeanMertz closed 9 months ago
To clarify; <Esc>
works as expected in search mode (e.g. /
or ?
), but not in char mode (f
, F
, etc.).
I resolved it by adding the following to my custom keymap:
<Cmd>lua require('flash.plugins.char').state:hide()<Cr>
Not sure if this is the right approach (it appears so, looking at the code), but it works. Posting it here for anyone else running into this.
Same problem, but I found the root cause is that my <esc>
was mapped previously.
Work it out by appending this to my previous noremap
:
vim.api.nvim_feedkeys(vim.keycode "<esc>", "n", false)
For anyone finding this in google, LavyVim has a clever solution where it includes the escape key in the mapping, which gives flash (and any other plugin that might care) a chance to see the escape key
-- Clear search with <esc>
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and Clear hlsearch" })
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0-dev-80f75d0
Operating system/version
macOS 14.1
Describe the bug
Using
<Esc>
to disable Flash doesn't work for me, probably because I remapped my key as such:Steps To Reproduce
n/a
Expected Behavior
<Esc>
should move out of "Flash mode".Repro
No response