comparison runtime/doc/pi_getscript.txt @ 2033:de5a43c5eedc

Update documentation files.
author Bram Moolenaar <bram@zimbu.org>
date Wed, 06 Jan 2010 20:52:26 +0100
parents 5232b9862f23
children 7c8c7c95a865
comparison
equal deleted inserted replaced
2032:592032e9e167 2033:de5a43c5eedc
1 *pi_getscript.txt* For Vim version 7.2. Last change: 2008 Jun 29 1 *pi_getscript.txt* For Vim version 7.0. Last change: 2009 Oct 14
2 > 2 >
3 GETSCRIPT REFERENCE MANUAL by Charles E. Campbell, Jr. 3 GETSCRIPT REFERENCE MANUAL by Charles E. Campbell, Jr.
4 < 4 <
5 Authors: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamilyA.Mbiz> 5 Authors: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamilyA.Mbiz>
6 (remove NOSPAM from the email address) 6 (remove NOSPAM from the email address)
7 *GetLatestVimScripts-copyright* 7 *GetLatestVimScripts-copyright*
8 Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *glvs-copyright* 8 Copyright: (c) 2004-2009 by Charles E. Campbell, Jr. *glvs-copyright*
9 The VIM LICENSE applies to getscript.vim and 9 The VIM LICENSE applies to getscript.vim and
10 pi_getscript.txt (see |copyright|) except use 10 pi_getscript.txt (see |copyright|) except use
11 "getscript" instead of "Vim". No warranty, express or implied. 11 "getscript" instead of "Vim". No warranty, express or implied.
12 Use At-Your-Own-Risk. 12 Use At-Your-Own-Risk.
13 13
49 49
50 The GetLatestVimScripts.dist file serves as an example and a template for your 50 The GetLatestVimScripts.dist file serves as an example and a template for your
51 own personal list. Feel free to remove all the scripts mentioned within it; 51 own personal list. Feel free to remove all the scripts mentioned within it;
52 the "important" part of it is the first two lines. 52 the "important" part of it is the first two lines.
53 53
54 Your computer needs to have wget for GetLatestVimScripts to do its work. 54 Your computer needs to have wget or curl for GetLatestVimScripts to do its work.
55 55
56 1. if compressed: gunzip getscript.vba.gz 56 1. if compressed: gunzip getscript.vba.gz
57 2. Unix: 57 2. Unix:
58 vim getscript.vba 58 vim getscript.vba
59 :so % 59 :so %
74 74
75 75
76 ============================================================================== 76 ==============================================================================
77 3. GetLatestVimScripts Usage *glvs-usage* *:GLVS* 77 3. GetLatestVimScripts Usage *glvs-usage* *:GLVS*
78 78
79 Unless its been defined elsewhere, > 79 Unless it has been defined elsewhere, >
80 :GLVS 80 :GLVS
81 will invoke GetLatestVimScripts(). If some other plugin has defined that 81 will invoke GetLatestVimScripts(). If some other plugin has defined that
82 command, then you may type 82 command, then you may type
83 > 83 >
84 :GetLatestVimScripts 84 :GetLatestVimScripts
134 serves to indicate "when" a script was uploaded. Setting the SourceID to 1 134 serves to indicate "when" a script was uploaded. Setting the SourceID to 1
135 insures that GetLatestVimScripts will assume that the script it has is 135 insures that GetLatestVimScripts will assume that the script it has is
136 out-of-date. 136 out-of-date.
137 137
138 The SourceID is extracted by GetLatestVimScripts from the script's page on 138 The SourceID is extracted by GetLatestVimScripts from the script's page on
139 vim.sf.net; whenever its greater than the one stored in the 139 vim.sf.net; whenever it is greater than the one stored in the
140 GetLatestVimScripts.dat file, the script will be downloaded 140 GetLatestVimScripts.dat file, the script will be downloaded
141 (see |GetLatestVimScripts_dat|). 141 (see |GetLatestVimScripts_dat|).
142 142
143 If your script's author has included a special comment line in his/her plugin, 143 If your script's author has included a special comment line in his/her plugin,
144 the plugin itself will be used by GetLatestVimScripts to build your 144 the plugin itself will be used by GetLatestVimScripts to build your
174 174
175 175
176 ============================================================================== 176 ==============================================================================
177 5. GetLatestVimScripts Friendly Plugins *getscript-plugins* *glvs-plugins* 177 5. GetLatestVimScripts Friendly Plugins *getscript-plugins* *glvs-plugins*
178 178
179 (this section is for plugin authors)~
180
179 If a plugin author includes the following comment anywhere in their plugin, 181 If a plugin author includes the following comment anywhere in their plugin,
180 GetLatestVimScripts will find it and use it to automatically build the user's 182 GetLatestVimScripts will find it and use it to automatically build the user's
181 GetLatestVimScripts.dat files: 183 GetLatestVimScripts.dat files:
182 > 184 >
183 src_id 185 src_id
189 As an author, you should include such a line in to refer to your own script 191 As an author, you should include such a line in to refer to your own script
190 plus any additional lines describing any plugin dependencies it may have. 192 plus any additional lines describing any plugin dependencies it may have.
191 Same format, of course! 193 Same format, of course!
192 194
193 If your command is auto-installable (see |glvs-autoinstall|), and most scripts 195 If your command is auto-installable (see |glvs-autoinstall|), and most scripts
194 are, then you may include :AutoInstall: at the start of "yourscriptname". 196 are, then you may include :AutoInstall: just before "yourscriptname":
197 >
198 src_id
199 v
200 " GetLatestVimScripts: ### ### :AutoInstall: yourscriptname
201 ^
202 scriptid
203 <
204 NOTE: :AutoInstall: is a plugin-author option, not a GetLatestVimScripts.dat~
205 entry!~
195 206
196 GetLatestVimScripts commands for those scripts are then appended, if not 207 GetLatestVimScripts commands for those scripts are then appended, if not
197 already present, to the user's GetLatest/GetLatestVimScripts.dat file. Its a 208 already present, to the user's GetLatest/GetLatestVimScripts.dat file. It is
198 relatively painless way to automate the acquisition of any scripts your 209 a relatively painless way to automate the acquisition of any scripts your
199 plugins depend upon. 210 plugins depend upon.
200 211
201 Now, as an author, you probably don't want GetLatestVimScripts to download 212 Now, as an author, you probably don't want GetLatestVimScripts to download
202 your own scripts for you yourself, thereby overwriting your not-yet-released 213 your own scripts for you yourself, thereby overwriting your not-yet-released
203 hard work. GetLatestVimScripts provides a solution for this: put 214 hard work. GetLatestVimScripts provides a solution for this: put
288 g:GetLatestVimScripts_options 299 g:GetLatestVimScripts_options
289 < default= "-q -O" 300 < default= "-q -O"
290 This variable holds the options to be used with the 301 This variable holds the options to be used with the
291 g:GetLatestVimScripts_wget command. 302 g:GetLatestVimScripts_wget command.
292 > 303 >
293 g:getLatestVimScripts_allowautoinstall 304 g:GetLatestVimScripts_allowautoinstall
294 < default= 1 305 < default= 1
295 This variable indicates whether GetLatestVimScripts is allowed 306 This variable indicates whether GetLatestVimScripts is allowed
296 to attempt to automatically install scripts. Note that it 307 to attempt to automatically install scripts. Furthermore, the
297 doesn't understand vimballs (yet). Furthermore, the plugin 308 plugin author has to have explicitly indicated that his/her
298 author has to have explicitly indicated that his/her plugin 309 plugin is automatically installable (via the :AutoInstall:
299 is automatically installable. 310 keyword in the GetLatestVimScripts comment line).
300 311 >
312 g:GetLatestVimScripts_autoinstalldir
313 < default= $HOME/.vim (linux)
314 default= $HOME/vimfiles (windows)
315 Override where :AutoInstall: scripts will be installed.
316 Doesn't override vimball installation.
301 317
302 ============================================================================== 318 ==============================================================================
303 8. GetLatestVimScripts Algorithm *glvs-algorithm* *glvs-alg* 319 8. GetLatestVimScripts Algorithm *glvs-algorithm* *glvs-alg*
304 320
305 The Vim sourceforge page dynamically creates a page by keying off of the 321 The Vim sourceforge page dynamically creates a page by keying off of the
334 350
335 ============================================================================== 351 ==============================================================================
336 9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1 352 9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1
337 353
338 v31 Jun 29, 2008 : * (Bill McCarthy) fixed having hls enabled with getscript 354 v31 Jun 29, 2008 : * (Bill McCarthy) fixed having hls enabled with getscript
355 * (David Schaefer) the acd option interferes with vimballs
356 Solution: bypass the acd option
339 v30 Jun 13, 2008 : * GLVS now checks for existence of fnameescape() and will 357 v30 Jun 13, 2008 : * GLVS now checks for existence of fnameescape() and will
340 issue an error message if its not supported 358 issue an error message if it is not supported
341 v29 Jan 07, 2008 : * Bram M pointed out that cpo is a global option and that 359 v29 Jan 07, 2008 : * Bram M pointed out that cpo is a global option and that
342 getscriptPlugin.vim was setting it but not restoring it. 360 getscriptPlugin.vim was setting it but not restoring it.
343 v28 Jan 02, 2008 : * improved shell quoting character handling, cygwin 361 v28 Jan 02, 2008 : * improved shell quoting character handling, cygwin
344 interface, register-a bypass 362 interface, register-a bypass
345 Oct 29, 2007 * Bill McCarthy suggested a change to getscript that avoids 363 Oct 29, 2007 * Bill McCarthy suggested a change to getscript that avoids