Hi SirVer!

On Di, 17 Aug 2010, SirVer wrote:

> I am the developer of UltiSnips, the ultimate snippet solution for
> vim[1]. A user of mine has reported a bug [2] that is hard for me to
> fix and I am in search of inspiration on this list.
> 
> UltiSnips selects part of text by using feedkeys(). For example to
> select two lines for overwriting in insert mode, we would use
> something like
>   feedkeys("\<Esc>v2j\<c-g>")
> The user now has a langmap set, which remaps the j key and the whole
> scheme falls down. My idea was now to cache the content of the langmap
> option and restore it after the feedkeys() call. Unfortunately, the
> feedkeys() keys are not evaluated till after my script has finished
> running; at this point in time, the langmap is already restored and
> therefore the feedkeys call does not work out.
> 
> Is there a way to force the evaluation of the keyboard buffer? Or is
> there maybe a clever autocommand in which I can restore the contents
> of langmap, so that it is not set after my scripts run (so that
> feedkeys() does the right thing) but it is reset as soon as the user
> needs it.
> 
> [1] http://www.vim.org/scripts/script.php?script_id=2715
> [2] https://bugs.launchpad.net/ultisnips/+bug/501727

Have you played with the different second arguments for feedkeys?

regards,
Christian

-- 
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

Reply via email to