Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vi - ":call append()"

Tags:

vi

Where can I learn about more commands like this using the "call" command? I can't seem to be able to type relevant keywords into google.

like image 364
funk-shun Avatar asked Jan 26 '11 06:01

funk-shun


2 Answers

"call" can call any vim function. You can write your own function or use a built-in function.

To see all of the built-in functions and what they do, use

:help functions

in vim. Ctrl+] while viewing that list will toggle expanded function explanations. Use j/k as usual to scroll the list.

like image 196
Olhovsky Avatar answered Nov 16 '22 19:11

Olhovsky


You can write a Vim function to do basically anything, then call it using :call func(). The language is called vim script, it's not too difficult to learn. The vim wiki has an excellent tutorial on the matter. There's a wikibook on vim scripting as well.

So, to answer your question, the "call" command can do anything! It's whatever you program functions for.

like image 1
Rafe Kettler Avatar answered Nov 16 '22 21:11

Rafe Kettler