typst-preview.nvim
typst-preview.nvim copied to clipboard
Using keys other than escape, like `jk` or `jj` to <Esc> always leave the first character behind
Steps to reproduce:
- Bind
jk
to esc withmap jk n j * v:count == 0 ? 'gj' : 'j'
- Open a typst document
- Type anything
- Press jk
-
j
is left behind
Hello, sorry for the late reply and thanks for pointing this out.
It seems that I can not reproduce this issue. I have ,.
imap to <Esc>
as well and have never experienced similar issue. I am not sure how are you binding jk to esc. Following the command you provided: :map jk n j * v:count == 0 ? 'gj' : 'j'
I can't seem to get jk
mapped to esc
. Do you have more details on how you're mapping jk
to <Esc>
? I am assuming your mapping it in insert mode.
The plugin that I'm using is https://github.com/max397574/better-escape.nvim
with the following config:
{
"max397574/better-escape.nvim",
opts = function(_, opts)
opts.mapping = { "jk", "jK" }
opts.timeout = 150
return opts
end
}
Exiting with <ESC> indeed doesn't reproduce this issue for me either
Hello there,
I've installed better-escape.nvim
but I still cannot reproduce your issue.
If you'd like, you can try to debug the issue yourself. One way to solve the issue could be to add more events to line 46 of lua/typst-preview/events/autocmds.lua
.
Please reopen this issue if the problem persist with the latest release