summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-05-10 18:25:20 +0000
committerBram Moolenaar <Bram@vim.org>2007-05-10 18:25:20 +0000
commitccc18222dd2b40397536703923842f026a6141f0 (patch)
tree5ebf27663225d11e70f382e51236b9f3f9890ed4 /runtime
parent2c7a763832663d5878ff37a58c81fbe95527084a (diff)
updated for version 7.1b
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/netrwSettings.vim14
-rw-r--r--runtime/autoload/xml/xsd.vim130
-rw-r--r--runtime/autoload/zip.vim39
-rw-r--r--runtime/doc/autocmd.txt2
-rw-r--r--runtime/doc/if_tcl.txt2
-rw-r--r--runtime/doc/usr_21.txt2
-rw-r--r--runtime/doc/usr_24.txt2
-rw-r--r--runtime/syntax/eruby.vim62
8 files changed, 209 insertions, 44 deletions
diff --git a/runtime/autoload/netrwSettings.vim b/runtime/autoload/netrwSettings.vim
index 839ba38409..5f4445fb00 100644
--- a/runtime/autoload/netrwSettings.vim
+++ b/runtime/autoload/netrwSettings.vim
@@ -1,7 +1,7 @@
" netrwSettings.vim: makes netrw settings simpler
-" Date: Jan 05, 2007
+" Date: Mar 26, 2007
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
-" Version: 9b ASTRO-ONLY
+" Version: 9
" 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,7 @@
if exists("g:loaded_netrwSettings") || &cp
finish
endif
-let g:loaded_netrwSettings = "v9b"
+let g:loaded_netrwSettings = "v9"
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
@@ -81,11 +81,15 @@ fun! netrwSettings#NetrwSettings()
put = 'let g:netrw_ftp = '.g:netrw_ftp
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
+ put = 'let g:netrw_sshport = '.g:netrw_sshport
let shqline= line("$")
put = 'let g:netrw_shq...'
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
let s:netrw_xfer_stop= line(".")
+ put =''
+ put ='+ Netrw Messages'
+ put ='let g:netrw_use_errorwindow = '.g:netrw_use_errorwindow
put = ''
put ='+ Netrw Browser Control'
@@ -122,12 +126,14 @@ fun! netrwSettings#NetrwSettings()
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
+ put = 'let g:netrw_scpport = '.g:netrw_scpport
+ put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
put = 'let g:netrw_winsize = '.g:netrw_winsize
put =''
- put ='+ For help, place cursor on line and press ?'
+ put ='+ For help, place cursor on line and press <F1>'
1d
silent %s/^+/"/e
diff --git a/runtime/autoload/xml/xsd.vim b/runtime/autoload/xml/xsd.vim
new file mode 100644
index 0000000000..8a673ea21e
--- /dev/null
+++ b/runtime/autoload/xml/xsd.vim
@@ -0,0 +1,130 @@
+" Author: Thomas Barthel
+" Last change: 2007 May 8
+let g:xmldata_xsd = {
+ \ 'schema': [
+ \ [ 'include', 'import', 'redefine', 'annotation', 'simpleType', 'complexType', 'element', 'attribute', 'attributeGroup', 'group', 'notation', 'annotation'],
+ \ { 'targetNamespace' : [], 'version' : [], 'xmlns' : [], 'finalDefault' : [], 'blockDefault' : [], 'id' : [], 'elementFormDefault' : [], 'attributeFormDefault' : [], 'xml:lang' : [] }],
+ \ 'redefine' : [
+ \ ['annotation', 'simpleType', 'complexType', 'attributeGroup', 'group'],
+ \ {'schemaLocation' : [], 'id' : []} ],
+ \ 'include' : [
+ \ ['annotation'],
+ \ {'namespace' : [], 'id' : []} ],
+ \ 'import' : [
+ \ ['annotation'],
+ \ {'namespace' : [], 'schemaLocation' : [], 'id' : []} ],
+ \ 'complexType' : [
+ \ ['annotation', 'simpleContent', 'complexContent', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'],
+ \ {'name' : [], 'id' : [], 'abstract' : [], 'final' : [], 'block' : [], 'mixed' : []} ],
+ \ 'complexContent' : [
+ \ ['annotation', 'restriction', 'extension'],
+ \ {'mixed' : [], 'id' : [] } ],
+ \ 'simpleType' : [
+ \ ['annotation', 'restriction', 'list', 'union'],
+ \ {'name' : [], 'final' : [], 'id' : []} ],
+ \ 'simpleContent' : [
+ \ ['annotation', 'restriction', 'extension'],
+ \ {'id' : []} ],
+ \ 'element' : [
+ \ ['annotation', 'complexType', 'simpleType', 'unique', 'key', 'keyref'],
+ \ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'minOccurs' : [], 'maxOccurs' : [], 'nillable' : [], 'substitutionGroup' : [], 'abstract' : [], 'final' : [], 'block' : [], 'default' : [], 'fixed' : [], 'form' : []} ],
+ \ 'attribute' : [
+ \ ['annotation', 'simpleType'],
+ \ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'use' : [], 'default' : [], 'fixed' : [], 'form' : []} ],
+ \ 'group' : [
+ \ ['annotation', 'all', 'choice', 'sequence'],
+ \ {'name' : [], 'ref' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
+ \ 'choice' : [
+ \ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'],
+ \ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
+ \ 'sequence' : [
+ \ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'],
+ \ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
+ \ 'all' : [
+ \ ['annotation', 'element'],
+ \ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
+ \ 'any' : [
+ \ ['annotation'],
+ \ {'namespace' : [], 'processContents' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
+ \ 'unique' : [
+ \ ['annotation', 'selector', 'field'],
+ \ {'name' : [], 'id' : []} ],
+ \ 'key' : [
+ \ ['annotation', 'selector', 'field'],
+ \ {'name' : [], 'id' : []} ],
+ \ 'keyref' : [
+ \ ['annotation', 'selector', 'field'],
+ \ {'name' : [], 'refer' : [], 'id' : []} ],
+ \ 'selector' : [
+ \ ['annotation'],
+ \ {'xpath' : [], 'id' : []} ],
+ \ 'field' : [
+ \ ['annotation'],
+ \ {'xpath' : [], 'id' : []} ],
+ \ 'restriction' : [
+ \ ['annotation', 'simpleType', 'minExclusive', 'maxExclusive', 'minInclusive', 'maxInclusive', 'totalDigits', 'fractionDigits', 'length', 'minLength', 'maxLength', 'enumeration', 'whiteSpace', 'pattern'],
+ \ {'base' : [], 'id' : []} ],
+ \ 'minExclusive' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : [], 'fixed' : []}],
+ \ 'maxExclusive' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : [], 'fixed' : []}],
+ \ 'minInclusive' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : [], 'fixed' : []}],
+ \ 'maxInclusive' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : [], 'fixed' : []}],
+ \ 'totalDigits' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : [], 'fixed' : []}],
+ \ 'fractionDigits' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : [], 'fixed' : []}],
+ \ 'length' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : [], 'fixed' : []}],
+ \ 'minLength' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : [], 'fixed' : []}],
+ \ 'maxLength' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : [], 'fixed' : []}],
+ \ 'enumeration' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : []}],
+ \ 'whiteSpace' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : [], 'fixed' : []}],
+ \ 'pattern' : [
+ \ ['annotation'],
+ \ {'value' : [], 'id' : []}],
+ \ 'extension' : [
+ \ ['annotation', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'],
+ \ {'base' : [], 'id' : []} ],
+ \ 'attributeGroup' : [
+ \ ['annotation', 'attribute', 'attributeGroup', 'anyAttribute'],
+ \ {'name' : [], 'id' : [], 'ref' : []} ],
+ \ 'anyAttribute' : [
+ \ ['annotation'],
+ \ {'namespace' : [], 'processContents' : [], 'id' : []} ],
+ \ 'list' : [
+ \ ['annotation', 'simpleType'],
+ \ {'itemType' : [], 'id' : []} ],
+ \ 'union' : [
+ \ ['annotation', 'simpleType'],
+ \ {'id' : [], 'memberTypes' : []} ],
+ \ 'notation' : [
+ \ ['annotation'],
+ \ {'name' : [], 'id' : [], 'public' : [], 'system' : []} ],
+ \ 'annotation' : [
+ \ ['appinfo', 'documentation'],
+ \ {} ],
+ \ 'appinfo' : [
+ \ [],
+ \ {'source' : [], 'id' : []} ],
+ \ 'documentation' : [
+ \ [],
+ \ {'source' : [], 'id' : [], 'xml' : []} ]
+ \ }
diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim
index 2a15deeafe..5875be0d93 100644
--- a/runtime/autoload/zip.vim
+++ b/runtime/autoload/zip.vim
@@ -1,7 +1,7 @@
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
-" Date: Sep 29, 2006
-" Version: 12
+" Date: May 08, 2007
+" Version: 14
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
@@ -22,7 +22,7 @@ if &cp || exists("g:loaded_zip") || v:version < 700
finish
endif
-let g:loaded_zip = "v12"
+let g:loaded_zip = "v14"
let s:zipfile_escape = ' ?&;\'
let s:ERROR = 2
let s:WARNING = 1
@@ -37,6 +37,12 @@ if !exists("g:zip_shq")
let g:zip_shq= '"'
endif
endif
+if !exists("g:zip_zipcmd")
+ let g:zip_zipcmd= "zip"
+endif
+if !exists("g:zip_unzipcmd")
+ let g:zip_unzipcmd= "unzip"
+endif
" ----------------
" Functions: {{{1
@@ -50,7 +56,7 @@ fun! zip#Browse(zipfile)
set report=10
" sanity checks
- if !executable("unzip")
+ if !executable(g:zip_unzipcmd)
redraw!
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
@@ -73,7 +79,7 @@ fun! zip#Browse(zipfile)
if &ma != 1
set ma
endif
- let w:zipfile= a:zipfile
+ let b:zipfile= a:zipfile
setlocal noswapfile
setlocal buftype=nofile
@@ -90,8 +96,8 @@ fun! zip#Browse(zipfile)
0d
$
-" call Decho("exe silent r! unzip -l ".s:QuoteFileDir(a:zipfile))
- exe "silent r! unzip -l ".s:QuoteFileDir(a:zipfile)
+" call Decho("exe silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile))
+ exe "silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile)
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (zip#Browse) ".a:zipfile." is not a zip file" | echohl None
@@ -125,7 +131,7 @@ endfun
" ---------------------------------------------------------------------
" ZipBrowseSelect: {{{2
fun! s:ZipBrowseSelect()
-" call Dfunc("ZipBrowseSelect() zipfile<".w:zipfile."> curfile<".expand("%").">")
+" call Dfunc("ZipBrowseSelect() zipfile<".b:zipfile."> curfile<".expand("%").">")
let repkeep= &report
set report=10
let fname= getline(".")
@@ -148,7 +154,7 @@ fun! s:ZipBrowseSelect()
" call Decho("fname<".fname.">")
" get zipfile to the new-window
- let zipfile = w:zipfile
+ let zipfile = b:zipfile
let curfile= expand("%")
" call Decho("zipfile<".zipfile.">")
" call Decho("curfile<".curfile.">")
@@ -177,15 +183,13 @@ fun! zip#Read(fname,mode)
else
let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
-
- " TODO Needs to predicated to using InfoZIP's unzip on Windows
let fname = substitute(fname, '[', '[[]', 'g')
endif
" call Decho("zipfile<".zipfile.">")
" call Decho("fname <".fname.">")
-" call Decho("exe r! unzip -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
- exe "silent r! unzip -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)
+" call Decho("exe r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
+ exe "silent r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)
" cleanup
0d
@@ -203,7 +207,7 @@ fun! zip#Write(fname)
set report=10
" sanity checks
- if !executable("zip")
+ if !executable(g:zip_zipcmd)
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
@@ -273,13 +277,12 @@ fun! zip#Write(fname)
let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
endif
- " TODO Needs to predicated to using InfoZIP's unzip
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
let fname = substitute(fname, '[', '[[]', 'g')
endif
-" call Decho("zip -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
- call system("zip -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
+" call Decho(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
+ call system(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
@@ -367,4 +370,4 @@ endfun
" Modelines And Restoration: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
-" vim:ts=8 fdm=marker
+" vim:ts=8 fdm=marker
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 92f274e06e..7ad22974ad 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 7.1a. Last change: 2007 Mar 27
+*autocmd.txt* For Vim version 7.1b. Last change: 2007 Mar 27
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/if_tcl.txt b/runtime/doc/if_tcl.txt
index 4ab5237b5a..b7be01d8cf 100644
--- a/runtime/doc/if_tcl.txt
+++ b/runtime/doc/if_tcl.txt
@@ -1,4 +1,4 @@
-*if_tcl.txt* For Vim version 7.1a. Last change: 2006 Mar 06
+*if_tcl.txt* For Vim version 7.1b. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Ingo Wilken
diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt
index 0b5298ed6a..4a646f299a 100644
--- a/runtime/doc/usr_21.txt
+++ b/runtime/doc/usr_21.txt
@@ -1,4 +1,4 @@
-*usr_21.txt* For Vim version 7.1a. Last change: 2007 May 01
+*usr_21.txt* For Vim version 7.1b. Last change: 2007 May 01
VIM USER MANUAL - by Bram Moolenaar
diff --git a/runtime/doc/usr_24.txt b/runtime/doc/usr_24.txt
index 1c15ca59d3..9fc4d1a15f 100644
--- a/runtime/doc/usr_24.txt
+++ b/runtime/doc/usr_24.txt
@@ -1,4 +1,4 @@
-*usr_24.txt* For Vim version 7.1a. Last change: 2006 Jul 23
+*usr_24.txt* For Vim version 7.1b. Last change: 2006 Jul 23
VIM USER MANUAL - by Bram Moolenaar
diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim
index 3aedc6cfd1..f85e0093d3 100644
--- a/runtime/syntax/eruby.vim
+++ b/runtime/syntax/eruby.vim
@@ -1,16 +1,12 @@
" Vim syntax file
" Language: eRuby
-" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
" Info: $Id$
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
-" For version 5.x: Clear all syntax items
-" For version 6.x: Quit when a syntax file was already loaded
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
+if exists("b:current_syntax")
finish
endif
@@ -18,21 +14,51 @@ if !exists("main_syntax")
let main_syntax = 'eruby'
endif
-if version < 600
- so <sfile>:p:h/html.vim
- syn include @rubyTop <sfile>:p:h/ruby.vim
-else
- runtime! syntax/html.vim
- unlet b:current_syntax
- syn include @rubyTop syntax/ruby.vim
+if !exists("g:eruby_default_subtype")
+ let g:eruby_default_subtype = "html"
endif
+if !exists("b:eruby_subtype") && main_syntax == 'eruby'
+ let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
+ let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
+ if b:eruby_subtype == ''
+ let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\)\+$','',''),'\.\zs\w\+$')
+ endif
+ if b:eruby_subtype == 'rhtml'
+ let b:eruby_subtype = 'html'
+ elseif b:eruby_subtype == 'rb'
+ let b:eruby_subtype = 'ruby'
+ elseif b:eruby_subtype == 'yml'
+ let b:eruby_subtype = 'yaml'
+ elseif b:eruby_subtype == 'js'
+ let b:eruby_subtype = 'javascript'
+ elseif b:eruby_subtype == 'txt'
+ " Conventional; not a real file type
+ let b:eruby_subtype = 'text'
+ elseif b:eruby_subtype == ''
+ let b:eruby_subtype = g:eruby_default_subtype
+ endif
+endif
+
+if !exists("b:eruby_nest_level")
+ let b:eruby_nest_level = strlen(substitute(substitute(substitute(expand("%:t"),'@','','g'),'\c\.\%(erb\|rhtml\)\>','@','g'),'[^@]','','g'))
+endif
+if !b:eruby_nest_level
+ let b:eruby_nest_level = 1
+endif
+
+if exists("b:eruby_subtype") && b:eruby_subtype != ''
+ exe "runtime! syntax/".b:eruby_subtype.".vim"
+ unlet! b:current_syntax
+endif
+syn include @rubyTop syntax/ruby.vim
+
syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment
-syn region erubyOneLiner matchgroup=erubyDelimiter start="^%%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend oneline
-syn region erubyBlock matchgroup=erubyDelimiter start="<%%\@!-\=" end="-\=%>" contains=@rubyTop containedin=ALLBUT,@erubyRegions
-syn region erubyExpression matchgroup=erubyDelimiter start="<%=" end="-\=%>" contains=@rubyTop containedin=ALLBUT,@erubyRegions
-syn region erubyComment matchgroup=erubyDelimiter start="<%#" end="-\=%>" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend
+exe 'syn region erubyOneLiner matchgroup=erubyDelimiter start="^%\{1,'.b:eruby_nest_level.'\}%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erbRegions keepend oneline'
+exe 'syn region erubyBlock matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}%\@!-\=" end="-\=%>" contains=@rubyTop containedin=ALLBUT,@erbRegions'
+exe 'syn region erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}=" end="-\=%>" contains=@rubyTop containedin=ALLBUT,@erbRegions'
+exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}#" end="-\=%>" contains=rubyTodo,@Spell containedin=ALLBUT,@erbRegions keepend'
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
@@ -50,7 +76,7 @@ if version >= 508 || !exists("did_eruby_syntax_inits")
delcommand HiLink
endif
-let b:current_syntax = "eruby"
+let b:current_syntax = 'eruby'
if main_syntax == 'eruby'
unlet main_syntax