Call a vim function from the command line

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Call a vim function from the command line

Samuel Wright
Hi All,

Is it possible to invoke a function in vim automatically?
I'd like to process a text file automatically. I *could* write an
onload for the specific file that calls a functions, saves and exists,
but it does not strike me as very elegant.

Is there anything like

vim -auto -text_file -function

That I can use for this?

Sam
Reply | Threaded
Open this post in threaded view
|

Re: Call a vim function from the command line

Thomas-4-2
> Is it possible to invoke a function in vim automatically?
> I'd like to process a text file automatically. I *could* write an
> onload for the specific file that calls a functions, saves and exists,
> but it does not strike me as very elegant.
>
> Is there anything like
>
> vim -auto -text_file -function


:h starting.txt

Something like:
vim -c "call function()" -c qa! text_file

or so?