> As the subject says, if I create a class that ultimately defines a mapping
> when a new instance is created, unfortunately the mapping can't access the
> "this" variable of the instance.
> 
> Is there a way to do this I'm not seeing in the documentation?

You probably need to use a closure.  That is the only way you can bind a
variable and pass the reference around.  You can find hints around
":help E1271".

Keep in mind that mappings work in the global namespace.  To access
something local to the script you can use <SID> or <ScriptCmd>.
You may first give <ScriptCmd> a try.

-- 
hundred-and-one symptoms of being an internet addict:
158. You get a tuner card so you can watch TV while surfing.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230612201811.5D3C01C0804%40moolenaar.net.

Raspunde prin e-mail lui