How do I call/use the Vim built-in functions?
You can use the “:call” command to invoke a Vim built-in function:
You can use the “:echo” command to echo the value returned by a function:
You can use the “:let” command to assign the value returned by a function to a variable:
:let a = getline('.')
To store the return value from a function into a Vim register, you can use the following command:
:let @a = system('ls')
The above command will store the output of the ‘ls’ command into the register ‘a’.