On Tue, 14 Sep 2010, hsitz wrote:

On Sep 14, 10:40 am, "Benjamin R. Haskell" wrote:
[ . . . ]
This is an autoload function, explained in-depth at:

:help write-library-script

The short story is that the first components are path and filename components (sans '.vim') that identify the autoload path.  The last is the function name.


Ben -- Thanks very much for the info. First time I've been aware of these autoload libraries.

One strange thing, though, is that I've added a function to a ftplugin script (not in an autoload directory) and using the <filename>#<function-name> naming mechanism seems to work fine, even without capital letters and without s:.

Interesting.  Slightly odd that it's not strict about it.


I gather there's no real benefit from naming them that way, just thought it was a little odd that no error was thrown.

Yes, I don't think there's a benefit to naming them that way when outside the 'autoload/' path. And in fact a drawback is that they look like autoload-able functions, but they're not.

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to