How do I call/use the Vim built-in functions?

You can use the “:call” command to invoke a Vim built-in function:

    :call cursor(10,20)

You can use the “:echo” command to echo the value returned by a function:

    :echo char2nr('a')

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’.

Read free Software Algorithms and Computer Science Books by CodeAhoy Learn.

Introduction to Recursion and Backtracking

Sorting Algorithms

Introduction to C Programming Language

And More...

Speak Your Mind