summaryrefslogtreecommitdiffstats
path: root/runtime/autoload
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-01-06 20:54:52 +0100
committerBram Moolenaar <Bram@vim.org>2010-01-06 20:54:52 +0100
commit5c73622a9066182ee4479fd7b3aa86e1825808c3 (patch)
treec92ed672cbb989fa3585387ebd4598f5bdfcc637 /runtime/autoload
parent8f3f58f2c361f1b7241128d9821f88d8a30aa066 (diff)
Update runtime files.
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/ada.vim8
-rw-r--r--runtime/autoload/adacomplete.vim8
-rw-r--r--runtime/autoload/decada.vim8
-rw-r--r--runtime/autoload/getscript.vim273
-rw-r--r--runtime/autoload/gnat.vim8
-rw-r--r--runtime/autoload/netrw.vim1793
-rw-r--r--runtime/autoload/netrwFileHandlers.vim66
-rw-r--r--runtime/autoload/netrwSettings.vim14
-rw-r--r--runtime/autoload/rubycomplete.vim2
-rw-r--r--runtime/autoload/spellfile.vim51
-rw-r--r--runtime/autoload/sqlcomplete.vim49
-rw-r--r--runtime/autoload/tar.vim253
-rw-r--r--runtime/autoload/vimball.vim141
13 files changed, 1646 insertions, 1028 deletions
diff --git a/runtime/autoload/ada.vim b/runtime/autoload/ada.vim
index ffd0ff84cc..8f525f4866 100644
--- a/runtime/autoload/ada.vim
+++ b/runtime/autoload/ada.vim
@@ -1,15 +1,15 @@
"------------------------------------------------------------------------------
" Description: Perform Ada specific completion & tagging.
" Language: Ada (2005)
-" $Id$
+" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
" Taylor Venable <taylor@metasyntax.net>
" Neil Bird <neil@fnxweb.com>
" Ned Okie <nokie@radford.edu>
-" $Author$
-" $Date$
+" $Author: krischik $
+" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
" Version: 4.6
-" $Revision$
+" $Revision: 887 $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
" History: 24.05.2006 MK Unified Headers
" 26.05.2006 MK ' should not be in iskeyword.
diff --git a/runtime/autoload/adacomplete.vim b/runtime/autoload/adacomplete.vim
index 8db4351ffd..2659f51d5c 100644
--- a/runtime/autoload/adacomplete.vim
+++ b/runtime/autoload/adacomplete.vim
@@ -1,12 +1,12 @@
"------------------------------------------------------------------------------
" Description: Vim Ada omnicompletion file
" Language: Ada (2005)
-" $Id$
+" $Id: adacomplete.vim 887 2008-07-08 14:29:01Z krischik $
" Maintainer: Martin Krischik
-" $Author$
-" $Date$
+" $Author: krischik $
+" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
" Version: 4.6
-" $Revision$
+" $Revision: 887 $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
" History: 24.05.2006 MK Unified Headers
" 26.05.2006 MK improved search for begin of word.
diff --git a/runtime/autoload/decada.vim b/runtime/autoload/decada.vim
index fb5400e179..7741ff0572 100644
--- a/runtime/autoload/decada.vim
+++ b/runtime/autoload/decada.vim
@@ -1,13 +1,13 @@
"------------------------------------------------------------------------------
" Description: Vim Ada/Dec Ada compiler file
" Language: Ada (Dec Ada)
-" $Id$
+" $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
-" $Author$
-" $Date$
+" $Author: krischik $
+" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
" Version: 4.6
-" $Revision$
+" $Revision: 887 $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
" History: 21.07.2006 MK New Dec Ada
" 15.10.2006 MK Bram's suggestion for runtime integration
diff --git a/runtime/autoload/getscript.vim b/runtime/autoload/getscript.vim
index 5a466cb88b..6e019764f3 100644
--- a/runtime/autoload/getscript.vim
+++ b/runtime/autoload/getscript.vim
@@ -1,8 +1,8 @@
" ---------------------------------------------------------------------
" getscript.vim
" Author: Charles E. Campbell, Jr.
-" Date: Jul 10, 2008
-" Version: 31
+" Date: Dec 28, 2009
+" Version: 32
" Installing: :help glvs-install
" Usage: :help glvs
"
@@ -12,19 +12,24 @@
" Initialization: {{{1
" if you're sourcing this file, surely you can't be
" expecting vim to be in its vi-compatible mode!
+if exists("g:loaded_getscript")
+ finish
+endif
+let g:loaded_getscript= "v32"
if &cp
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
finish
endif
+if v:version < 702
+ echohl WarningMsg
+ echo "***warning*** this version of getscript needs vim 7.2"
+ echohl Normal
+ finish
+endif
let s:keepcpo = &cpo
set cpo&vim
"DechoTabOn
-if exists("g:loaded_getscript")
- finish
-endif
-let g:loaded_getscript= "v31"
-
" ---------------------------
" Global Variables: {{{1
" ---------------------------
@@ -40,25 +45,6 @@ if !exists("g:getscript_cygwin")
let g:getscript_cygwin= 0
endif
endif
-" shell quoting character {{{2
-if exists("g:netrw_shq") && !exists("g:getscript_shq")
- let g:getscript_shq= g:netrw_shq
-elseif !exists("g:getscript_shq")
- if exists("&shq") && &shq != ""
- let g:getscript_shq= &shq
- elseif exists("&sxq") && &sxq != ""
- let g:getscript_shq= &sxq
- elseif has("win32") || has("win95") || has("win64") || has("win16")
- if g:getscript_cygwin
- let g:getscript_shq= "'"
- else
- let g:getscript_shq= '"'
- endif
- else
- let g:getscript_shq= "'"
- endif
-" call Decho("g:getscript_shq<".g:getscript_shq.">")
-endif
" wget vs curl {{{2
if !exists("g:GetLatestVimScripts_wget")
@@ -112,7 +98,9 @@ if g:GetLatestVimScripts_allowautoinstall
endif
endif
- if exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim)
+ if exists("g:GetLatestVimScripts_autoinstalldir") && isdirectory(g:GetLatestVimScripts_autoinstalldir)
+ let s:autoinstall= g:GetLatestVimScripts_autoinstalldir"
+ elseif exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim)
let s:autoinstall= $HOME."/".s:dotvim
endif
" call Decho("s:autoinstall<".s:autoinstall.">")
@@ -165,7 +153,6 @@ fun! getscript#GetLatestVimScripts()
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
return
endif
-
if filewritable(datadir) != 2
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
@@ -182,21 +169,29 @@ fun! getscript#GetLatestVimScripts()
" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">")
return
endif
+ " --------------------
+ " Passed sanity checks
+ " --------------------
+
" call Decho("datadir <".datadir.">")
" call Decho("datafile <".datafile.">")
- " don't let any events interfere (like winmanager's, taglist's, etc)
- let eikeep= &ei
- let hlskeep= &hls
- set ei=all hls&vim
-
- " record current directory, change to datadir, open split window with
- " datafile
+ " don't let any event handlers interfere (like winmanager's, taglist's, etc)
+ let eikeep = &ei
+ let hlskeep = &hls
+ let acdkeep = &acd
+ set ei=all hls&vim noacd
+
+ " Edit the datafile (ie. GetLatestVimScripts.dat):
+ " 1. record current directory (origdir),
+ " 2. change directory to datadir,
+ " 3. split window
+ " 4. edit datafile
let origdir= getcwd()
" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge')))
exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
split
-" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
+" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
res 1000
let s:downloads = 0
@@ -207,69 +202,68 @@ fun! getscript#GetLatestVimScripts()
" call Decho("searching plugins for GetLatestVimScripts dependencies")
let lastline = line("$")
" call Decho("lastline#".lastline)
- let plugins = split(globpath(&rtp,"plugin/*.vim"),'\n')
+ let firstdir = substitute(&rtp,',.*$','','')
+ let plugins = split(globpath(firstdir,"plugin/*.vim"),'\n')
+ let plugins = plugins + split(globpath(firstdir,"AsNeeded/*.vim"),'\n')
let foundscript = 0
- let firstdir= ""
+ " this loop updates the GetLatestVimScripts.dat file
+ " with dependencies explicitly mentioned in the plugins
+ " via GetLatestVimScripts: ... lines
+ " It reads the plugin script at the end of the GetLatestVimScripts.dat
+ " file, examines it, and then removes it.
for plugin in plugins
+" call Decho(" ")
" call Decho("plugin<".plugin.">")
- " don't process plugins in system directories
- if firstdir == ""
- let firstdir= substitute(plugin,'[/\\][^/\\]\+$','','')
-" call Decho("setting firstdir<".firstdir.">")
- else
- let curdir= substitute(plugin,'[/\\][^/\\]\+$','','')
-" call Decho("curdir<".curdir.">")
- if curdir != firstdir
-" call Decho("skipping subsequent plugins: curdir<".curdir."> != firstdir<".firstdir.">")
- break
- endif
- endif
-
" read plugin in
" evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
$
-" call Decho(" ")
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
-" call Decho("exe silent r ".fnameescape(plugin))
+" call Decho("..exe silent r ".fnameescape(plugin))
exe "silent r ".fnameescape(plugin)
exe "silent bwipe ".bufnr("#")
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
- let newscript= substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
- let llp1 = lastline+1
-" call Decho("..newscript<".newscript.">")
-
- " don't process ""GetLatestVimScripts lines -- those that have been doubly-commented out
- if newscript !~ '^"'
- " found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
- let curline = line(".")
- let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e')
- exe llp1
- let srchline = search('\<'.noai_script.'\>','bW')
-" call Decho("..noai_script<".noai_script."> srch=".srchline."curline#".line(".")." lastline#".lastline)
-
- if srchline == 0
- " found a new script to permanently include in the datafile
- let keep_rega = @a
- let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
- exe lastline."put a"
- echomsg "Appending <".@a."> to ".datafile." for ".newscript
-" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat")
- let @a = keep_rega
- let lastline = llp1
- let curline = curline + 1
- let foundscript = foundscript + 1
-" else " Decho
-" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
- endif
-
- let curline = curline + 1
- exe curline
+ let depscript = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
+ let depscriptid = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\(\d\+\)\s\+.*$','\1','')
+ let llp1 = lastline+1
+" call Decho("..depscript<".depscript.">")
+
+ " found a "GetLatestVimScripts: # #" line in the script;
+ " check if its already in the datafile by searching backwards from llp1,
+ " the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file,
+ " for the script-id with no wrapping allowed.
+ let curline = line(".")
+ let noai_script = substitute(depscript,'\s*:AutoInstall:\s*','','e')
+ exe llp1
+ let srchline = search('^\s*'.depscriptid.'\s\+\d\+\s\+.*$','bW')
+ if srchline == 0
+ " this second search is taken when, for example, a 0 0 scriptname is to be skipped over
+ let srchline= search('\<'.noai_script.'\>','bW')
+ endif
+" call Decho("..noai_script<".noai_script."> depscriptid#".depscriptid." srchline#".srchline." curline#".line(".")." lastline#".lastline)
+
+ if srchline == 0
+ " found a new script to permanently include in the datafile
+ let keep_rega = @a
+ let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
+ echomsg "Appending <".@a."> to ".datafile." for ".depscript
+" call Decho("..Appending <".@a."> to ".datafile." for ".depscript)
+ exe lastline."put a"
+ let @a = keep_rega
+ let lastline = llp1
+ let curline = curline + 1
+ let foundscript = foundscript + 1
+" else " Decho
+" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
endif
+
+ let curline = curline + 1
+ exe curline
endwhile
+ " llp1: last line plus one
let llp1= lastline + 1
" call Decho(".deleting lines: ".llp1.",$d")
exe "silent! ".llp1.",$d"
@@ -282,7 +276,9 @@ fun! getscript#GetLatestVimScripts()
setlocal nomod
endif
+ " --------------------------------------------------------------------
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
+ " --------------------------------------------------------------------
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
setlocal lz
1
@@ -322,8 +318,9 @@ fun! getscript#GetLatestVimScripts()
" restore events and current directory
exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
- let &ei= eikeep
- let &hls= hlskeep
+ let &ei = eikeep
+ let &hls = hlskeep
+ let &acd = acdkeep
setlocal nolz
" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
@@ -333,7 +330,7 @@ endfun
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
" on the current line, interpreting two numbers and text as
" ScriptID, SourceID, and Filename.
-" It downloads any scripts that have newer versions from vim.sf.net.
+" It downloads any scripts that have newer versions from vim.sourceforge.net.
fun! s:GetOneScript(...)
" call Dfunc("GetOneScript()")
@@ -391,6 +388,7 @@ fun! s:GetOneScript(...)
" call Decho("fname <".fname.">")
endif
+ " plugin author protection from downloading his/her own scripts atop their latest work
if scriptid == 0 || srcid == 0
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
let @a= rega
@@ -416,21 +414,21 @@ fun! s:GetOneScript(...)
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
- " grab a copy of the plugin's vim.sf.net webpage
- let scriptaddr = 'http://vim.sf.net/script.php?script_id='.scriptid
+ " grab a copy of the plugin's vim.sourceforge.net webpage
+ let scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='.scriptid
let tmpfile = tempname()
let v:errmsg = ""
" make up to three tries at downloading the description
let itry= 1
while itry <= 3
-" call Decho("try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
+" call Decho(".try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
if has("win32") || has("win16") || has("win95")
-" call Decho("new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile).' '.s:Escape(scriptaddr)."|bw!")
- new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile).' '.s:Escape(scriptaddr)|bw!
+" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)."|bw!")
+ new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)|bw!
else
-" call Decho("exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile)." ".s:Escape(scriptaddr))
- exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile)." ".s:Escape(scriptaddr)
+" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr))
+ exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr)
endif
if itry == 1
exe "silent vsplit ".fnameescape(tmpfile)
@@ -495,8 +493,7 @@ fun! s:GetOneScript(...)
let latestsrcid = latestsrcid + 0
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
- " has the plugin's most-recent srcid increased, which indicates
- " that it has been updated
+ " has the plugin's most-recent srcid increased, which indicates that it has been updated
if latestsrcid > srcid
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
@@ -506,65 +503,103 @@ fun! s:GetOneScript(...)
let sname= "NEW_".sname
endif
+ " -----------------------------------------------------------------------------
" the plugin has been updated since we last obtained it, so download a new copy
-" call Decho("...downloading new <".sname.">")
- echomsg "...downloading new <".sname.">"
+ " -----------------------------------------------------------------------------
+" call Decho(".downloading new <".sname.">")
+ echomsg ".downloading new <".sname.">"
if has("win32") || has("win16") || has("win95")
-" call Decho("new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid)."|q")
- new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid)|q
+" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)."|q")
+ new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)|q
else
-" call Decho("exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='))
- exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id=').latestsrcid
+" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='))
+ exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id=').latestsrcid
endif
+ " --------------------------------------------------------------------------
" AutoInstall: only if doautoinstall has been requested by the plugin itself
+ " --------------------------------------------------------------------------
if doautoinstall
-" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
+" call Decho(" ")
+" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
if filereadable(sname)
-" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall))
- exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall)
+" call Decho("<".sname."> is readable")
+" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
+ exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
let installdir= curdir."/Installed"
if !isdirectory(installdir)
call mkdir(installdir)
endif
-" call Decho("exe cd ".fnameescape(s:autoinstall))
+" call Decho("curdir<".curdir."> installdir<".installdir.">")
+" call Decho("exe cd ".fnameescape(s:autoinstall))
exe "cd ".fnameescape(s:autoinstall)
+
+ " determine target directory for moves
+ let firstdir= substitute(&rtp,',.*$','','')
+ let pname = substitute(sname,'\..*','.vim','')
+" call Decho("determine tgtdir: is <".firstdir.'/AsNeeded/'.pname." readable?")
+ if filereadable(firstdir.'/AsNeeded/'.pname)
+ let tgtdir= "AsNeeded"
+ else
+ let tgtdir= "plugin"
+ endif
+" call Decho("tgtdir<".tgtdir."> pname<".pname.">")
" decompress
if sname =~ '\.bz2$'
" call Decho("decompress: attempt to bunzip2 ".sname)
- exe "silent !bunzip2 ".s:Escape(sname)
+ exe "silent !bunzip2 ".shellescape(sname)
let sname= substitute(sname,'\.bz2$','','')
" call Decho("decompress: new sname<".sname."> after bunzip2")
elseif sname =~ '\.gz$'
" call Decho("decompress: attempt to gunzip ".sname)
- exe "silent !gunzip ".s:Escape(sname)
+ exe "silent !gunzip ".shellescape(sname)
let sname= substitute(sname,'\.gz$','','')
" call Decho("decompress: new sname<".sname."> after gunzip")
+ else
+" call Decho("no decompression needed")
endif
" distribute archive(.zip, .tar, .vba) contents
if sname =~ '\.zip$'
" call Decho("dearchive: attempt to unzip ".sname)
- exe "silent !unzip -o ".s:Escape(sname)
+ exe "silent !unzip -o ".shellescape(sname)
elseif sname =~ '\.tar$'
" call Decho("dearchive: attempt to untar ".sname)
- exe "silent !tar -xvf ".s:Escape(sname)
+ exe "silent !tar -xvf ".shellescape(sname)
elseif sname =~ '\.vba$'
" call Decho("dearchive: attempt to handle a vimball: ".sname)
silent 1split
+ if exists("g:vimball_home")
+ let oldvimballhome= g:vimball_home
+ endif
+ let g:vimball_home= s:autoinstall
exe "silent e ".fnameescape(sname)
silent so %
silent q
+ if exists("oldvimballhome")
+ let g:vimball_home= oldvimballhome
+ else
+ unlet g:vimball_home
+ endif
+ else
+" call Decho("no dearchiving needed")
endif
+ " ---------------------------------------------
+ " move plugin to plugin/ or AsNeeded/ directory
+ " ---------------------------------------------
if sname =~ '.vim$'
-" call Decho("dearchive: attempt to simply move ".sname." to plugin")
- exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." plugin"
+" call Decho("dearchive: attempt to simply move ".sname." to ".tgtdir)
+ exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".tgtdir
else
" call Decho("dearchive: move <".sname."> to installdir<".installdir.">")
- exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".installdir
+ exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".installdir
+ endif
+ if tgtdir != "plugin"
+" call Decho("exe silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir)
+ exe "silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir
endif
" helptags step
@@ -600,20 +635,6 @@ fun! s:GetOneScript(...)
endfun
" ---------------------------------------------------------------------
-" s:Escape: makes a string safe&suitable for the shell {{{2
-fun! s:Escape(name)
-" call Dfunc("s:Escape(name<".a:name.">)")
- if exists("*shellescape")
- " shellescape() was added by patch 7.0.111
- let name= shellescape(a:name)
- else
- let name= g:getscript_shq . a:name . g:getscript_shq
- endif
-" call Dret("s:Escape ".name)
- return name
-endfun
-
-" ---------------------------------------------------------------------
" Restore Options: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
diff --git a/runtime/autoload/gnat.vim b/runtime/autoload/gnat.vim
index cebde8e1a4..0def6723b2 100644
--- a/runtime/autoload/gnat.vim
+++ b/runtime/autoload/gnat.vim
@@ -1,14 +1,14 @@
"------------------------------------------------------------------------------
" Description: Vim Ada/GNAT compiler file
" Language: Ada (GNAT)
-" $Id$
+" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
" Ned Okie <nokie@radford.edu>
-" $Author$
-" $Date$
+" $Author: krischik $
+" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
" Version: 4.6
-" $Revision$
+" $Revision: 887 $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
" History: 24.05.2006 MK Unified Headers
" 16.07.2006 MK Ada-Mode as vim-ball
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 1e181d05d1..dff8afd859 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,10 +1,10 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
-" Date: Aug 08, 2008
-" Version: 132
+" Date: Dec 28, 2009
+" Version: 136
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
-" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
+" Copyright: Copyright (C) 1999-2009 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
@@ -22,12 +22,18 @@
if &cp || exists("g:loaded_netrw")
finish
endif
+let g:loaded_netrw = "v136"
+if v:version < 702
+ echohl WarningMsg
+ echo "***warning*** this version of netrw needs vim 7.2"
+ echohl Normal
+ finish
+endif
if !exists("s:NOTE")
let s:NOTE = 0
let s:WARNING = 1
let s:ERROR = 2
endif
-let g:loaded_netrw = "v132"
" sanity checks
if v:version < 700
@@ -45,25 +51,41 @@ setlocal cpo&vim
" ======================
" ---------------------------------------------------------------------
+" NetrwInit: initializes variables if they haven't been defined {{{2
+" Loosely, varname = value.
+fun s:NetrwInit(varname,value)
+ if !exists(a:varname)
+ if type(a:value) == 0
+ exe "let ".a:varname."=".a:value
+ elseif type(a:value) == 1
+ exe "let ".a:varname."="."'".a:value."'"
+ else
+ exe "let ".a:varname."=".a:value
+ endif
+ endif
+endfun
+
+" ---------------------------------------------------------------------
" Netrw Constants: {{{2
-if !exists("g:NETRW_BOOKMARKMAX")
- let g:NETRW_BOOKMARKMAX= 0
-endif
-if !exists("g:NETRW_DIRHIST_CNT")
- let g:NETRW_DIRHIST_CNT= 0
-endif
+call s:NetrwInit("g:netrw_dirhist_cnt",0)
if !exists("s:LONGLIST")
- let s:THINLIST = 0
- let s:LONGLIST = 1
- let s:WIDELIST = 2
- let s:TREELIST = 3
- let s:MAXLIST = 4
+ call s:NetrwInit("s:THINLIST",0)
+ call s:NetrwInit("s:LONGLIST",1)
+ call s:NetrwInit("s:WIDELIST",2)
+ call s:NetrwInit("s:TREELIST",3)
+ call s:NetrwInit("s:MAXLIST" ,4)
endif
" ---------------------------------------------------------------------
" Default values for netrw's global protocol variables {{{2
if !exists("g:netrw_dav_cmd")
+ if executable("cadaver")
let g:netrw_dav_cmd = "cadaver"
+ elseif executable("curl")
+ let g:netrw_dav_cmd = "curl"
+ else
+ let g:netrw_dav_cmd = ""
+ endif
endif
if !exists("g:netrw_fetch_cmd")
if executable("fetch")
@@ -78,35 +100,28 @@ endif
if !exists("g:netrw_http_cmd")
if executable("elinks")
let g:netrw_http_cmd = "elinks"
- let g:netrw_http_xcmd= "-dump >"
+ call s:NetrwInit("g:netrw_http_xcmd","-source >")
elseif executable("links")
let g:netrw_http_cmd = "links"
- let g:netrw_http_xcmd= "-dump >"
+ call s:NetrwInit("g:netrw_http_xcmd","-source >")
elseif executable("curl")
- let g:netrw_http_cmd = "curl -o"
+ let g:netrw_http_cmd = "curl"
+ call s:NetrwInit("g:netrw_http_xcmd","-o")
elseif executable("wget")
- let g:netrw_http_cmd = "wget -q -O"
+ let g:netrw_http_cmd = "wget"
+ call s:NetrwInit("g:netrw_http_xcmd","-q -O")
elseif executable("fetch")
- let g:netrw_http_cmd = "fetch -o"
+ let g:netrw_http_cmd = "fetch"
+ call s:NetrwInit("g:netrw_http_xcmd","-o")
else
let g:netrw_http_cmd = ""
endif
endif
-if !exists("g:netrw_rcp_cmd")
- let g:netrw_rcp_cmd = "rcp"
-endif
-if !exists("g:netrw_rsync_cmd")
- let g:netrw_rsync_cmd = "rsync"
-endif
-if !exists("g:netrw_scp_cmd")
- let g:netrw_scp_cmd = "scp -q"
-endif
-if !exists("g:netrw_sftp_cmd")
- let g:netrw_sftp_cmd = "sftp"
-endif
-if !exists("g:netrw_ssh_cmd")
- let g:netrw_ssh_cmd= "ssh"
-endif
+call s:NetrwInit("g:netrw_rcp_cmd" , "rcp")
+call s:NetrwInit("g:netrw_rsync_cmd", "rsync")
+call s:NetrwInit("g:netrw_scp_cmd" , "scp -q")
+call s:NetrwInit("g:netrw_sftp_cmd" , "sftp")
+call s:NetrwInit("g:netrw_ssh_cmd" , "ssh")
if (has("win32") || has("win95") || has("win64") || has("win16"))
\ && exists("g:netrw_use_nt_rcp")
@@ -134,40 +149,24 @@ if !exists("g:netrw_cygwin")
endif
endif
" Default values - a-c ---------- {{{3
-if !exists("g:netrw_alto")
- let g:netrw_alto= &sb
-endif
-if !exists("g:netrw_altv")
- let g:netrw_altv= &spr
-endif
-if !exists("g:netrw_browse_split")
- let g:netrw_browse_split= 0
-endif
-if !exists("g:netrw_chgwin")
- let g:netrw_chgwin = -1
-endif
-if !exists("g:netrw_compress")
- let g:netrw_compress= "gzip"
-endif
-if !exists("g:netrw_ctags")
- let g:netrw_ctags= "ctags"
+call s:NetrwInit("g:netrw_alto" , &sb)
+call s:NetrwInit("g:netrw_altv" , &spr)
+call s:NetrwInit("g:netrw_banner" , 1)
+call s:NetrwInit("g:netrw_browse_split", 0)
+call s:NetrwInit("g:netrw_chgwin" , -1)
+call s:NetrwInit("g:netrw_compress" , "gzip")
+call s:NetrwInit("g:netrw_ctags" , "ctags")
+if !exists("g:netrw_cursorline")
+ let g:netrw_cursorline= 1
+ let s:netrw_usercul = &cursorline
+ let s:netrw_usercuc = &cursorcolumn
endif
" Default values - d-g ---------- {{{3
-if !exists("g:NETRW_DIRHIST_CNT")
- let g:NETRW_DIRHIST_CNT= 0
-endif
-if !exists("g:netrw_decompress")
- let g:netrw_decompress= { ".gz" : "gunzip" , ".bz2" : "bunzip2" , ".zip" : "unzip" , ".tar" : "tar -xf"}
-endif
-if !exists("g:netrw_dirhistmax")
- let g:netrw_dirhistmax= 10
-endif
-if !exists("g:netrw_fastbrowse")
- let g:netrw_fastbrowse= 1
-endif
-if !exists("g:netrw_ftp_browse_reject")
- let g:netrw_ftp_browse_reject='^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$'
-endif
+call s:NetrwInit("g:netrw_dirhist_cnt" , 0)
+call s:NetrwInit("g:netrw_decompress" , '{ ".gz" : "gunzip", ".bz2" : "bunzip2", ".zip" : "unzip", ".tar" : "tar -xf"}')
+call s:NetrwInit("g:netrw_dirhistmax" , 10)
+call s:NetrwInit("g:netrw_fastbrowse" , 1)
+call s:NetrwInit("g:netrw_ftp_browse_reject", '^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$')
if !exists("g:netrw_ftp_list_cmd")
if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)
let g:netrw_ftp_list_cmd = "ls -lF"
@@ -179,13 +178,9 @@ if !exists("g:netrw_ftp_list_cmd")
let g:netrw_ftp_sizelist_cmd = "dir"
endif
endif
-if !exists("g:netrw_ftpmode")
- let g:netrw_ftpmode= "binary"
-endif
+call s:NetrwInit("g:netrw_ftpmode",'binary')
" Default values - h-lh ---------- {{{3
-if !exists("g:netrw_hide")
- let g:netrw_hide= 1
-endif
+call s:NetrwInit("g:netrw_hide",1)
if !exists("g:netrw_ignorenetrc")
if &shell =~ '\c\<\%(cmd\|4nt\)\.exe$'
let g:netrw_ignorenetrc= 1
@@ -193,9 +188,7 @@ if !exists("g:netrw_ignorenetrc")
let g:netrw_ignorenetrc= 0
endif
endif
-if !exists("g:netrw_keepdir")
- let g:netrw_keepdir= 1
-endif
+call s:NetrwInit("g:netrw_keepdir",1)
if !exists("g:netrw_list_cmd")
if g:netrw_scp_cmd =~ '^pscp' && executable("pscp")
" provide a 'pscp' listing command
@@ -211,9 +204,7 @@ if !exists("g:netrw_list_cmd")
let g:netrw_list_cmd= ""
endif
endif
-if !exists("g:netrw_list_hide")
- let g:netrw_list_hide= ""
-endif
+call s:NetrwInit("g:netrw_list_hide","")
" Default values - lh-lz ---------- {{{3
if !exists("g:netrw_localcopycmd")
if has("win32") || has("win95") || has("win64") || has("win16")
@@ -228,9 +219,7 @@ if !exists("g:netrw_localcopycmd")
let g:netrw_localcopycmd= ""
endif
endif
-if !exists("g:netrw_local_mkdir")
- let g:netrw_local_mkdir= "mkdir"
-endif
+call s:NetrwInit("g:netrw_local_mkdir","mkdir")
if !exists("g:netrw_localmovecmd")
if has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
@@ -244,128 +233,66 @@ if !exists("g:netrw_localmovecmd")
let g:netrw_localmovecmd= ""
endif
endif
-if !exists("g:netrw_local_rmdir")
- let g:netrw_local_rmdir= "rmdir"
-endif
-if !exists("g:netrw_liststyle")
- let g:netrw_liststyle= s:THINLIST
-endif
+call s:NetrwInit("g:netrw_local_rmdir", "rmdir")
+call s:NetrwInit("g:netrw_liststyle" , s:THINLIST)
+" sanity checks
if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST
- " sanity check
let g:netrw_liststyle= s:THINLIST
endif
if g:netrw_liststyle == s:LONGLIST && g:netrw_scp_cmd !~ '^pscp'
let g:netrw_list_cmd= g:netrw_list_cmd." -l"
endif
" Default values - m-r ---------- {{{3
-if !exists("g:netrw_markfileesc")
- let g:netrw_markfileesc= '*./[\~'
-endif
-if !exists("g:netrw_maxfilenamelen")
- let g:netrw_maxfilenamelen= 32
-endif
-if !exists("g:netrw_menu")
- let g:netrw_menu= 1
-endif
-if !exists("g:netrw_mkdir_cmd")
- let g:netrw_mkdir_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME mkdir"
-endif
-if !exists("g:netrw_mousemaps")
- if exists("&mouse") && &mouse =~ '[anh]'
- let g:netrw_mousemaps= 1
- else
- let g:netrw_mousemaps= 0
- endif
-endif
-if !exists("g:netrw_retmap")