Closed mattia72 closed 1 year ago
change:
mycmd#cmd_args
to
mycmd\#cmd_args
mycmd\#cmd_args
It looks weird and quite inconvenient. Why can't you escape properly inside the command or asyncrun#run()
?
change: mycmd#cmd_args to mycmd#cmd_args
You meant probably mycmd\#cmd_func
not cmd_args
but it doesn't work either. Instead of
E107: Missing parentheses: g:mycmd\#cmd_func()
I get:
E107: Missing parentheses: g:mycmd\\#cmd_func()
Could it be a neovim issue like this: https://github.com/vim/vim/issues/6613 ? In my case, number in function name doesn't cause error.
#
has special meaning as alternate file, see :h expand
you can try asyncrun#run
function as well:
call asyncrun#run('', {'post': 'call g:mycmd#cmd_func()'}, 'my command')
It will not require escaping.
Thank you, it works 👍
call asyncrun#run('<bang>',{'post':'call g:mycmd#cmd_func()'}, mycmd#cmd_args('<f-args>'))
If I define two commands with AsyncRun like this:
And try them so:
Then I get the following error:
Verison: