Skip to content
Snippets Groups Projects
Commit 5c73622a authored by Bram Moolenaar's avatar Bram Moolenaar
Browse files

Update runtime files.

parent 8f3f58f2
No related branches found
No related tags found
No related merge requests found
Showing
with 1666 additions and 1045 deletions
"------------------------------------------------------------------------------
" 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.
......
"------------------------------------------------------------------------------
" 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.
......
"------------------------------------------------------------------------------
" 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
......
" ---------------------------------------------------------------------
" 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
......@@ -599,20 +634,6 @@ fun! s:GetOneScript(...)
" call Dret("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
......
"------------------------------------------------------------------------------
" 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
......
This diff is collapsed.
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell, Jr.
" Date: May 30, 2006
" Version: 9
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
" Date: Sep 30, 2008
" Version: 10
" Copyright: Copyright (C) 1999-2008 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,
......@@ -20,9 +20,15 @@
if exists("g:loaded_netrwFileHandlers") || &cp
finish
endif
let g:loaded_netrwFileHandlers= "v10"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
echohl Normal
finish
endif
let s:keepcpo= &cpo
set cpo&vim
let g:loaded_netrwFileHandlers= "v9"
" ---------------------------------------------------------------------
" netrwFileHandlers#Invoke: {{{1
......@@ -73,10 +79,10 @@ fun! s:NFH_html(pagefile)
if executable("mozilla")
" call Decho("executing !mozilla ".page)
exe "!mozilla ".g:netrw_shq.page.g:netrw_shq
exe "!mozilla ".shellescape(page,1)
elseif executable("netscape")
" call Decho("executing !netscape ".page)
exe "!netscape ".g:netrw_shq..page.g:netrw_shq
exe "!netscape ".shellescape(page,1)
else
" call Dret("s:NFH_html 0")
return 0
......@@ -96,10 +102,10 @@ fun! s:NFH_htm(pagefile)
if executable("mozilla")
" call Decho("executing !mozilla ".page)
exe "!mozilla ".g:netrw_shq.page.g:netrw_shq
exe "!mozilla ".shellescape(page,1)
elseif executable("netscape")
" call Decho("executing !netscape ".page)
exe "!netscape ".g:netrw_shq.page.g:netrw_shq
exe "!netscape ".shellescape(page,1)
else
" call Dret("s:NFH_htm 0")
return 0
......@@ -115,10 +121,10 @@ fun! s:NFH_jpg(jpgfile)
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".g:netrw_shq.a:jpgfile.g:netrw_shq
exe "silent! !gimp -s ".shellescape(a:jpgfile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:jpgfile.g:netrw_shq
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:jpgfile,1)
else
" call Dret("s:NFH_jpg 0")
return 0
......@@ -134,9 +140,9 @@ fun! s:NFH_gif(giffile)
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
if executable("gimp")
exe "silent! !gimp -s ".g:netrw_shq.a:giffile.g:netrw_shq
exe "silent! !gimp -s ".shellescape(a:giffile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:giffile.g:netrw_shq
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:giffile,1)
else
" call Dret("s:NFH_gif 0")
return 0
......@@ -152,9 +158,9 @@ fun! s:NFH_png(pngfile)
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".g:netrw_shq.a:pngfile.g:netrw_shq
exe "silent! !gimp -s ".shellescape(a:pngfile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:pngfile.g:netrw_shq
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pngfile,1)
else
" call Dret("s:NFH_png 0")
return 0
......@@ -170,9 +176,9 @@ fun! s:NFH_pnm(pnmfile)
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".g:netrw_shq.a:pnmfile.g:netrw_shq
exe "silent! !gimp -s ".shellescape(a:pnmfile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:pnmfile.g:netrw_shq
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pnmfile,1)
else
" call Dret("s:NFH_pnm 0")
return 0
......@@ -190,7 +196,7 @@ fun! s:NFH_bmp(bmpfile)
if executable("gimp")
exe "silent! !gimp -s ".a:bmpfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:bmpfile.g:netrw_shq
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:bmpfile,1)
else
" call Dret("s:NFH_bmp 0")
return 0
......@@ -205,9 +211,9 @@ endfun
fun! s:NFH_pdf(pdf)
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
if executable("gs")
exe 'silent! !gs '.g:netrw_shq.a:pdf.g:netrw_shq
exe 'silent! !gs '.shellescape(a:pdf,1)
elseif executable("pdftotext")
exe 'silent! pdftotext -nopgbrk '.g:netrw_shq.a:pdf.g:netrw_shq
exe 'silent! pdftotext -nopgbrk '.shellescape(a:pdf,1)
else
" call Dret("s:NFH_pdf 0")
return 0
......@@ -223,7 +229,7 @@ fun! s:NFH_doc(doc)
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
if executable("oowriter")
exe 'silent! !oowriter '.g:netrw_shq.a:doc.g:netrw_shq
exe 'silent! !oowriter '.shellescape(a:doc,1)
redraw!
else
" call Dret("s:NFH_doc 0")
......@@ -240,7 +246,7 @@ fun! s:NFH_sxw(sxw)
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
if executable("oowriter")
exe 'silent! !oowriter '.g:netrw_shq.a:sxw.g:netrw_shq
exe 'silent! !oowriter '.shellescape(a:sxw,1)
redraw!
else
" call Dret("s:NFH_sxw 0")
......@@ -257,7 +263,7 @@ fun! s:NFH_xls(xls)
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
if executable("oocalc")
exe 'silent! !oocalc '.g:netrw_shq.a:xls.g:netrw_shq
exe 'silent! !oocalc '.shellescape(a:xls,1)
redraw!
else
" call Dret("s:NFH_xls 0")
......@@ -274,15 +280,15 @@ fun! s:NFH_ps(ps)
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
if executable("gs")
" call Decho("exe silent! !gs ".a:ps)
exe "silent! !gs ".g:netrw_shq.a:ps.g:netrw_shq
exe "silent! !gs ".shellescape(a:ps,1)
redraw!
elseif executable("ghostscript")
" call Decho("exe silent! !ghostscript ".a:ps)
exe "silent! !ghostscript ".g:netrw_shq.a:ps.g:netrw_shq
exe "silent! !ghostscript ".shellescape(a:ps,1)
redraw!
elseif executable("gswin32")
" call Decho("exe silent! !gswin32 ".g:netrw_shq.a:ps.g:netrw_shq)
exe "silent! !gswin32 ".g:netrw_shq.a:ps.g:netrw_shq
" call Decho("exe silent! !gswin32 ".shellescape(a:ps,1))
exe "silent! !gswin32 ".shellescape(a:ps,1)
redraw!
else
" call Dret("s:NFH_ps 0")
......@@ -298,16 +304,16 @@ endfun
fun! s:NFH_eps(eps)
" call Dfunc("s:NFH_eps()")
if executable("gs")
exe "silent! !gs ".g:netrw_shq.a:eps.g:netrw_shq
exe "silent! !gs ".shellescape(a:eps,1)
redraw!
elseif executable("ghostscript")
exe "silent! !ghostscript ".g:netrw_shq.a:eps.g:netrw_shq
exe "silent! !ghostscript ".shellescape(a:eps,1)
redraw!
elseif executable("ghostscript")
exe "silent! !ghostscript ".g:netrw_shq.a:eps.g:netrw_shq
exe "silent! !ghostscript ".shellescape(a:eps,1)
redraw!
elseif executable("gswin32")
exe "silent! !gswin32 ".g:netrw_shq.a:eps.g:netrw_shq
exe "silent! !gswin32 ".shellescape(a:eps,1)
redraw!
else
" call Dret("s:NFH_eps 0")
......
" netrwSettings.vim: makes netrw settings simpler
" Date: Jul 02, 2008
" Date: Sep 03, 2008
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" Version: 12
" Version: 13
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
......@@ -19,7 +19,13 @@
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v12"
let g:loaded_netrwSettings = "v13"
if v:version < 700
echohl WarningMsg
echo "***warning*** this version of netrwSettings needs vim 7.0"
echohl Normal
finish
endif
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
......@@ -100,6 +106,7 @@ fun! netrwSettings#NetrwSettings()
put = 'let g:netrw_browsex_viewer = (not defined)'
endif
put = 'let g:netrw_compress = '.g:netrw_compress
put = 'let g:netrw_cursorline = '.g:netrw_cursorline
let decompressline= line("$")
put ='let g:netrw_decompress...'
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
......@@ -138,6 +145,7 @@ fun! netrwSettings#NetrwSettings()
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
put = 'let g:netrw_scpport = '.g:netrw_scpport
put = 'let g:netrw_sepchr = '.g:netrw_sepchr
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
let tmpfileescline= line("$")
......
" Vim completion script
" Language: Ruby
" Maintainer: Mark Guzman <segfault@hasno.info>
" Info: $Id$
" Info: $Id: rubycomplete.vim,v 1.41 2008/06/30 06:50:45 segy Exp $
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
......
" Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2008 Jun 27
" Last Change: 2008 Nov 29
if !exists('g:spellfile_URL')
" Prefer using http:// when netrw should be able to use it, since
......@@ -39,19 +39,22 @@ function! spellfile#LoadFile(lang)
let s:donedict[a:lang . &enc] = 1
" Find spell directories we can write in.
let dirlist = []
let dirchoices = '&Cancel'
for dir in split(globpath(&rtp, 'spell'), "\n")
if filewritable(dir) == 2
call add(dirlist, dir)
let dirchoices .= "\n&" . len(dirlist)
endif
endfor
let [dirlist, dirchoices] = spellfile#GetDirChoices()
if len(dirlist) == 0
if &verbose
let dir_to_create = spellfile#WritableSpellDir()
if &verbose || dir_to_create != ''
echomsg 'spellfile#LoadFile(): There is no writable spell directory.'
endif
return
if dir_to_create != ''
if confirm("Shall I create " . dir_to_create, "&Yes\n&No", 2) == 1
" After creating the directory it should show up in the list.
call mkdir(dir_to_create, "p")
let [dirlist, dirchoices] = spellfile#GetDirChoices()
endif
endif
if len(dirlist) == 0
return
endif
endif
let msg = 'Cannot find spell file for "' . a:lang . '" in ' . &enc
......@@ -177,3 +180,29 @@ function! spellfile#Nread(fname)
unlet g:netrw_use_errorwindow
endif
endfunc
" Get a list of writable spell directories and choices for confirm().
function! spellfile#GetDirChoices()
let dirlist = []
let dirchoices = '&Cancel'
for dir in split(globpath(&rtp, 'spell'), "\n")
if filewritable(dir) == 2
call add(dirlist, dir)
let dirchoices .= "\n&" . len(dirlist)
endif
endfor
return [dirlist, dirchoices]
endfunc
function! spellfile#WritableSpellDir()
if has("unix")
" For Unix always use the $HOME/.vim directory
return $HOME . "/.vim/spell"
endif
for dir in split(&rtp, ',')
if filewritable(dir) == 2
return dir . "/spell"
endif
endfor
return ''
endfunction
" Vim OMNI completion script for SQL
" Language: SQL
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 6.0
" Last Change: Thu 03 Apr 2008 10:37:54 PM Eastern Daylight Time
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Version: 7.0
" Last Change: 2009 Jan 04
" Usage: For detailed help
" ":help sql.txt"
" or ":help ft-sql-omni"
" or read $VIMRUNTIME/doc/sql.txt
" History
" Version 7.0
" Better handling of object names
" Version 6.0
" Supports object names with spaces "my table name"
"
" Set completion with CTRL-X CTRL-O to autoloaded function.
" This check is in place in case this script is
" sourced directly instead of using the autoload feature.
......@@ -22,7 +28,7 @@ endif
if exists('g:loaded_sql_completion')
finish
endif
let g:loaded_sql_completion = 50
let g:loaded_sql_completion = 70
" Maintains filename of dictionary
let s:sql_file_table = ""
......@@ -106,10 +112,23 @@ function! sqlcomplete#Complete(findstart, base)
let begindot = 1
endif
while start > 0
if line[start - 1] =~ '\(\w\|\s\+\)'
" Additional code was required to handle objects which
" can contain spaces like "my table name".
if line[start - 1] !~ '\(\w\|\.\)'
" If the previous character is not a period or word character
break
" elseif line[start - 1] =~ '\(\w\|\s\+\)'
" let start -= 1
elseif line[start - 1] =~ '\w'
" If the previous character is word character continue back
let start -= 1
elseif line[start - 1] =~ '\.' &&
\ compl_type =~ 'column\|table\|view\|procedure'
" If the previous character is a period and we are completing
" an object which can be specified with a period like this:
" table_name.column_name
" owner_name.table_name
" If lastword has already been set for column completion
" break from the loop, since we do not also want to pickup
" a table name if it was also supplied.
......@@ -184,9 +203,10 @@ function! sqlcomplete#Complete(findstart, base)
endif
let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '')
if s:sql_file_{compl_type} == ""
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
endif
" Same call below, no need to do it twice
" if s:sql_file_{compl_type} == ""
" let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
" endif
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
if s:sql_file_{compl_type} != ""
if filereadable(s:sql_file_{compl_type})
......@@ -312,9 +332,16 @@ function! sqlcomplete#Complete(findstart, base)
endif
if base != ''
" Filter the list based on the first few characters the user
" entered
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"'
" Filter the list based on the first few characters the user entered.
" Check if the text matches at the beginning
" or
" Match to a owner.table or alias.column type match
" or
" Handle names with spaces "my table name"
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|^\\(\\w\\+\\.\\)\\?'.base.'\\)"'
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\)"'
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\(\\.\\)\\?'.base.'\\)"'
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"'
let compl_list = filter(deepcopy(compl_list), expr)
endif
......
This diff is collapsed.
This diff is collapsed.
" Vim color file
" Maintainer: Hans Fugal <hans@fugal.net>
" Last Change: $Date$
" Last Change: $Date$
" Last Change: $Date: 2004/06/13 19:30:30 $
" Last Change: $Date: 2004/06/13 19:30:30 $
" URL: http://hans.fugal.net/vim/colors/desert.vim
" Version: $Id$
" Version: $Id: desert.vim,v 1.1 2004/06/13 19:30:30 vimboss Exp $
" cool help screens
" :he group-name
......
"------------------------------------------------------------------------------
" 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/compiler/decada.vim $
" History: 21.07.2006 MK New Dec Ada
" 15.10.2006 MK Bram's suggestion for runtime integration
......
" Vim compiler file
" Language: eRuby
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Info: $Id$
" Info: $Id: eruby.vim,v 1.7 2008/06/29 04:18:42 tpope Exp $
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
......
" Vim compiler file
" Compiler: g77 (GNU Fortran)
" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
" Last Change: $Date$
" $Revision$
" Last Change: $Date: 2004/06/13 18:17:36 $
" $Revision: 1.1 $
if exists("current_compiler")
finish
......
" Vim compiler file
" Compiler: GNU C Compiler
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-12-20
" Latest Revision: 2009-05-01
if exists("current_compiler")
finish
......@@ -12,10 +12,13 @@ let s:cpo_save = &cpo
set cpo-=C
CompilerSet errorformat=
\%*[^\"]\"%f\"%*\\D%l:%c:\ %m,
\%*[^\"]\"%f\"%*\\D%l:\ %m,
\\"%f\"%*\\D%l:%c:\ %m,
\\"%f\"%*\\D%l:\ %m,
\%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
\%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
\%f:%l:%c:\ %m,
\%f:%l:\ %m,
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
......
"------------------------------------------------------------------------------
" 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/compiler/gnat.vim $
" History: 24.05.2006 MK Unified Headers
" 16.07.2006 MK Ada-Mode as vim-ball
......
" Vim Compiler File
" Compiler: Jikes
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
" Last Change: 2004 Mar 27
" URL: http://mywebpage.netscape.com/sharppeople/vim/compiler
" Last Change: 20 Jan 2009
" URL: http://dwsharp.users.sourceforge.net/vim/compiler
if exists("current_compiler")
finish
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment