I'm reading vim help about the line function and here is an example I found:
:let failed = append(line('$'), "# THE END")
In my vimrc I also found line('.'). The documentation says:
line( {expr})Number line nr of cursor, last line or mark
I tried to invoke it as
:echo :call line('$')
but this printed the following error:
E121: Undefined variable: :call
E15: Invalid expression: :call line('$')
What does '.' and '$' mean here and how to invoke it correctly?
:h line()the 3rd and 4th lines describes what.and$means. – statox Sep 29 '16 at 09:44:h functions. Didn't think there were docs for each function, – user3663882 Sep 29 '16 at 10:25call; but, if you are just calling the function, then you need to usecall. So,:echo line('$')or:call line('$'), but not:echo :call line('$'). – VanLaser Sep 29 '16 at 11:28