On 2019-01-25, lacygoill wrote:

> In the meantime, I use feedkeys() with the flags in as you
> mentioned in your post, and I don't use vim-repeat, but an opfunc.
> Here's an example:
> 
> nno  <silent>  z=  :<c-u>set opfunc=<sid>my_z_equal<cr>g@l
> fu! s:my_z_equal(type) abort
>     let spell_save = &l:spell
>     try
>         setl spell
>         call feedkeys('z=', 'in')
>     catch
>     finally
>         call timer_start(0, {-> execute('let &l:spell = '.spell_save, '')})
>     endtry
> endfu
> 
> It seems to work, and the z= mapping is repeatable but I admit
> I haven't tested it that much.

This is great!  Thank you.  I've been patching all the Vims I build
with Christian's enable_spellchecking patch to get this feature, and
living without it on systems where I can't or don't want to bother
building Vim.  Now I don't need to do all that.

Do you know of a way to keep the cursor from jumping all the way to
the left as soon as the number is typed?

Regards,
Gary

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui