代码拉取完成,页面将自动刷新
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>pi_getscript - Vim Documentation</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim8.0">
<meta name="syntax" content="help">
<meta name="settings" content="no_pre,use_css,expand_tabs">
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="jquery.min.js" type="text/javascript"></script>
<script src="mark-current-page.js" type="text/javascript"></script>
</head>
<body>
<header>
<div class="header">
<a href="http://vim-jp.org/">vim-jp</a>
/ <a href="http://vim-jp.org/vimdoc-en/">vimdoc-en</a>
/ pi_getscript<br />
<a name="top"></a><h1>pi_getscript - Vim Documentation</h1>
<a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
<span class="CurrentLanguage">English</span>
</span>
</div>
</header>
<nav>
<dl>
<dt>BASIC</dt>
<dd><ul>
<li><a href="quickref.html">quickref</a></li>
<li><a href="sponsor.html">sponsor</a></li>
</ul></dd>
<dt>USER MANUAL</dt>
<dd><ul>
<li><a href="usr_toc.html">usr_toc</a></li>
</ul></dd>
<dt>Getting Started</dt>
<dd><ul>
<li><a href="usr_01.html">usr_01</a></li>
<li><a href="usr_02.html">usr_02</a></li>
<li><a href="usr_03.html">usr_03</a></li>
<li><a href="usr_04.html">usr_04</a></li>
<li><a href="usr_05.html">usr_05</a></li>
<li><a href="usr_06.html">usr_06</a></li>
<li><a href="usr_07.html">usr_07</a></li>
<li><a href="usr_08.html">usr_08</a></li>
<li><a href="usr_09.html">usr_09</a></li>
<li><a href="usr_10.html">usr_10</a></li>
<li><a href="usr_11.html">usr_11</a></li>
<li><a href="usr_12.html">usr_12</a></li>
</ul></dd>
<dt>Editing Effectively</dt>
<dd><ul>
<li><a href="usr_20.html">usr_20</a></li>
<li><a href="usr_21.html">usr_21</a></li>
<li><a href="usr_22.html">usr_22</a></li>
<li><a href="usr_23.html">usr_23</a></li>
<li><a href="usr_24.html">usr_24</a></li>
<li><a href="usr_25.html">usr_25</a></li>
<li><a href="usr_26.html">usr_26</a></li>
<li><a href="usr_27.html">usr_27</a></li>
<li><a href="usr_28.html">usr_28</a></li>
<li><a href="usr_29.html">usr_29</a></li>
<li><a href="usr_30.html">usr_30</a></li>
<li><a href="usr_31.html">usr_31</a></li>
<li><a href="usr_32.html">usr_32</a></li>
</ul></dd>
<dt>Tuning Vim</dt>
<dd><ul>
<li><a href="usr_40.html">usr_40</a></li>
<li><a href="usr_41.html">usr_41</a></li>
<li><a href="usr_42.html">usr_42</a></li>
<li><a href="usr_43.html">usr_43</a></li>
<li><a href="usr_44.html">usr_44</a></li>
<li><a href="usr_45.html">usr_45</a></li>
</ul></dd>
<dt>Making Vim Run</dt>
<dd><ul>
<li><a href="usr_90.html">usr_90</a></li>
</ul></dd>
<dt>General subjects</dt>
<dd><ul>
<li><a href="intro.html">intro</a></li>
<li><a href="index.html">help</a></li>
<li><a href="helphelp.html">helphelp</a></li>
<li><a href="vimindex.html">index</a></li>
<li><a href="tags.html">tags</a></li>
<li><a href="howto.html">howto</a></li>
<li><a href="tips.html">tips</a></li>
<li><a href="message.html">message</a></li>
<li><a href="quotes.html">quotes</a></li>
<li><a href="todo.html">todo</a></li>
<li><a href="debug.html">debug</a></li>
<li><a href="develop.html">develop</a></li>
<li><a href="uganda.html">uganda</a></li>
</ul></dd>
<dt>Basic editing</dt>
<dd><ul>
<li><a href="starting.html">starting</a></li>
<li><a href="editing.html">editing</a></li>
<li><a href="motion.html">motion</a></li>
<li><a href="scroll.html">scroll</a></li>
<li><a href="insert.html">insert</a></li>
<li><a href="change.html">change</a></li>
<li><a href="indent.html">indent</a></li>
<li><a href="undo.html">undo</a></li>
<li><a href="repeat.html">repeat</a></li>
<li><a href="visual.html">visual</a></li>
<li><a href="various.html">various</a></li>
<li><a href="recover.html">recover</a></li>
</ul></dd>
<dt>Advanced editing</dt>
<dd><ul>
<li><a href="cmdline.html">cmdline</a></li>
<li><a href="options.html">options</a></li>
<li><a href="pattern.html">pattern</a></li>
<li><a href="map.html">map</a></li>
<li><a href="tagsrch.html">tagsrch</a></li>
<li><a href="quickfix.html">quickfix</a></li>
<li><a href="windows.html">windows</a></li>
<li><a href="tabpage.html">tabpage</a></li>
<li><a href="syntax.html">syntax</a></li>
<li><a href="spell.html">spell</a></li>
<li><a href="diff.html">diff</a></li>
<li><a href="autocmd.html">autocmd</a></li>
<li><a href="filetype.html">filetype</a></li>
<li><a href="eval.html">eval</a></li>
<li><a href="channel.html">channel</a></li>
<li><a href="fold.html">fold</a></li>
</ul></dd>
<dt>Special issues</dt>
<dd><ul>
<li><a href="print.html">print</a></li>
<li><a href="remote.html">remote</a></li>
<li><a href="term.html">term</a></li>
<li><a href="digraph.html">digraph</a></li>
<li><a href="mbyte.html">mbyte</a></li>
<li><a href="mlang.html">mlang</a></li>
<li><a href="arabic.html">arabic</a></li>
<li><a href="farsi.html">farsi</a></li>
<li><a href="hebrew.html">hebrew</a></li>
<li><a href="russian.html">russian</a></li>
<li><a href="ft_ada.html">ft_ada</a></li>
<li><a href="ft_sql.html">ft_sql</a></li>
<li><a href="hangulin.html">hangulin</a></li>
<li><a href="rileft.html">rileft</a></li>
</ul></dd>
<dt>GUI</dt>
<dd><ul>
<li><a href="gui.html">gui</a></li>
<li><a href="gui_w32.html">gui_w32</a></li>
<li><a href="gui_x11.html">gui_x11</a></li>
</ul></dd>
<dt>Interfaces</dt>
<dd><ul>
<li><a href="if_cscop.html">if_cscop</a></li>
<li><a href="if_lua.html">if_lua</a></li>
<li><a href="if_mzsch.html">if_mzsch</a></li>
<li><a href="if_perl.html">if_perl</a></li>
<li><a href="if_pyth.html">if_pyth</a></li>
<li><a href="if_tcl.html">if_tcl</a></li>
<li><a href="if_ole.html">if_ole</a></li>
<li><a href="if_ruby.html">if_ruby</a></li>
<li><a href="debugger.html">debugger</a></li>
<li><a href="workshop.html">workshop</a></li>
<li><a href="netbeans.html">netbeans</a></li>
<li><a href="sign.html">sign</a></li>
</ul></dd>
<dt>Versions</dt>
<dd><ul>
<li><a href="vi_diff.html">vi_diff</a></li>
<li><a href="version4.html">version4</a></li>
<li><a href="version5.html">version5</a></li>
<li><a href="version6.html">version6</a></li>
<li><a href="version7.html">version7</a></li>
<li><a href="version8.html">version8</a></li>
</ul></dd>
<dt>Remarks about specific systems</dt>
<dd><ul>
<li><a href="os_390.html">os_390</a></li>
<li><a href="os_amiga.html">os_amiga</a></li>
<li><a href="os_beos.html">os_beos</a></li>
<li><a href="os_dos.html">os_dos</a></li>
<li><a href="os_mac.html">os_mac</a></li>
<li><a href="os_mint.html">os_mint</a></li>
<li><a href="os_msdos.html">os_msdos</a></li>
<li><a href="os_os2.html">os_os2</a></li>
<li><a href="os_qnx.html">os_qnx</a></li>
<li><a href="os_risc.html">os_risc</a></li>
<li><a href="os_unix.html">os_unix</a></li>
<li><a href="os_vms.html">os_vms</a></li>
<li><a href="os_win32.html">os_win32</a></li>
</ul></dd>
<dt>Standard plugins</dt>
<dd><ul>
<li><a href="pi_getscript.html">pi_getscript</a></li>
<li><a href="pi_gzip.html">pi_gzip</a></li>
<li><a href="pi_logipat.html">pi_logipat</a></li>
<li><a href="pi_netrw.html">pi_netrw</a></li>
<li><a href="pi_paren.html">pi_paren</a></li>
<li><a href="pi_tar.html">pi_tar</a></li>
<li><a href="pi_vimball.html">pi_vimball</a></li>
<li><a href="pi_zip.html">pi_zip</a></li>
</ul></dd>
<dt>Filetype plugins</dt>
<dd><ul>
<li><a href="pi_spec.html">pi_spec</a></li>
</ul></dd>
<dt>Others</dt>
<dd><ul>
<li><a href="vim_faq.html">vim_faq</a></li>
</ul></dd>
</dl>
</nav>
<article class="Vimdoc VimdocJa">
<div id='vimCodeElement'>
<a class="Constant" href="pi_getscript.html" name="pi_getscript.txt">pi_getscript.txt</a> For <span class="Identifier">Vim version 7.0.</span> Last change: 2017 Aug 01<br>
<br>
<div class="helpExample"> GETSCRIPT REFERENCE MANUAL by Charles E. Campbell</div>
<br>
Authors: Charles E. Campbell <NdrOchip@ScampbellPfamilyA.Mbiz><br>
(remove NOSPAM from the email address)<br>
<a class="Constant" href="pi_getscript.html#GetLatestVimScripts-copyright" name="GetLatestVimScripts-copyright">GetLatestVimScripts-copyright</a><br>
Copyright: (c) 2004-2012 by Charles E. Campbell <a class="Constant" href="pi_getscript.html#glvs-copyright" name="glvs-copyright">glvs-copyright</a><br>
The VIM LICENSE (see <a class="Identifier" href="uganda.html#copyright">copyright</a>) applies to the files in this<br>
package, including getscriptPlugin.vim, getscript.vim,<br>
GetLatestVimScripts.dist, and pi_getscript.txt, except use "getscript"<br>
instead of "Vim". Like anything else that's free, getscript and its<br>
associated files are provided *as is* and comes with no warranty of<br>
any kind, either expressed or implied. No guarantees of<br>
merchantability. No guarantees of suitability for any purpose. By<br>
using this plugin, you agree that in no event will the copyright<br>
holder be liable for any damages resulting from the use of this<br>
software. Use at your own risk!<br>
<br>
Getscript is a plugin that simplifies retrieval of the latest versions of the<br>
scripts that you yourself use! Typing <a class="Identifier" href="pi_getscript.html#:GLVS">:GLVS</a> will invoke getscript; it will<br>
then use the <GetLatestVimScripts.dat> (see <a class="Identifier" href="pi_getscript.html#GetLatestVimScripts_dat">GetLatestVimScripts_dat</a>) file to<br>
get the latest versions of scripts listed therein from <span class="Constant"><a href="http://vim.sf.net/">http://vim.sf.net/</a></span>.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
1. Contents <a class="Constant" href="pi_getscript.html#glvs-contents" name="glvs-contents">glvs-contents</a> <a class="Constant" href="pi_getscript.html#glvs" name="glvs">glvs</a> <a class="Constant" href="pi_getscript.html#getscript" name="getscript">getscript</a><br>
<span class="Statement"> </span><a class="Constant" href="pi_getscript.html#GetLatestVimScripts" name="GetLatestVimScripts">GetLatestVimScripts</a><br>
<br>
1. Contents........................................: <a class="Identifier" href="pi_getscript.html#glvs-contents">glvs-contents</a><br>
2. GetLatestVimScripts -- Getting Started..........: <a class="Identifier" href="pi_getscript.html#glvs-install">glvs-install</a><br>
3. GetLatestVimScripts Usage.......................: <a class="Identifier" href="pi_getscript.html#glvs-usage">glvs-usage</a><br>
4. GetLatestVimScripts Data File...................: <a class="Identifier" href="pi_getscript.html#glvs-data">glvs-data</a><br>
5. GetLatestVimScripts Friendly Plugins............: <a class="Identifier" href="pi_getscript.html#glvs-plugins">glvs-plugins</a><br>
6. GetLatestVimScripts AutoInstall.................: <a class="Identifier" href="pi_getscript.html#glvs-autoinstall">glvs-autoinstall</a><br>
7. GetLatestViMScripts Options.....................: <a class="Identifier" href="pi_getscript.html#glvs-options">glvs-options</a><br>
8. GetLatestVimScripts Algorithm...................: <a class="Identifier" href="pi_getscript.html#glvs-alg">glvs-alg</a><br>
9. GetLatestVimScripts History.....................: <a class="Identifier" href="pi_getscript.html#glvs-hist">glvs-hist</a><br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
2. GetLatestVimScripts -- Getting Started <a class="Constant" href="pi_getscript.html#getscript-start" name="getscript-start">getscript-start</a><br>
<a class="Constant" href="pi_getscript.html#getlatestvimscripts-install" name="getlatestvimscripts-install">getlatestvimscripts-install</a><br>
<br>
VERSION FROM VIM DISTRIBUTION <a class="Constant" href="pi_getscript.html#glvs-dist-install" name="glvs-dist-install">glvs-dist-install</a><br>
<br>
Vim 7.0 does not include the GetLatestVimScripts.dist file which<br>
serves as an example and a template. So, you'll need to create<br>
your own! See <a class="Identifier" href="pi_getscript.html#GetLatestVimScripts_dat">GetLatestVimScripts_dat</a>.<br>
<br>
VERSION FROM VIM SF NET <a class="Constant" href="pi_getscript.html#glvs-install" name="glvs-install">glvs-install</a><br>
<br>
<span class="Todo">NOTE</span>: The last step, that of renaming/moving the GetLatestVimScripts.dist<br>
file, is for those who have just downloaded GetLatestVimScripts.tar.bz2 for<br>
the first time.<br>
<br>
The GetLatestVimScripts.dist file serves as an example and a template for your<br>
own personal list. Feel free to remove all the scripts mentioned within it;<br>
the "important" part of it is the first two lines.<br>
<br>
Your computer needs to have wget or curl for GetLatestVimScripts to do its work.<br>
<br>
1. if compressed: gunzip getscript.vba.gz<br>
2. Unix:<br>
vim getscript.vba<br>
:so %<br>
:q<br>
cd ~/.vim/GetLatest<br>
mv GetLatestVimScripts.dist GetLatestVimScripts.dat<br>
(edit GetLatestVimScripts.dat to install your own personal<br>
list of desired plugins -- see <a class="Identifier" href="pi_getscript.html#GetLatestVimScripts_dat">GetLatestVimScripts_dat</a>)<br>
<br>
3. Windows:<br>
vim getscript.vba<br>
:so %<br>
:q<br>
cd **path-to-vimfiles**/GetLatest<br>
mv GetLatestVimScripts.dist GetLatestVimScripts.dat<br>
(edit GetLatestVimScripts.dat to install your own personal<br>
list of desired plugins -- see <a class="Identifier" href="pi_getscript.html#GetLatestVimScripts_dat">GetLatestVimScripts_dat</a>)<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
3. GetLatestVimScripts Usage <a class="Constant" href="pi_getscript.html#glvs-usage" name="glvs-usage">glvs-usage</a> <a class="Constant" href="pi_getscript.html#:GLVS" name=":GLVS">:GLVS</a><br>
<br>
Unless it has been defined elsewhere,<br>
<br>
<div class="helpExample"> :GLVS</div>
<br>
will invoke GetLatestVimScripts(). If some other plugin has defined that<br>
command, then you may type<br>
<br>
<div class="helpExample"> :GetLatestVimScripts</div>
<br>
The script will attempt to update and, if permitted, will automatically<br>
install scripts from <span class="Constant"><a href="http://vim.sourceforge.net/">http://vim.sourceforge.net/</a></span>. To do so it will peruse a<br>
file,<br>
<br>
<div class="helpExample"> .vim/GetLatest/GetLatestVimScripts.dat (unix)</div>
<br>
or<br>
<div class="helpExample"> ..wherever..\vimfiles\GetLatest\GetLatestVimScripts.dat (windows)</div>
(see <a class="Identifier" href="pi_getscript.html#glvs-data">glvs-data</a>), and examine plugins in your [.vim|vimfiles]/plugin<br>
directory (see <a class="Identifier" href="pi_getscript.html#glvs-plugins">glvs-plugins</a>).<br>
<br>
Scripts which have been downloaded will appear in the<br>
~/.vim/GetLatest (unix) or ..wherever..\vimfiles\GetLatest (windows)<br>
subdirectory. GetLatestVimScripts will attempt to automatically<br>
install them if you have the following line in your <.vimrc>:<br>
<br>
<div class="helpExample"> let g:GetLatestVimScripts_allowautoinstall=1</div>
<br>
The <GetLatestVimScripts.dat> file will be automatically be updated to<br>
reflect the latest version of script(s) so downloaded.<br>
(also see <a class="Identifier" href="pi_getscript.html#glvs-options">glvs-options</a>)<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
4. GetLatestVimScripts Data File <a class="Constant" href="pi_getscript.html#getscript-data" name="getscript-data">getscript-data</a> <a class="Constant" href="pi_getscript.html#glvs-data" name="glvs-data">glvs-data</a><br>
<span class="Statement"> </span><a class="Constant" href="pi_getscript.html#:GetLatestVimScripts_dat" name=":GetLatestVimScripts_dat">:GetLatestVimScripts_dat</a><br>
The data file <GetLatestVimScripts.dat> must have for its first two lines<br>
the following text:<br>
<br>
<div class="helpExample"> ScriptID SourceID Filename<br>
--------------------------</div>
<br>
Following those two lines are three columns; the first two are numeric<br>
followed by a text column. The GetLatest/GetLatestVimScripts.dist file<br>
contains an example of such a data file. Anything following a #... is<br>
ignored, so you may embed comments in the file.<br>
<br>
The first number on each line gives the script's ScriptID. When you're about<br>
to use a web browser to look at scripts on <span class="Constant"><a href="http://vim.sf.net/">http://vim.sf.net/</a></span>, just before you<br>
click on the script's link, you'll see a line resembling<br>
<br>
<span class="Constant"><a href="http://vim.sourceforge.net/scripts/script.php?script_id=40">http://vim.sourceforge.net/scripts/script.php?script_id=40</a></span><br>
<br>
The "40" happens to be a ScriptID that GetLatestVimScripts needs to<br>
download the associated page, and is assigned by vim.sf.net itself<br>
during initial uploading of the plugin.<br>
<br>
The second number on each line gives the script's SourceID. The SourceID<br>
records the count of uploaded scripts as determined by vim.sf.net; hence it<br>
serves to indicate "when" a script was uploaded. Setting the SourceID to 1<br>
insures that GetLatestVimScripts will assume that the script it has is<br>
out-of-date.<br>
<br>
The SourceID is extracted by GetLatestVimScripts from the script's page on<br>
vim.sf.net; whenever it is greater than the one stored in the<br>
GetLatestVimScripts.dat file, the script will be downloaded<br>
(see <a class="Identifier" href="pi_getscript.html#GetLatestVimScripts_dat">GetLatestVimScripts_dat</a>).<br>
<br>
If your script's author has included a special comment line in his/her plugin,<br>
the plugin itself will be used by GetLatestVimScripts to build your<br>
<GetLatestVimScripts.dat> file, including any dependencies on other scripts it<br>
may have. As an example, consider:<br>
<br>
<div class="helpExample"> " GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim</div>
<br>
This comment line tells getscript.vim to check vimscript #884 and that the<br>
script is automatically installable. Getscript will also use this line to<br>
help build the GetLatestVimScripts.dat file, by including a line such as:<br>
<br>
<div class="helpExample"> 884 1 :AutoInstall: AutoAlign.vim</div>
<br>
assuming that such a line isn't already in GetLatestVimScripts.dat file.<br>
See <a class="Identifier" href="pi_getscript.html#glvs-plugins">glvs-plugins</a> for more. Thus, GetLatestVimScripts thus provides a<br>
comprehensive ability to keep your plugins up-to-date!<br>
<br>
In summary:<br>
<br>
<span class="Statement"> </span>* Optionally tell getscript that it is allowed to build/append a<br>
GetLatestVimScripts.dat file based upon already installed plugins:<br>
<div class="helpExample"> let g:GetLatestVimScripts_allowautoinstall=1</div>
<br>
<span class="Statement"> </span>* A line such as<br>
<div class="helpExample"> " GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim</div>
in an already-downloaded plugin constitutes the concurrence of the<br>
plugin author that getscript may do AutoInstall. Not all plugins<br>
may be AutoInstall-able, and the plugin's author is best situated<br>
to know whether or not his/her plugin will AutoInstall properly.<br>
<br>
<span class="Statement"> </span>* A line such as<br>
<div class="helpExample"> 884 1 :AutoInstall: AutoAlign.vim</div>
in your GetLatestVimScripts.dat file constitutes your permission<br>
to getscript to do AutoInstall. AutoInstall requires both your<br>
and the plugin author's permission. See <a class="Identifier" href="pi_getscript.html#GetLatestVimScripts_dat">GetLatestVimScripts_dat</a>.<br>
<br>
<br>
<a class="Constant" href="pi_getscript.html#GetLatestVimScripts_dat" name="GetLatestVimScripts_dat">GetLatestVimScripts_dat</a><br>
As an example of a <GetLatestVimScripts.dat> file:<br>
<br>
<div class="helpExample"> ScriptID SourceID Filename<br>
--------------------------<br>
294 1 :AutoInstall: Align.vim<br>
120 2 Decho.vim<br>
40 3 DrawIt.tar.gz<br>
451 4 EasyAccents.vim<br>
195 5 engspchk.vim<br>
642 6 GetLatestVimScripts.vim<br>
489 7 Manpageview.vim</div>
<br>
<span class="Todo">Note</span>: the first two lines are required, but essentially act as comments.<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
5. GetLatestVimScripts Friendly Plugins <a class="Constant" href="pi_getscript.html#getscript-plugins" name="getscript-plugins">getscript-plugins</a> <a class="Constant" href="pi_getscript.html#glvs-plugins" name="glvs-plugins">glvs-plugins</a><br>
<br>
<span class="PreProc">(this section is for plugin authors)</span><br>
<br>
If a plugin author includes the following comment anywhere in their plugin,<br>
GetLatestVimScripts will find it and use it to automatically build the user's<br>
GetLatestVimScripts.dat files:<br>
<br>
<div class="helpExample"> src_id<br>
v<br>
" GetLatestVimScripts: ### ### yourscriptname<br>
^<br>
scriptid</div>
<br>
As an author, you should include such a line in to refer to your own script<br>
plus any additional lines describing any plugin dependencies it may have.<br>
Same format, of course!<br>
<br>
If your command is auto-installable (see <a class="Identifier" href="pi_getscript.html#glvs-autoinstall">glvs-autoinstall</a>), and most scripts<br>
are, then you may include :AutoInstall: just before "yourscriptname":<br>
<br>
<div class="helpExample"> src_id<br>
v<br>
" GetLatestVimScripts: ### ### :AutoInstall: yourscriptname<br>
^<br>
scriptid</div>
<br>
<span class="Todo">NOTE</span><span class="PreProc">: The :AutoInstall: feature requires both the plugin author's and</span><br>
<span class="PreProc">the user's permission to operate!</span><br>
<br>
GetLatestVimScripts commands for those scripts are then appended, if not<br>
already present, to the user's GetLatest/GetLatestVimScripts.dat file. It is<br>
a relatively painless way to automate the acquisition of any scripts your<br>
plugins depend upon.<br>
<br>
Now, as an author, you probably don't want GetLatestVimScripts to download<br>
your own scripts atop your own copy, thereby overwriting your not-yet-released<br>
hard work. GetLatestVimScripts provides a solution for this: put<br>
<br>
<div class="helpExample"> 0 0 yourscriptname</div>
<br>
into your <GetLatestVimScripts.dat> file and GetLatestVimScripts will skip<br>
examining the "yourscriptname" scripts for those GetLatestVimScripts comment<br>
lines. As a result, those lines won't be inadvertently installed into your<br>
<GetLatestVimScripts.dat> file and subsequently used to download your own<br>
scripts. This is especially important to do if you've included the<br>
:AutoInstall: option.<br>
<br>
Be certain to use the same "yourscriptname" in the "0 0 yourscriptname" line<br>
as you've used in your GetLatestVimScripts comment!<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
6. GetLatestVimScripts AutoInstall <a class="Constant" href="pi_getscript.html#getscript-autoinstall" name="getscript-autoinstall">getscript-autoinstall</a><br>
<a class="Constant" href="pi_getscript.html#glvs-autoinstall" name="glvs-autoinstall">glvs-autoinstall</a><br>
<br>
GetLatestVimScripts now supports "AutoInstall". Not all scripts are<br>
supportive of auto-install, as they may have special things you need to do to<br>
install them (please refer to the script's "install" directions). On the<br>
other hand, most scripts will be auto-installable.<br>
<br>
To let GetLatestVimScripts do an autoinstall, the data file's comment field<br>
should begin with (surrounding blanks are ignored):<br>
<br>
<div class="helpExample"> :AutoInstall:</div>
<br>
Both colons are needed, and it should begin the comment (yourscriptname)<br>
field.<br>
<br>
One may prevent any autoinstalling by putting the following line in your<br>
<.vimrc>:<br>
<br>
<div class="helpExample"> let g:GetLatestVimScripts_allowautoinstall= 0</div>
<br>
With :AutoInstall: enabled, as it is by default, files which end with<br>
<br>
---.tar.bz2 : decompressed & untarred in .vim/ directory<br>
---.vba.bz2 : decompressed in .vim/ directory, then vimball handles it<br>
---.vim.bz2 : decompressed & moved into .vim/plugin directory<br>
---.tar.gz : decompressed & untarred in .vim/ directory<br>
---.vba.gz : decompressed in .vim/ directory, then vimball handles it<br>
---.vim.gz : decompressed & moved into .vim/plugin directory<br>
---.vba : unzipped in .vim/ directory<br>
---.vim : moved to .vim/plugin directory<br>
---.zip : unzipped in .vim/ directory<br>
<br>
and which merely need to have their components placed by the untar/gunzip or<br>
move-to-plugin-directory process should be auto-installable. Vimballs, of<br>
course, should always be auto-installable.<br>
<br>
When is a script not auto-installable? Let me give an example:<br>
<br>
.vim/after/syntax/blockhl.vim<br>
<br>
The <blockhl.vim> script provides block highlighting for C/C++ programs; it is<br>
available at:<br>
<br>
<span class="Constant"><a href="http://vim.sourceforge.net/scripts/script.php?script_id=104">http://vim.sourceforge.net/scripts/script.php?script_id=104</a></span><br>
<br>
Currently, vim's after/syntax only supports by-filetype scripts (in<br>
blockhl.vim's case, that's after/syntax/c.vim). Hence, auto-install would<br>
possibly overwrite the current user's after/syntax/c.vim file.<br>
<br>
In my own case, I use <aftersyntax.vim> (renamed to after/syntax/c.vim) to<br>
allow a after/syntax/c/ directory:<br>
<br>
<span class="Constant"><a href="http://vim.sourceforge.net/scripts/script.php?script_id=1023">http://vim.sourceforge.net/scripts/script.php?script_id=1023</a></span><br>
<br>
The script allows multiple syntax files to exist separately in the<br>
after/syntax/c subdirectory. I can't bundle aftersyntax.vim in and build an<br>
appropriate tarball for auto-install because of the potential for the<br>
after/syntax/c.vim contained in it to overwrite a user's c.vim.<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
7. GetLatestVimScripts Options <a class="Constant" href="pi_getscript.html#glvs-options" name="glvs-options">glvs-options</a><br>
<br>
<div class="helpExample"> g:GetLatestVimScripts_wget</div>
default= "wget"<br>
This variable holds the name of the command for obtaining<br>
scripts.<br>
<br>
<div class="helpExample"> g:GetLatestVimScripts_options</div>
default= "-q -O"<br>
This variable holds the options to be used with the<br>
g:GetLatestVimScripts_wget command.<br>
<br>
<div class="helpExample"> g:GetLatestVimScripts_allowautoinstall</div>
default= 1<br>
This variable indicates whether GetLatestVimScripts is allowed<br>
to attempt to automatically install scripts. Furthermore, the<br>
plugin author has to have explicitly indicated that his/her<br>
plugin is automatically installable (via the :AutoInstall:<br>
keyword in the GetLatestVimScripts comment line).<br>
<br>
<div class="helpExample"> g:GetLatestVimScripts_autoinstalldir</div>
default= $HOME/.vim (linux)<br>
default= $HOME/vimfiles (windows)<br>
Override where :AutoInstall: scripts will be installed.<br>
Doesn't override vimball installation.<br>
<br>
<div class="helpExample"> g:GetLatestVimScripts_scriptaddr</div>
default='<span class="Constant"><a href="http://vim.sourceforge.net/script.php?script_id">http://vim.sourceforge.net/script.php?script_id</a></span>='<br>
Override this if your system needs<br>
... ='<span class="Constant"><a href="http://vim.sourceforge.net/script/script.php?script_id">http://vim.sourceforge.net/script/script.php?script_id</a></span>='<br>
<br>
<span class="PreProc">==============================================================================</span><br>
8. GetLatestVimScripts Algorithm <a class="Constant" href="pi_getscript.html#glvs-algorithm" name="glvs-algorithm">glvs-algorithm</a> <a class="Constant" href="pi_getscript.html#glvs-alg" name="glvs-alg">glvs-alg</a><br>
<br>
The Vim sourceforge page dynamically creates a page by keying off of the<br>
so-called script-id. Within the webpage of<br>
<br>
<span class="Constant"><a href="http://vim.sourceforge.net/scripts/script.php?script_id=40">http://vim.sourceforge.net/scripts/script.php?script_id=40</a></span><br>
<br>
is a line specifying the latest source-id (src_id). The source identifier<br>
numbers are always increasing, hence if the src_id is greater than the one<br>
recorded for the script in GetLatestVimScripts then it's time to download a<br>
newer copy of that script.<br>
<br>
GetLatestVimScripts will then download the script and update its internal<br>
database of script ids, source ids, and scriptnames.<br>
<br>
The AutoInstall process will:<br>
<br>
Move the file from GetLatest/ to the following directory<br>
Unix : $HOME/.vim<br>
Windows: $HOME\vimfiles<br>
if the downloaded file ends with ".bz2"<br>
bunzip2 it<br>
else if the downloaded file ends with ".gz"<br>
gunzip it<br>
if the resulting file ends with ".zip"<br>
unzip it<br>
else if the resulting file ends with ".tar"<br>
tar -oxvf it<br>
else if the resulting file ends with ".vim"<br>
move it to the plugin subdirectory<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
9. GetLatestVimScripts History <a class="Constant" href="pi_getscript.html#getscript-history" name="getscript-history">getscript-history</a> <a class="Constant" href="pi_getscript.html#glvs-hist" name="glvs-hist">glvs-hist</a> {{ "{{{" }}1<br>
<br>
v36 Apr 22, 2013 : * (glts) suggested use of plugin/**/*.vim instead of<br>
plugin/*.vim in globpath() call.<br>
* (Andy Wokula) got warning message when setting<br>
g:loaded_getscriptPlugin<br>
v35 Apr 07, 2012 : * (MengHuan Yu) pointed out that the script URL has<br>
changed (somewhat). However, it doesn't work, and<br>
the original one does (under Linux). I'll make it<br>
yet-another-option.<br>
v34 Jun 23, 2011 : * handles additional decompression options for tarballs<br>
(tgz taz tbz txz)<br>
v33 May 31, 2011 : * using fnameescape() instead of escape()<br>
* *.xz support<br>
v32 Jun 19, 2010 : * (Jan Steffens) added support for xz compression<br>
v31 Jun 29, 2008 : * (Bill McCarthy) fixed having hls enabled with getscript<br>
* (David Schaefer) the acd option interferes with vimballs<br>
Solution: bypass the acd option<br>
v30 Jun 13, 2008 : * GLVS now checks for existence of fnameescape() and will<br>
issue an error message if it is not supported<br>
v29 Jan 07, 2008 : * Bram M pointed out that cpo is a global option and that<br>
getscriptPlugin.vim was setting it but not restoring it.<br>
v28 Jan 02, 2008 : * improved shell quoting character handling, cygwin<br>
interface, register-a bypass<br>
Oct 29, 2007 * Bill McCarthy suggested a change to getscript that avoids<br>
creating pop-up windows<br>
v24 Apr 16, 2007 : * removed save&restore of the fo option during script<br>
loading<br>
v23 Nov 03, 2006 : * ignores comments (#...)<br>
<span class="Statement"> </span>* handles vimballs<br>
v22 Oct 13, 2006 : * supports automatic use of curl if wget is not<br>
available<br>
v21 May 01, 2006 : * now takes advantage of autoloading.<br>
v20 Dec 23, 2005 : * Eric Haarbauer found&fixed a bug with unzip use;<br>
unzip needs the -o flag to overwrite.<br>
v19 Nov 28, 2005 : * v18's GetLatestVimScript line accessed the wrong<br>
script! Fixed.<br>
v18 Mar 21, 2005 : * bugfix to automatic database construction<br>
<span class="Statement"> </span>* bugfix - nowrapscan caused an error<br>
(tnx to David Green for the fix)<br>
Apr 01, 2005 * if shell is bash, "mv" instead of "ren" used in<br>
:AutoInstall:s, even though its o/s is windows<br>
Apr 01, 2005 * when downloading errors occurred, GLVS was<br>
terminating early. It now just goes on to trying<br>
the next script (after trying three times to<br>
download a script description page)<br>
Apr 20, 2005 * bugfix - when a failure to download occurred,<br>
GetLatestVimScripts would stop early and claim that<br>
everything was current. Fixed.<br>
v17 Aug 25, 2004 : * g:GetLatestVimScripts_allowautoinstall, which<br>
defaults to 1, can be used to prevent all<br>
:AutoInstall:<br>
v16 Aug 25, 2004 : * made execution of bunzip2/gunzip/tar/zip silent<br>
<span class="Statement"> </span>* fixed bug with :AutoInstall: use of helptags<br>
v15 Aug 24, 2004 : * bugfix: the "0 0 comment" download prevention wasn't<br>
always preventing downloads (just usually). Fixed.<br>
v14 Aug 24, 2004 : * bugfix -- helptags was using dotvim, rather than<br>
s:dotvim. Fixed.<br>
v13 Aug 23, 2004 : * will skip downloading a file if its scriptid or srcid<br>
is zero. Useful for script authors; that way their<br>
own GetLatestVimScripts activity won't overwrite<br>
their scripts.<br>
v12 Aug 23, 2004 : * bugfix - a "return" got left in the distribution that<br>
was intended only for testing. Removed, now works.<br>
<span class="Statement"> </span>* :AutoInstall: implemented<br>
v11 Aug 20, 2004 : * GetLatestVimScripts is now a plugin:<br>
<span class="Statement"> </span>* :GetLatestVimScripts command<br>
<span class="Statement"> </span>* (runtimepath)/GetLatest/GetLatestVimScripts.dat<br>
now holds scripts that need updating<br>
v10 Apr 19, 2004 : * moved history from script to doc<br>
v9 Jan 23, 2004 : windows (win32/win16/win95) will use<br>
double quotes ("") whereas other systems will use<br>
single quotes ('') around the urls in calls via wget<br>
v8 Dec 01, 2003 : makes three tries at downloading<br>
v7 Sep 02, 2003 : added error messages if "Click on..." or "src_id="<br>
not found in downloaded webpage<br>
Uses t_ti, t_te, and rs to make progress visible<br>
v6 Aug 06, 2003 : final status messages now display summary of work<br>
( "Downloaded someqty scripts" or<br>
"Everything was current")<br>
Now GetLatestVimScripts is careful about downloading<br>
GetLatestVimScripts.vim itself!<br>
(goes to <NEW_GetLatestVimScripts.vim>)<br>
v5 Aug 04, 2003 : missing an endif near bottom<br>
v4 Jun 17, 2003 : redraw! just before each "considering" message<br>
v3 May 27, 2003 : Protects downloaded files from errant shell<br>
expansions with single quotes: '...'<br>
v2 May 14, 2003 : extracts name of item to be obtained from the<br>
script file. Uses it instead of comment field<br>
for output filename; comment is used in the<br>
"considering..." line and is now just a comment!<br>
<span class="Statement"> </span>* Fixed a bug: a string-of-numbers is not the<br>
same as a number, so I added zero to them<br>
and they became numbers. Fixes comparison.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
vim:tw=78:ts=8:ft=help:fdm=marker<br>
</div>
</article>
<footer>
<a href="#top">Return to the top</a> - <a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
<span class="CurrentLanguage">English</span>
</span>
<br />
<div style="text-align:right;">
Hosted by <a href="https://github.com/vim-jp/vimdoc-en">vimdoc-en project</a><br />
If you met any problem, please report it to <a href="https://github.com/vim-jp/vimdoc-en/issues">issue</a>.<br />
</div>
</footer>
<!--<script src="js/check-referrer.js" type="text/javascript"></script>-->
</body>
</html>
<!-- vim:set ts=8 sts=2 sw=2 tw=0 et: -->
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。