On 2009-10-26, Gabor Urban wrote:
> Hi guys,
> 
> I have written an own vim file which contains some function. Let
> suppose, it is called 'myfuncs.vim'. How can I execute function
> "PrtHeading" from the file. Should I load it before, and how.

Assuming that you want to load 'myfuncs.vim' every time you run vim,
the standard way to do this is to put that file in your
~/.vim/plugin directory on Unix, or your ~/vimfiles/plugin directory
on Windows.  It will be loaded automatically every time you start
vim.

If you've just written or changed that file and you want to load it
without restarting vim, use the :source command:

    :so myfuncs.vim

or, if myfuncs.vim isn't in the current working directory,

    :so path/to/myfuncs.vim

The function has to be defined before you can execute it.  If the
function is defined in that file, sourcing that file is sufficient
to define the function.  Then you can execute it with

    :call PrtHeading()

HTH,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to