GetLatestVimScripts : Keep your plugins up-to-date! (semi-automatic retrieval)
| script karma
Downloaded by 9623
Comments, bugs, improvements
script versions (upload new version)
|GetLatestVimScripts is a plugin that automates retrieval of the latest versions of the scripts that you yourself use!
* automatic up-to-date plugins
* automatic installation for cooperating plugins
* automatic constructions of GetLatestVimScripts.dat for cooperating plugins
Downloaded files are placed in the .vim/GetLatest directory (vimfiles\GetLatest). Those scripts that have an :AutoInstall: in their GetLatestVimScripts comment will be (you guessed it!) automatically installed.
GetLatestVimScripts depends on a file called GetLatest/GetLatestVimScripts.dat. This file tells GetLatestVimScripts what plugins you're interested in and want to keep up-to-date. Each line in the file has the form:
ScriptID SrcID ScriptName
ScriptID : you'll see it on the top of your browser in its "Location:" box whenever you click on the script at http://vim.sf.net/ .
SrcID : start it off with a "1"; :GetLatestVimScripts will download the file and keep this entry updated automatically
ScriptName: the name or title of the script (may have spaces, etc)
In the distribution is <GetLatestVimScripts.dist>; its an example of a <GetLatestVimScripts.dat> file. In fact, you
can rename it to <GetLatestVimScripts.dat> and use it if you wish; it contains lines telling GetLatestVimScripts
to automate retrieval of <Align.vim>, <Mines.vim>, etc. Please feel free to edit the file as you wish.
GetLatestVimScripts examines the plugins you currently have for lines that look like: (Align.vim's is shown)
" GetLatestVimScripts: 294 1 :AutoInstall: Align.vim
Plugins that have such lines enable GetLatestVimScripts to automatically build the GetLatestVimScripts.dat file
for you. The :AutoInstall: in the comment tells GetLatestVimScripts that the plugin is safe to automatically install, too.
How It Works
Vim.sf.net has a separate SrcID for every script that is uploaded. With Netscape, Mozilla, and Internet-Explorer, when you move the cursor on top of the script you'd like to download, you'll see a line resembling ...src_id=###. As new scripts and newly uploaded scripts are placed on vim.sf.net, the src_id is incremented. Hence the newer ones will have greater SrcIDs, so GetLatestVimScripts compares the SrcID in your <GetLatestVimScripts.dat> file with what vim.sf.net has; if there's a newer one, GetLatestVimScripts will "wget" it.
The GetLatestVimScripts script will modify the GetLatestVimScripts.dat file whenever it downloads a new source file to reflect the latest SrcID, too.
Semi-Automatic Script Dependency Support
GetLatestVimScripts will examine your plugins for comment lines of the form
" GetLatestVimScripts: ScriptID SrcID ScriptName
Such lines will be appropriately appended to the GetLatest/GetLatestVimScripts.dat file (if not already present) whenever :GetLatestVimScripts is invoked. Thus if your newly downloaded script has such lines in it, thereby indicating that it depends upon the presence of specific scripts, GetLatestVimScripts will keep such dependent scripts up to date, too.
ie. you'll need to have wget somewhere on your path for GetLatestVimScripts to work.
(alpha/beta version available at http://www.drchip.org/astronaut/vim/index.html#GETSCRIPT)
| (you will need an up-to-date install of vimball, vimscript#1502, although vim 7.1a or later's vimball is probably ok)
1. vim getscript.vba.gz
2. a) Unix:
3. mv GetLatestVimScripts.dist GetLatestVimScripts.dat
4. Edit GetLatestVimScripts.dat to install the plugins in which you're interested. To the extent that plugin authors have included lines such as
" GetLatestVimScripts: [scriptid] 1 [:AutoInstall:] PluginName.vim
in their plugins, GetLatestVimScripts will be able to construct the GetLatestVimScripts.dat file itself.
Click on the package to download.
ip used for rating: 184.108.40.206
||*.xz compression supported
Bug fixes: acd option bypass, fnameescape used instead of escape(), hls problem fixed
||Getscript has improved shell quote handling and avoids pop-up windows under WinXP more often
||removed save&restore of the fo option during script loading
ignores comments (#...) in GetLatestVimScripts.dat file
supports vimballs (*.vba, *.vba.gz)
||Autoinstall handles vimballs and ignores #... as comments
||* Now takes advantage of autoloading.
* Supports automatic use of curl if wget is not available.
||bugfix -- unzip needed the -o flag to overwrite
||Bugfix release: improvement to automatic downloading database construction; nowrapscan no longer throws an error; with bash, mv instead of ren is used; and downloading problems are handled better.
g:GetLatestVimScripts_autoinstall (default=1) can be used to prevent any :AutoInstall:s.
||:GLVS command made available if not already present
Made execution of bunzip2/gunzip/tar/zip silent.
bugfix: With :AutoInstall: use of helptags. Fixed!
||The newest GetLatestVimScripts is a plugin! Use :GetLatestVimScripts to get the latest versions of the scripts you're interested in. Scriptnames and ids are now in a GetLatest/GetLatestVimScripts.dat datafile. GetLatestVimScripts also examines cooperating plugins for dependencies, helps build the datafile, and keeps them up-to-date too!