Thursday, August 30, 2018

Re: Accessing mapping from rhs

On Do, 30 Aug 2018, John Passaro wrote:

> Could you implement the function and accompanying mapping as follows?
>
> imap <expr> <cr> MyFunction("cr")
> imap <expr> <Leader>n MyFunction("Leader-n")

This is the typical workaround. The idea was to be able to know in the
function which mapping triggered the call to it, without having special
arguments (which look like they contain redundant information).

Best,
Christian
--
Auch wenn es Dich empört: Das Unerlaubte Vergnügen macht Spaß.
-- Ovid (43 v.Chr.-18 n.Chr)

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment