Thank you Maxim, this is what i've done yesterday. But it does not solve two problems :
1. first when I open $MYVIMRC and search for a word as 'import' it does not call imported that.HLNExt func, I HAVE TO SOURCE $MYVIMRC ANOTEHR TIME 2. then, when I search forward for import it blinks the word occurence searched where cursor is on, then searching backwards with N it seems to work until I attempt to search forward one more time and the blinking feature does not appear anymore. You can see it : https://drive.google.com/file/d/1q0hn3h4u05jpClaiAC_kn8DMnYrRymE9/view?usp=sharing Le jeudi 4 août 2022 à 06:52:50 UTC+2, Maxim Kim a écrit : > *> nnoremap <silent> n n*<ScriptCmd>that.HLNext(80)<CR> > > remove <silent> to see messages, also `:` is not needed. > > Also in the gif you are importing with the full path, not sure if it > matters. > > среда, 3 августа 2022 г. в 20:31:47 UTC+7, [email protected]: > >> Thank you Bram, >> >> - I added <ScriptCmd> as described. >> - Can you just look at this gif that shows that I have to source >> $MYVIMRC to take account an import vim9script, then the function that >> blink >> the searched work is working. >> >> >> >> https://drive.google.com/file/d/1l4l_7M14eHjEG_cgwCpkm6NFX_QIWYCj/view?usp=sharing >> >> Le mercredi 3 août 2022 à 12:05:05 UTC+2, N V a écrit : >> >>> Import is now successfull, what is now wrong is overloading mapping as >>> intended by D.Conway https://www.youtube.com/watch?v=aHm36-na4-4#t6m36s >>> as this : >>> >>> # Imported Functions {{{ >>> import autoload 'nvhelper.vim' as that >>> # nnoremap <F12> <ScriptCmd> that.HLNext(80)<CR> # CALL SUCCESS >>> *nnoremap <silent> n n:*<ScriptCmd> that.HLNext(80)<CR> # FAILS >>> GOTO NEXT >>> nnoremap <silent> N N:<ScriptCmd> that.HLNext(80)<CR> >>> >>> >>> >>> It seems to goto one time to item searched but don't do next jump. >>> Le mercredi 3 août 2022 à 11:51:49 UTC+2, Bram Moolenaar a écrit : >>> >>>> >>>> > 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> >>>> >>>> Use ":help import-legacy" and then go up a few lines. >>>> >>>> -- >>>> The term "free software" is defined by Richard M. Stallman as >>>> being software that isn't necessarily for free. Confusing? >>>> Let's call it "Stallman software" then! >>>> -- Bram Moolenaar >>>> >>>> /// Bram Moolenaar -- [email protected] -- 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_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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/2a722b43-5888-4482-9669-2fc612b6feban%40googlegroups.com.
