Wednesday, August 3, 2022

Re: Import vim9 script as that and map that.func fails

import autoload 'nvhelper.vim' as that
# nnoremap <F12> <ScriptCmd> that.HLNext(80)<CR>          # SUCCESS
nnoremap <silent> n n:<ScriptCmd> that.HLNext(80)<CR>     # FAILS
nnoremap <silent> N n:<ScriptCmd> that.HLNext(80)<CR>

Le mercredi 3 août 2022 à 10:57:25 UTC+2, N V a écrit :
# Imported Functions {{{
import autoload 'nvhelper.vim' as that                     SUCEED
call that.HLNext(80)                                                    SUCEED
map foo :call that.HLNext(80)<CR>                          FAILS
var FooFunc = that.HLNext
map foo :call FooFunc(80)<CR>                                 FAILS

Le mercredi 3 août 2022 à 10:44:51 UTC+2, N V a écrit :
Hi,

Would import vim9 script as that. It seems to work when I directly call that.foobar.

But how to map the same call in a nnoremapping ?
Thank you
NV


# Imported Functions {{{
import './vimfiles/autoload/nvhelper.vim' as that
nnoremap n n:call that.HLNext(80)<CR>
nnoremap N N:call that.HLNext(80)<CR>

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/30fc4361-6e4f-4d6d-a78a-3c491213570bn%40googlegroups.com.

No comments: