New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alt+; invokes InsertEnd hooks #2699
Comments
If the whitespaces are deleted by an InsertEnd hook, it should be fine - However, there have also been some attempts to generalise the The proposed PushMode and PopMode hooks (#2513) should fix that problem, but although there's a PR (#2545), it seems to have stalled and probably needs a bit of a nudge. |
If I understood you correctly, you mean that Kakoune sets this |
The filetype plugin you're using has some hook that removes trailing whitespace. If that hook used Therefore, I expect that hook is using (there are legitimate reasons to use |
Ive found this hook in |
As a workaround for now I've added inserting a letter before |
Though when occivink/kakoune-snippets#28 will be merged, I won't be able to use this workaround with snippets, as it will replace everything to this letter on jumping. |
I wonder why it is so. Why can't |
To be clear, |
|
Nice! I've checked some filetypes and it seem towork as expected |
I need to execute some commands from mapping that will change text in current line. Those commands are kind of smart and can do different things. To execute a command from
insert
mode I need to get back to normal mode. Thankfully there is a Alt+; mapping that can be used to "escape to normal mode for a single command". So I map my command like so:Everything works so far. But if I execute this mapping on a line that only contains whitespaces, Alt+; will clear those whitespaces for me, since when we escape
insert
mode with Esc that's what happens. However I don't want to loose my whitespaces. If I enter insertmode with
no-hooks` switch (\) and then exit it with either Alt+; or Esc, whitespaces won't be deleted.Is there any way to exit to normal mode without doing any hooks or not loosing whitespaces at least?
Seems like
<a-:>
isn't mapped to anything ininsert
mode, and could be a no-hooks<a-;>
The text was updated successfully, but these errors were encountered: