Asneeded 2 : Load scripts as needed
| script karma
Downloaded by 486
Comments, bugs, improvements
script versions (upload new version)
|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):
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
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:
- no creation of temporary buffers
- configurable load path (load scripts from more than one location)
- command-line completion instead of a menu
- :ANmakeTags creates tags for certain files, not for a whole directory
- :AN only loads a script if the command argument is not defined yet
- single tags can be disabled in the ANtags file to solve ambiguities
- mappings are not recognized (at least not per default)
- no "on-the-fly" mode: search for functions and commands requires an ANtags
- :AN only takes a command name as argument (not a function name)
- no creation of skeleton commands (beyond purpose)
DrChip's AsNeeded version: 17c
- Asneeded comes in a ZIP-archive, easy to inspect with your file manager.
- There is a new folder "AsNeeded".
You can now unpack (to ~\vimfiles or ~/.vim ...) and do :helptags
Yet to be tested on Unix.
Click on the package to download.
ip used for rating: 126.96.36.199