Asneeded-2 is a project mainly written in Vim Script, it's free.
Load scripts as needed
This is a mirror of http://www.vim.org/scripts/script.php?script_id=2818
Asneeded allows loading a script by the name of a command or function that the script defines. You can use :AN to load by a command; functions are loaded automatically (via FuncUndefined).
Example (this is supposed to work with the default setup):
:AN ANedit
This will source the script AsNeeded/anplus.vim (located below the 'runtimepath') which defines the :ANedit command.
Before :AN can be used, user scripts need to be scanned with :ANmakeTags to create ANtags files. These files (like normal tags files) map commands and functions to script file names. In order to find ANtags files, g:asneeded_path needs to be set up properly.
This script has the same purpose as the AsNeeded plugin created by DrChip (vimscript #915).
The ANtags file format is compatible, but paths included in file names are not recognized. In other words, each directory needs its own ANtags file.
Comparison (not to be taken too seriously...) of both scripts:
Advantages:
Left Offs:
DrChip's AsNeeded version: 17c