Yegappan wrote:
> On Mon, Mar 21, 2022 at 4:11 AM Bram Moolenaar <[email protected]> wrote: > > > > It's actually nice that the new :source functionality makes this easy to > > try out. > > > > It involves a little bit more typing to try out the Vim9 sample code > in the help text compared to the legacy code. > > For the legacy script examples in the help text, you can visually select > the code and run the ":'<,'>source" command. > > For the Vim9 script examples in the help text, you need to visually select > the code and run the ":vim9cmd :'<,'>source" command. The visual > selection range needs to be prefixed with "vim9cmd :". Yes, I was wondering whether we can allow using ":'<,'>vim9cmd source". Or in general, ":'<,'>cmdmod command". Since the "'<,'>" is automatically added. We probably can't do this for ranges in general. > > However, it might be that two examples overlap, since this > > file is a help file with unrelated examples. Perhaps we need a way to > > clear what the script contains? We can't use "!", it already has a > > meaning for :source. Perhaps "[range]source ++clear" ? > > I can add support for this. But this involves more typing though. Well, otherwise you might get an error. -- Luxury. We used to have to get out of the lake at three o'clock in the morning, clean the lake, eat a handful of hot gravel, go to work at the mill every day for tuppence a month, come home, and Dad would beat us around the head and neck with a broken bottle, if we were LUCKY! /// 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_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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20220321162128.F2AFD1C783D%40moolenaar.net.
