On Mo, 29 Okt 2018, Bok Woon Chua wrote:
> I have an autocmd that saves the current file on InsertLeave. Using C-c in
> insert mode doesn't trigger this save (as desired), but if I use it into an
> inoremap mapping like so
>
> inoremap <C-a> <C-c>I
>
> ,it triggers InsertLeave whenever I use C-a to jump to the start of the line
> and hence saves the file.
>
> Is this intentional behavior? Is C-c supposed to avoid InsertLeave only if
> used interactively, rather than in a script?
I believe this is intentionally and expected. <c-c> does not work as
"abort" key if it comes from a mapping (or has been mapped).
Best,
Christian
--
Vertrauen wird dadurch erschöpft, daß es in Anspruch genommen wird.
-- Bertold Brecht
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.