I am trying to make something very simple, but for some reason it does not work. Command:
:m 10
moves the current line to the right below line 10 and
:echo line(".") - 2
displays the line number of the line two lines up from the cursor. After reading the documentation, I wrote this command:
:m line(".") - 2
This led to an error:
M14: Invalid address
So, I realized that functions are not evaluated unless I use the = symbol, so I tried:
:m =line(".") - 2
Which gave me the same error. To be sure that the spaces were not the cause, I tried:
:m =line(".")
Which still gives me the same error! What am I doing wrong here?
I made sure that :m accepts integers and that line() returns integers.
:echo type(5) 0 :echo type(line(".")) 0
Hubro source share