slang-users mailing list

[2021 Date Index] [2021 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] Is there a braceless call syntax?


Hi,
I recall a nice thing in Vim – ability to define own «commands», which were
an interface to vimscript function that didn't require parentheses when
calling, e.g.:

MyEcho "Hi there!"

They have been quite useful to:
- create a distinct API, entry points to the script,
- allow to skip quoting around the passed in string/value, i.e.:

MyEcho HiThere !

would work perfectly fine if the command would be configured to just pass
everything following it. I've utilized this to create a custom print
command (https://github.com/vim-add-ons/vim-smart-print)

Now, when I'm working on NeoMCEdit, which has S-Lang scripting engine, I
wonder if I could maybe obtain something similar, i.e.: a paren- and
quoting-free call objects? I know the chances are low, but who knows?

-- 
Sebastian Gniazdowski

[2021 date index] [2021 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]