updated for version 7.1b
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Oct 09
|
||||
" Last Change: 2007 May 10
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
|
||||
@ -63,6 +63,12 @@ fun gzip#read(cmd)
|
||||
" set 'modifiable'
|
||||
let ma_save = &ma
|
||||
setlocal ma
|
||||
" Reset 'foldenable', otherwise line numbers get adjusted.
|
||||
if has("folding")
|
||||
let fen_save = &fen
|
||||
setlocal nofen
|
||||
endif
|
||||
|
||||
" when filtering the whole buffer, it will become empty
|
||||
let empty = line("'[") == 1 && line("']") == line("$")
|
||||
let tmp = tempname()
|
||||
@ -74,42 +80,50 @@ fun gzip#read(cmd)
|
||||
if !filereadable(tmp)
|
||||
" uncompress didn't work! Keep the compressed file then.
|
||||
echoerr "Error: Could not read uncompressed file"
|
||||
return
|
||||
endif
|
||||
" delete the compressed lines; remember the line number
|
||||
let l = line("'[") - 1
|
||||
if exists(":lockmarks")
|
||||
lockmarks '[,']d _
|
||||
let ok = 0
|
||||
else
|
||||
'[,']d _
|
||||
endif
|
||||
" read in the uncompressed lines "'[-1r tmp"
|
||||
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
|
||||
setlocal nobin
|
||||
if exists(":lockmarks")
|
||||
if empty
|
||||
execute "silent lockmarks " . l . "r ++edit " . tmp
|
||||
let ok = 1
|
||||
" delete the compressed lines; remember the line number
|
||||
let l = line("'[") - 1
|
||||
if exists(":lockmarks")
|
||||
lockmarks '[,']d _
|
||||
else
|
||||
execute "silent lockmarks " . l . "r " . tmp
|
||||
'[,']d _
|
||||
endif
|
||||
else
|
||||
execute "silent " . l . "r " . tmp
|
||||
" read in the uncompressed lines "'[-1r tmp"
|
||||
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
|
||||
setlocal nobin
|
||||
if exists(":lockmarks")
|
||||
if empty
|
||||
execute "silent lockmarks " . l . "r ++edit " . tmp
|
||||
else
|
||||
execute "silent lockmarks " . l . "r " . tmp
|
||||
endif
|
||||
else
|
||||
execute "silent " . l . "r " . tmp
|
||||
endif
|
||||
|
||||
" if buffer became empty, delete trailing blank line
|
||||
if empty
|
||||
silent $delete _
|
||||
1
|
||||
endif
|
||||
" delete the temp file and the used buffers
|
||||
call delete(tmp)
|
||||
silent! exe "bwipe " . tmp
|
||||
silent! exe "bwipe " . tmpe
|
||||
endif
|
||||
|
||||
" if buffer became empty, delete trailing blank line
|
||||
if empty
|
||||
silent $delete _
|
||||
1
|
||||
endif
|
||||
" delete the temp file and the used buffers
|
||||
call delete(tmp)
|
||||
silent! exe "bwipe " . tmp
|
||||
silent! exe "bwipe " . tmpe
|
||||
" Restore saved option values.
|
||||
let &pm = pm_save
|
||||
let &cpo = cpo_save
|
||||
let &l:ma = ma_save
|
||||
if has("folding")
|
||||
let &l:fen = fen_save
|
||||
endif
|
||||
|
||||
" When uncompressed the whole buffer, do autocommands
|
||||
if empty
|
||||
if ok && empty
|
||||
if &verbose >= 8
|
||||
execute "doau BufReadPost " . expand("%:r")
|
||||
else
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
" Author: Mikolaj Machowski, Thomas Bartel
|
||||
" Last change: 2007 May 8
|
||||
let g:xmldata_xsl = {
|
||||
\ 'apply-imports' : [[], {}],
|
||||
\ 'apply-templates' : [['sort', 'with-param'], {'select' : [], 'mode' : []}],
|
||||
\ 'attribute' : [[], {'name' : [], 'namespace' : []}],
|
||||
\ 'attribute' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : []}],
|
||||
\ 'attribute-set' : [['attribute'], {'name' : [], 'use-attribute-sets' : []}],
|
||||
\ 'call-template' : [['with-param'], {'name' : []}],
|
||||
\ 'choose' : [['when', 'otherwise'], {}],
|
||||
@ -9,10 +11,10 @@ let g:xmldata_xsl = {
|
||||
\ 'copy' : [[], {'use-attribute-sets' : []}],
|
||||
\ 'copy-of' : [[], {'select' : []}],
|
||||
\ 'decimal-format' : [[], {'name' : [], 'decimal-separator' : [], 'grouping-separator' : [], 'infinity' : [], 'minus-sign' : [], 'NaN' : [], 'percent' : [], 'per-mille' : [], 'zero-digit' : [], 'digit' : [], 'pattern-separator' : []}],
|
||||
\ 'element' : [[], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}],
|
||||
\ 'element' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}],
|
||||
\ 'fallback' : [[], {}],
|
||||
\ 'for-each' : [['sort'], {'select' : []}],
|
||||
\ 'if' : [[], {'test' : []}],
|
||||
\ 'if' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'test' : []}],
|
||||
\ 'import' : [[], {'href' : []}],
|
||||
\ 'include' : [[], {'href' : []}],
|
||||
\ 'key' : [[], {'name' : [], 'match' : [], 'use' : []}],
|
||||
@ -21,17 +23,16 @@ let g:xmldata_xsl = {
|
||||
\ 'number' : [[], {'level' : ['single', 'multiple', 'any'], 'count' : [], 'from' : [], 'value' : [], 'format' : [], 'lang' : [], 'letter-value' : ['alphabetic', 'traditional'], 'grouping-separator' : [], 'grouping-size' : []}],
|
||||
\ 'otherwise' : [[], {}],
|
||||
\ 'output' : [[], {'method' : ['xml', 'html', 'text'], 'version' : [], 'encoding' : [], 'omit-xml-declaration' : ['yes', 'no'], 'standalone' : ['yes', 'no'], 'doctype-public' : [], 'doctype-system' : [], 'cdata-section-elements' : [], 'indent' : ['yes', 'no'], 'media-type' : []}],
|
||||
\ 'param' : [[], {'name' : [], 'select' : []}],
|
||||
\ 'param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
|
||||
\ 'preserve-space' : [[], {'elements' : []}],
|
||||
\ 'processing-instruction' : [[], {'name' : []}],
|
||||
\ 'processing-instructionruction' : [[], {'name' : []}],
|
||||
\ 'sort' : [[], {'select' : [], 'lang' : [], 'data-type' : ['text', 'number'], 'order' : ['ascending', 'descending'], 'case-order' : ['upper-first', 'lower-first']}],
|
||||
\ 'strip-space' : [[], {'elements' : []}],
|
||||
\ 'stylesheet' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'version' : []}],
|
||||
\ 'template' : [['param'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}],
|
||||
\ 'template' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}],
|
||||
\ 'text' : [[], {'disable-output-escaping' : ['yes', 'no']}],
|
||||
\ 'transform' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'exclude-result-prefixes' : [], 'version' : []}],
|
||||
\ 'value-of' : [[], {'select' : [], 'disable-output-escaping' : ['yes', 'no']}],
|
||||
\ 'variable' : [[], {'name' : [], 'select' : []}],
|
||||
\ 'variable' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
|
||||
\ 'when' : [[], {'test' : []}],
|
||||
\ 'with-param' : [[], {'name' : [], 'select' : []}]}
|
||||
|
||||
\ 'with-param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}]}
|
||||
|
||||
Reference in New Issue
Block a user