I'd like to write the following code:
function Normal(command)
execute "normal!" a:command
endfunction
call Normal("\<C-O>")
call Normal("\<C-I>")
The first call to Normal succeeds, but the second throws an error:
E471: Argument required
Indeed, you get the same error if you enter the command :norm! ^I
with the keystrokes:
:norm!SpaceCtrl-VCtrl-IEnter
I have a vague idea that the problem might be something to do with the fact that a Tab
character is whitespace, but I'd like to know more precisely what's going on.
N.B. I've already worked around the issue by adding a count "1\<C-I>"
, so this is purely out of curiosity.
:execute "normal! \<C-I>"
do the same thing as pressing<Ctrl-I>
in normal mode?{commands} cannot start with a space
also implies that{commands} cannot start with the byte 0x9
. (But it looks as though you're right that it does.)