When using VIM version Gentoo-8.0.1298, running
:win_getid()Will show the following error: E465: :winsize requires two number arguments. I expected a message saying either Not an editor command: win_getid() or :win_getid requires two number arguments to be displayed. I don't know if these messages make sense since I know nothing about how :win_getid() works but :winsize requires two number arguments doesn't seem very helpful to me since I didn't try calling :winsize.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
agreed, the error message can be better. Note however you are talking about a function and functions need to be called, e.g. :call win_getid() or if you want to see the result: :echo win_getid()
This happens because win_getid() is parsed as an abbreviated form of the Ex command :winsize, which here is :win, and the argument _getid(). But _getid() is not a number, and even if it was, :winsize needs 2 numbers.
In Vim9, such a confusing error would not occur for 2 reasons:
:call is no longer needed to call a function—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
In Vim9, such a confusing error would not occur for 2 reasons:
Which is why I hope at some point we'll have a 'vim9cmdline' option to let us use all the Vim9 syntaxes on the command-line. Sometimes, while developing a plugin, we need to execute a few commands on the command-line; if we're writing a plugin in Vim9 stript, it's confusing to have to use a legacy syntax.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()