code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
" 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' : []} ] \ }
zyz2011-vim
runtime/autoload/xml/xsd.vim
Vim Script
gpl2
5,111
let g:xmldata_html32 = { \ 'vimxmlentities': ['AElig', 'Aacute', 'Acirc', 'Agrave', 'Aring', 'Atilde', 'Auml', 'Ccedil', 'ETH', 'Eacute', 'Ecirc', 'Egrave', 'Euml', 'Iacute', 'Icirc', 'Igrave', 'Iuml', 'Ntilde', 'Oacute', 'Ocirc', 'Ograve', 'Oslash', 'Otilde', 'Ouml', 'THORN', 'Uacute', 'Ucirc', 'Ugrave', 'Uuml', 'Yacute', 'aacute', 'acirc', 'acute', 'aelig', 'agrave', 'amp', 'aring', 'atilde', 'auml', 'brvbar', 'ccedil', 'cedil', 'cent', 'copy', 'curren', 'deg', 'divide', 'eacute', 'ecirc', 'egrave', 'eth', 'euml', 'frac12', 'frac14', 'frac34', 'gt', 'iacute', 'icirc', 'iexcl', 'igrave', 'iquest', 'iuml', 'laquo', 'lt', 'macr', 'micro', 'middot', 'nbsp', 'not', 'ntilde', 'oacute', 'ocirc', 'ograve', 'ordf', 'ordm', 'oslash', 'otilde', 'ouml', 'para', 'plusmn', 'pound', 'raquo', 'reg', 'sect', 'shy', 'sup1', 'sup2', 'sup3', 'szlig', 'thorn', 'times', 'uacute', 'ucirc', 'ugrave', 'uml', 'uuml', 'yacute', 'yen', 'yuml'], \ 'vimxmlroot': ['html'], \ 'a': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'rel': [], 'href': [], 'name': [], 'rev': [], 'title': []} \ ], \ 'address': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p'], \ { } \ ], \ 'applet': [ \ ['param', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'width': [], 'vspace': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'name': [], 'height': [], 'hspace': [], 'codebase': [], 'code': []} \ ], \ 'area': [ \ [], \ { 'alt': [], 'coords': [], 'nohref': ['BOOL'], 'href': [], 'shape': ['rect', 'circle', 'poly']} \ ], \ 'b': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'base': [ \ [], \ { 'href': []} \ ], \ 'basefont': [ \ [], \ { 'size': []} \ ], \ 'big': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'blockquote': [ \ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'], \ { } \ ], \ 'body': [ \ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'], \ { 'link': [], 'vlink': [], 'background': [], 'alink': [], 'bgcolor': [], 'text': []} \ ], \ 'br': [ \ [], \ { 'clear': ['none', 'left', 'all', 'right', 'none']} \ ], \ 'caption': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'align': ['top', 'bottom']} \ ], \ 'center': [ \ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'], \ { } \ ], \ 'cite': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'code': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'dd': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table'], \ { } \ ], \ 'dfn': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'dir': [ \ ['li'], \ { 'compact': ['BOOL']} \ ], \ 'div': [ \ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'], \ { 'align': ['left', 'center', 'right']} \ ], \ 'dl': [ \ ['dt', 'dd'], \ { 'compact': ['BOOL']} \ ], \ 'dt': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'em': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'font': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'size': [], 'color': []} \ ], \ 'form': [ \ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'isindex', 'hr', 'table', 'address'], \ { 'enctype': ['application/x-www-form-urlencoded'], 'action': [], 'method': ['GET', 'POST']} \ ], \ 'h1': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'align': ['left', 'center', 'right']} \ ], \ 'h2': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'align': ['left', 'center', 'right']} \ ], \ 'h3': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'align': ['left', 'center', 'right']} \ ], \ 'h4': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'align': ['left', 'center', 'right']} \ ], \ 'h5': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'align': ['left', 'center', 'right']} \ ], \ 'h6': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'align': ['left', 'center', 'right']} \ ], \ 'head': [ \ ['title', 'isindex', 'base', 'script', 'style', 'meta', 'link'], \ { } \ ], \ 'hr': [ \ [], \ { 'width': [], 'align': ['left', 'right', 'center'], 'size': [], 'noshade': ['BOOL']} \ ], \ 'html': [ \ ['head', 'body', 'plaintext'], \ { 'version': ['-//W3C//DTD HTML 3.2 Final//EN']} \ ], \ 'i': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'img': [ \ [], \ { 'width': [], 'vspace': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'usemap': [], 'ismap': ['BOOL'], 'src': [], 'height': [], 'border': [], 'hspace': []} \ ], \ 'input': [ \ [], \ { 'maxlength': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'value': [], 'src': [], 'name': [], 'size': [], 'checked': ['BOOL'], 'type': ['TEXT', 'PASSWORD', 'CHECKBOX', 'RADIO', 'SUBMIT', 'RESET', 'FILE', 'IMAGE']} \ ], \ 'isindex': [ \ [], \ { 'prompt': []} \ ], \ 'kbd': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'li': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table'], \ { 'value': [], 'type': []} \ ], \ 'link': [ \ [], \ { 'rel': [], 'href': [], 'rev': [], 'title': []} \ ], \ 'listing': [ \ [], \ { } \ ], \ 'map': [ \ ['area'], \ { 'name': []} \ ], \ 'menu': [ \ ['li'], \ { 'compact': ['BOOL']} \ ], \ 'meta': [ \ [], \ { 'http-equiv': [], 'name': [], 'content': []} \ ], \ 'ol': [ \ ['li'], \ { 'compact': ['BOOL'], 'type': [], 'start': []} \ ], \ 'option': [ \ [''], \ { 'value': [], 'selected': ['BOOL']} \ ], \ 'p': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'align': ['left', 'center', 'right']} \ ], \ 'param': [ \ [], \ { 'value': [], 'name': []} \ ], \ 'plaintext': [ \ [], \ { } \ ], \ 'pre': [ \ ['tt', 'i', 'b', 'u', 'strike', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'applet', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { 'width': ['#implied']} \ ], \ 'samp': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'script': [ \ [], \ { } \ ], \ 'select': [ \ ['option'], \ { 'name': [], 'size': [], 'multiple': ['BOOL']} \ ], \ 'small': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'strike': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'strong': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'style': [ \ [], \ { } \ ], \ 'sub': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'sup': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'table': [ \ ['caption', 'tr'], \ { 'width': [], 'align': ['left', 'center', 'right'], 'border': [], 'cellspacing': [], 'cellpadding': []} \ ], \ 'td': [ \ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'], \ { 'width': [], 'align': ['left', 'center', 'right'], 'nowrap': ['BOOL'], 'valign': ['top', 'middle', 'bottom'], 'height': [], 'rowspan': ['1'], 'colspan': ['1']} \ ], \ 'textarea': [ \ [''], \ { 'name': [], 'rows': [], 'cols': []} \ ], \ 'th': [ \ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'], \ { 'width': [], 'align': ['left', 'center', 'right'], 'nowrap': ['BOOL'], 'valign': ['top', 'middle', 'bottom'], 'height': [], 'rowspan': ['1'], 'colspan': ['1']} \ ], \ 'title': [ \ [''], \ { } \ ], \ 'tr': [ \ ['th', 'td'], \ { 'align': ['left', 'center', 'right'], 'valign': ['top', 'middle', 'bottom']} \ ], \ 'tt': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'u': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'ul': [ \ ['li'], \ { 'compact': ['BOOL'], 'type': ['disc', 'square', 'circle']} \ ], \ 'var': [ \ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'], \ { } \ ], \ 'xmp': [ \ [], \ { } \ ], \ 'vimxmlattrinfo' : { \ 'accept' : ['ContentType', ''], \ 'accesskey' : ['Character', ''], \ 'action' : ['*URI', ''], \ 'align' : ['String', ''], \ 'alt' : ['*Text', ''], \ 'archive' : ['UriList', ''], \ 'axis' : ['CDATA', ''], \ 'border' : ['Pixels', ''], \ 'cellpadding' : ['Length', ''], \ 'cellspacing' : ['Length', ''], \ 'char' : ['Character', ''], \ 'charoff' : ['Length', ''], \ 'charset' : ['LangCode', ''], \ 'checked' : ['Bool', ''], \ 'class' : ['CDATA', ''], \ 'codetype' : ['ContentType', ''], \ 'cols' : ['*Number', ''], \ 'colspan' : ['Number', ''], \ 'content' : ['*CDATA', ''], \ 'coords' : ['Coords', ''], \ 'data' : ['URI', ''], \ 'datetime' : ['DateTime', ''], \ 'declare' : ['Bool', ''], \ 'defer' : ['Bool', ''], \ 'dir' : ['String', ''], \ 'disabled' : ['Bool', ''], \ 'enctype' : ['ContentType', ''], \ 'for' : ['ID', ''], \ 'headers' : ['IDREFS', ''], \ 'height' : ['Number', ''], \ 'href' : ['*URI', ''], \ 'hreflang' : ['LangCode', ''], \ 'id' : ['ID', ''], \ 'ismap' : ['Bool', ''], \ 'label' : ['*Text', ''], \ 'lang' : ['LangCode', ''], \ 'longdesc' : ['URI', ''], \ 'maxlength' : ['Number', ''], \ 'media' : ['MediaDesc', ''], \ 'method' : ['String', ''], \ 'multiple' : ['Bool', ''], \ 'name' : ['CDATA', ''], \ 'nohref' : ['Bool', ''], \ 'onblur' : ['Script', ''], \ 'onchange' : ['Script', ''], \ 'onclick' : ['Script', ''], \ 'ondblclick' : ['Script', ''], \ 'onfocus' : ['Script', ''], \ 'onkeydown' : ['Script', ''], \ 'onkeypress' : ['Script', ''], \ 'onkeyup' : ['Script', ''], \ 'onload' : ['Script', ''], \ 'onmousedown' : ['Script', ''], \ 'onmousemove' : ['Script', ''], \ 'onmouseout' : ['Script', ''], \ 'onmouseover' : ['Script', ''], \ 'onmouseup' : ['Script', ''], \ 'onreset' : ['Script', ''], \ 'onselect' : ['Script', ''], \ 'onsubmit' : ['Script', ''], \ 'onunload' : ['Script', ''], \ 'profile' : ['URI', ''], \ 'readonly' : ['Bool', ''], \ 'rel' : ['LinkTypes', ''], \ 'rev' : ['LinkTypes', ''], \ 'rows' : ['*Number', ''], \ 'rules' : ['String', ''], \ 'scheme' : ['CDATA', ''], \ 'selected' : ['Bool', ''], \ 'shape' : ['Shape', ''], \ 'size' : ['CDATA', ''], \ 'span' : ['Number', ''], \ 'src' : ['*URI', ''], \ 'standby' : ['Text', ''], \ 'style' : ['StyleSheet', ''], \ 'summary' : ['*Text', ''], \ 'tabindex' : ['Number', ''], \ 'title' : ['Text', ''], \ 'type' : ['*ContentType', ''], \ 'usemap' : ['URI', ''], \ 'valign' : ['String', ''], \ 'valuetype' : ['String', ''], \ 'width' : ['Number', ''], \ 'xmlns' : ['URI', ''] \ }, \ 'vimxmltaginfo': { \ 'area': ['/>', ''], \ 'base': ['/>', ''], \ 'basefont': ['/>', ''], \ 'br': ['/>', ''], \ 'hr': ['/>', ''], \ 'img': ['/>', ''], \ 'input': ['/>', ''], \ 'isindex': ['/>', ''], \ 'link': ['/>', ''], \ 'meta': ['/>', ''], \ 'param': ['/>', ''], \ } \ }
zyz2011-vim
runtime/autoload/xml/html32.vim
Vim Script
gpl2
18,330
" Author: Mikolaj Machowski, Thomas Bartel " Last change: 2007 May 8 let g:xmldata_xsl = { \ 'apply-imports' : [[], {}], \ 'apply-templates' : [['sort', 'with-param'], {'select' : [], 'mode' : []}], \ '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'], {}], \ 'comment' : [[], {}], \ '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' : [['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' : [['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' : []}], \ 'message' : [[], {'terminate' : ['yes', 'no']}], \ 'namespace-alias' : [[], {'stylesheet-prefix' : ['#default'], 'result-prefix' : ['#default']}], \ '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' : [['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-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' : [['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' : [['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' : [['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' : []}]}
zyz2011-vim
runtime/autoload/xml/xsl.vim
Vim Script
gpl2
4,679
"------------------------------------------------------------------------------ " Description: Vim Ada/GNAT compiler file " Language: Ada (GNAT) " $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: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 " $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 " 05.08.2006 MK Add session support " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces " 19.09.2007 NO use project file only when there is a project " Help Page: compiler-gnat "------------------------------------------------------------------------------ if version < 700 finish endif function gnat#Make () dict " {{{1 let &l:makeprg = self.Get_Command('Make') let &l:errorformat = self.Error_Format wall make copen set wrap wincmd W endfunction gnat#Make " }}}1 function gnat#Pretty () dict " {{{1 execute "!" . self.Get_Command('Pretty') endfunction gnat#Make " }}}1 function gnat#Find () dict " {{{1 execute "!" . self.Get_Command('Find') endfunction gnat#Find " }}}1 function gnat#Tags () dict " {{{1 execute "!" . self.Get_Command('Tags') edit tags call gnat#Insert_Tags_Header () update quit endfunction gnat#Tags " }}}1 function gnat#Set_Project_File (...) dict " {{{1 if a:0 > 0 let self.Project_File = a:1 if ! filereadable (self.Project_File) let self.Project_File = findfile ( \ fnamemodify (self.Project_File, ':r'), \ $ADA_PROJECT_PATH, \ 1) endif elseif strlen (self.Project_File) > 0 let self.Project_File = browse (0, 'GNAT Project File?', '', self.Project_File) elseif expand ("%:e") == 'gpr' let self.Project_File = browse (0, 'GNAT Project File?', '', expand ("%:e")) else let self.Project_File = browse (0, 'GNAT Project File?', '', 'default.gpr') endif if strlen (v:this_session) > 0 execute 'mksession! ' . v:this_session endif "if strlen (self.Project_File) > 0 "if has("vms") "call ada#Switch_Session ( "\ expand('~')[0:-2] . ".vimfiles.session]gnat_" . "\ fnamemodify (self.Project_File, ":t:r") . ".vim") "else "call ada#Switch_Session ( "\ expand('~') . "/vimfiles/session/gnat_" . "\ fnamemodify (self.Project_File, ":t:r") . ".vim") "endif "else "call ada#Switch_Session ('') "endif return endfunction gnat#Set_Project_File " }}}1 function gnat#Get_Command (Command) dict " {{{1 let l:Command = eval ('self.' . a:Command . '_Command') return eval (l:Command) endfunction gnat#Get_Command " }}}1 function gnat#Set_Session (...) dict " {{{1 if argc() == 1 && fnamemodify (argv(0), ':e') == 'gpr' call self.Set_Project_File (argv(0)) elseif strlen (v:servername) > 0 call self.Set_Project_File (v:servername . '.gpr') endif endfunction gnat#Set_Session " }}}1 function gnat#New () " {{{1 let l:Retval = { \ 'Make' : function ('gnat#Make'), \ 'Pretty' : function ('gnat#Pretty'), \ 'Find' : function ('gnat#Find'), \ 'Tags' : function ('gnat#Tags'), \ 'Set_Project_File' : function ('gnat#Set_Project_File'), \ 'Set_Session' : function ('gnat#Set_Session'), \ 'Get_Command' : function ('gnat#Get_Command'), \ 'Project_File' : '', \ 'Make_Command' : '"gnat make -P " . self.Project_File . " -F -gnatef "', \ 'Pretty_Command' : '"gnat pretty -P " . self.Project_File . " "', \ 'Find_Program' : '"gnat find -P " . self.Project_File . " -F "', \ 'Tags_Command' : '"gnat xref -P " . self.Project_File . " -v *.AD*"', \ 'Error_Format' : '%f:%l:%c: %trror: %m,' . \ '%f:%l:%c: %tarning: %m,' . \ '%f:%l:%c: (%ttyle) %m'} return l:Retval endfunction gnat#New " }}}1 function gnat#Insert_Tags_Header () " {{{1 1insert !_TAG_FILE_FORMAT 1 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR AdaCore /info@adacore.com/ !_TAG_PROGRAM_NAME gnatxref // !_TAG_PROGRAM_URL http://www.adacore.com /official site/ !_TAG_PROGRAM_VERSION 5.05w // . return endfunction gnat#Insert_Tags_Header " }}}1 finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker
zyz2011-vim
runtime/autoload/gnat.vim
Vim Script
gpl2
5,331
" Vim support file to help with paste mappings and menus " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2006 Jun 23 " Define the string to use for items that are present both in Edit, Popup and " Toolbar menu. Also used in mswin.vim and macmap.vim. " Pasting blockwise and linewise selections is not possible in Insert and " Visual mode without the +virtualedit feature. They are pasted as if they " were characterwise instead. Add to that some tricks to leave the cursor in " the right position, also for "gi". if has("virtualedit") let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"} let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n'] let paste#paste_cmd['i'] = 'x<BS><Esc>' . paste#paste_cmd['n'] . 'gi' func! paste#Paste() let ove = &ve set ve=all normal! `^ if @+ != '' normal! "+gP endif let c = col(".") normal! i if col(".") < c " compensate for i<ESC> moving the cursor left normal! l endif let &ve = ove endfunc else let paste#paste_cmd = {'n': "\"=@+.'xy'<CR>gPFx\"_2x"} let paste#paste_cmd['v'] = '"-c<Esc>gix<Esc>' . paste#paste_cmd['n'] . '"_x' let paste#paste_cmd['i'] = 'x<Esc>' . paste#paste_cmd['n'] . '"_s' endif
zyz2011-vim
runtime/autoload/paste.vim
Vim Script
gpl2
1,232
" Vim completion script " Language: All languages, uses existing syntax highlighting rules " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> " Version: 8.0 " Last Change: 2011 Nov 02 " Usage: For detailed help, ":help ft-syntax-omni" " History " " Version 8.0 " Updated SyntaxCSyntaxGroupItems() " - Some additional syntax items were also allowed " on nextgroup= lines which were ignored by default. " Now these lines are processed independently. " " Version 7.0 " Updated syntaxcomplete#OmniSyntaxList() " - Looking up the syntax groups defined from a syntax file " looked for only 1 format of {filetype}GroupName, but some " syntax writers use this format as well: " {b:current_syntax}GroupName " OmniSyntaxList() will now check for both if the first " method does not find a match. " " Version 6.0 " Added syntaxcomplete#OmniSyntaxList() " - Allows other plugins to use this for their own " purposes. " - It will return a List of all syntax items for the " syntax group name passed in. " - XPTemplate for SQL will use this function via the " sqlcomplete plugin to populate a Choose box. " " Version 5.0 " Updated SyntaxCSyntaxGroupItems() " - When processing a list of syntax groups, the final group " was missed in function SyntaxCSyntaxGroupItems. " " 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. if exists('+omnifunc') " Do not set the option if already set since this " results in an E117 warning. if &omnifunc == "" setlocal omnifunc=syntaxcomplete#Complete endif endif if exists('g:loaded_syntax_completion') finish endif let g:loaded_syntax_completion = 80 " Set ignorecase to the ftplugin standard " This is the default setting, but if you define a buffer local " variable you can override this on a per filetype. if !exists('g:omni_syntax_ignorecase') let g:omni_syntax_ignorecase = &ignorecase endif " Indicates whether we should use the iskeyword option to determine " how to split words. " This is the default setting, but if you define a buffer local " variable you can override this on a per filetype. if !exists('g:omni_syntax_use_iskeyword') let g:omni_syntax_use_iskeyword = 1 endif " Only display items in the completion window that are at least " this many characters in length. " This is the default setting, but if you define a buffer local " variable you can override this on a per filetype. if !exists('g:omni_syntax_minimum_length') let g:omni_syntax_minimum_length = 0 endif " This script will build a completion list based on the syntax " elements defined by the files in $VIMRUNTIME/syntax. let s:syn_remove_words = 'match,matchgroup=,contains,'. \ 'links to,start=,end=' " \ 'links to,start=,end=,nextgroup=' let s:cache_name = [] let s:cache_list = [] let s:prepended = '' " This function is used for the 'omnifunc' option. function! syntaxcomplete#Complete(findstart, base) " Only display items in the completion window that are at least " this many characters in length if !exists('b:omni_syntax_ignorecase') if exists('g:omni_syntax_ignorecase') let b:omni_syntax_ignorecase = g:omni_syntax_ignorecase else let b:omni_syntax_ignorecase = &ignorecase endif endif if a:findstart " Locate the start of the item, including "." let line = getline('.') let start = col('.') - 1 let lastword = -1 while start > 0 " if line[start - 1] =~ '\S' " let start -= 1 " elseif line[start - 1] =~ '\.' if line[start - 1] =~ '\k' let start -= 1 let lastword = a:findstart else break endif endwhile " Return the column of the last word, which is going to be changed. " Remember the text that comes before it in s:prepended. if lastword == -1 let s:prepended = '' return start endif let s:prepended = strpart(line, start, (col('.') - 1) - start) return start endif " let base = s:prepended . a:base let base = s:prepended let filetype = substitute(&filetype, '\.', '_', 'g') let list_idx = index(s:cache_name, filetype, 0, &ignorecase) if list_idx > -1 let compl_list = s:cache_list[list_idx] else let compl_list = OmniSyntaxList() let s:cache_name = add( s:cache_name, filetype ) let s:cache_list = add( s:cache_list, compl_list ) endif " Return list of matches. if base != '' " let compstr = join(compl_list, ' ') " let expr = (b:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*' " let compstr = substitute(compstr, expr, '', 'g') " let compl_list = split(compstr, '\s\+') " Filter the list based on the first few characters the user " entered let expr = 'v:val '.(g:omni_syntax_ignorecase==1?'=~?':'=~#')." '^".escape(base, '\\/.*$^~[]').".*'" let compl_list = filter(deepcopy(compl_list), expr) endif return compl_list endfunc function! syntaxcomplete#OmniSyntaxList(...) if a:0 > 0 let parms = [] if 3 == type(a:1) let parms = a:1 elseif 1 == type(a:1) let parms = split(a:1, ',') endif return OmniSyntaxList( parms ) else return OmniSyntaxList() endif endfunc function! OmniSyntaxList(...) let list_parms = [] if a:0 > 0 if 3 == type(a:1) let list_parms = a:1 elseif 1 == type(a:1) let list_parms = split(a:1, ',') endif endif " Default to returning a dictionary, if use_dictionary is set to 0 " a list will be returned. " let use_dictionary = 1 " if a:0 > 0 && a:1 != '' " let use_dictionary = a:1 " endif " Only display items in the completion window that are at least " this many characters in length if !exists('b:omni_syntax_use_iskeyword') if exists('g:omni_syntax_use_iskeyword') let b:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword else let b:omni_syntax_use_iskeyword = 1 endif endif " Only display items in the completion window that are at least " this many characters in length if !exists('b:omni_syntax_minimum_length') if exists('g:omni_syntax_minimum_length') let b:omni_syntax_minimum_length = g:omni_syntax_minimum_length else let b:omni_syntax_minimum_length = 0 endif endif let saveL = @l let filetype = substitute(&filetype, '\.', '_', 'g') if empty(list_parms) " Default the include group to include the requested syntax group let syntax_group_include_{filetype} = '' " Check if there are any overrides specified for this filetype if exists('g:omni_syntax_group_include_'.filetype) let syntax_group_include_{filetype} = \ substitute( g:omni_syntax_group_include_{filetype},'\s\+','','g') let list_parms = split(g:omni_syntax_group_include_{filetype}, ',') if syntax_group_include_{filetype} =~ '\w' let syntax_group_include_{filetype} = \ substitute( syntax_group_include_{filetype}, \ '\s*,\s*', '\\|', 'g' \ ) endif endif else " A specific list was provided, use it endif " Loop through all the syntax groupnames, and build a " syntax file which contains these names. This can " work generically for any filetype that does not already " have a plugin defined. " This ASSUMES the syntax groupname BEGINS with the name " of the filetype. From my casual viewing of the vim7\syntax " directory this is true for almost all syntax definitions. " As an example, the SQL syntax groups have this pattern: " sqlType " sqlOperators " sqlKeyword ... redir @l silent! exec 'syntax list '.join(list_parms) redir END let syntax_full = "\n".@l let @l = saveL if syntax_full =~ 'E28' \ || syntax_full =~ 'E411' \ || syntax_full =~ 'E415' \ || syntax_full =~ 'No Syntax items' return [] endif let filetype = substitute(&filetype, '\.', '_', 'g') let list_exclude_groups = [] if a:0 > 0 " Do nothing since we have specific a specific list of groups else " Default the exclude group to nothing let syntax_group_exclude_{filetype} = '' " Check if there are any overrides specified for this filetype if exists('g:omni_syntax_group_exclude_'.filetype) let syntax_group_exclude_{filetype} = \ substitute( g:omni_syntax_group_exclude_{filetype},'\s\+','','g') let list_exclude_groups = split(g:omni_syntax_group_exclude_{filetype}, ',') if syntax_group_exclude_{filetype} =~ '\w' let syntax_group_exclude_{filetype} = \ substitute( syntax_group_exclude_{filetype}, \ '\s*,\s*', '\\|', 'g' \ ) endif endif endif " Sometimes filetypes can be composite names, like c.doxygen " Loop through each individual part looking for the syntax " items specific to each individual filetype. let syn_list = '' let ftindex = 0 let ftindex = match(&filetype, '\w\+', ftindex) while ftindex > -1 let ft_part_name = matchstr( &filetype, '\w\+', ftindex ) " Syntax rules can contain items for more than just the current " filetype. They can contain additional items added by the user " via autocmds or their vimrc. " Some syntax files can be combined (html, php, jsp). " We want only items that begin with the filetype we are interested in. let next_group_regex = '\n' . \ '\zs'.ft_part_name.'\w\+\ze'. \ '\s\+xxx\s\+' let index = 0 let index = match(syntax_full, next_group_regex, index) if index == -1 && exists('b:current_syntax') && ft_part_name != b:current_syntax " There appears to be two standards when writing syntax files. " Either items begin as: " syn keyword {filetype}Keyword values ... " let b:current_syntax = "sql" " let b:current_syntax = "sqlanywhere" " Or " syn keyword {syntax_filename}Keyword values ... " let b:current_syntax = "mysql" " So, we will make the format of finding the syntax group names " a bit more flexible and look for both if the first fails to " find a match. let next_group_regex = '\n' . \ '\zs'.b:current_syntax.'\w\+\ze'. \ '\s\+xxx\s\+' let index = 0 let index = match(syntax_full, next_group_regex, index) endif while index > -1 let group_name = matchstr( syntax_full, '\w\+', index ) let get_syn_list = 1 for exclude_group_name in list_exclude_groups if '\<'.exclude_group_name.'\>' =~ '\<'.group_name.'\>' let get_syn_list = 0 endif endfor " This code is no longer needed in version 6.0 since we have " augmented the syntax list command to only retrieve the syntax " groups we are interested in. " " if get_syn_list == 1 " if syntax_group_include_{filetype} != '' " if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>' " let get_syn_list = 0 " endif " endif " endif if get_syn_list == 1 " Pass in the full syntax listing, plus the group name we " are interested in. let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full) let syn_list = syn_list . extra_syn_list . "\n" endif let index = index + strlen(group_name) let index = match(syntax_full, next_group_regex, index) endwhile let ftindex = ftindex + len(ft_part_name) let ftindex = match( &filetype, '\w\+', ftindex ) endwhile " Convert the string to a List and sort it. let compl_list = sort(split(syn_list)) if &filetype == 'vim' let short_compl_list = [] for i in range(len(compl_list)) if i == len(compl_list)-1 let next = i else let next = i + 1 endif if compl_list[next] !~ '^'.compl_list[i].'.$' let short_compl_list += [compl_list[i]] endif endfor return short_compl_list else return compl_list endif endfunction function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full ) let syn_list = "" " From the full syntax listing, strip out the portion for the " request group. " Query: " \n - must begin with a newline " a:group_name - the group name we are interested in " \s\+xxx\s\+ - group names are always followed by xxx " \zs - start the match " .\{-} - everything ... " \ze - end the match " \( - start a group or 2 potential matches " \n\w - at the first newline starting with a character " \| - 2nd potential match " \%$ - matches end of the file or string " \) - end a group let syntax_group = matchstr(a:syntax_full, \ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze\(\n\w\|\%$\)' \ ) if syntax_group != "" " let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' ) " let syn_list = substitute( @l, '^.*xxx\s*', "", '' ) " We only want the words for the lines begining with " containedin, but there could be other items. " Tried to remove all lines that do not begin with contained " but this does not work in all cases since you can have " contained nextgroup=... " So this will strip off the ending of lines with known " keywords. let syn_list = substitute( \ syntax_group, '\<\('. \ substitute( \ escape(s:syn_remove_words, '\\/.*$^~[]') \ , ',', '\\|', 'g' \ ). \ '\).\{-}\%($\|'."\n".'\)' \ , "\n", 'g' \ ) " Now strip off the newline + blank space + contained. " Also include lines with nextgroup=@someName skip_key_words syntax_element let syn_list = substitute( \ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\|nextgroup=\)' \ , "", 'g' \ ) " This can leave lines like this " =@vimMenuList skipwhite onoremenu " Strip the special option keywords first " :h :syn-skipwhite* let syn_list = substitute( \ syn_list, '\<\(skipwhite\|skipnl\|skipempty\)\>' \ , "", 'g' \ ) " Now remove the remainder of the nextgroup=@someName lines let syn_list = substitute( \ syn_list, '\%(^\|\n\)\@<=\s*\(@\w\+\)' \ , "", 'g' \ ) if b:omni_syntax_use_iskeyword == 0 " There are a number of items which have non-word characters in " them, *'T_F1'*. vim.vim is one such file. " This will replace non-word characters with spaces. let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' ) else let accept_chars = ','.&iskeyword.',' " Remove all character ranges " let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g') let accept_chars = substitute(accept_chars, ',\@<=[^,]\+-[^,]\+,', '', 'g') " Remove all numeric specifications " let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g') let accept_chars = substitute(accept_chars, ',\@<=\d\{-},', '', 'g') " Remove all commas let accept_chars = substitute(accept_chars, ',', '', 'g') " Escape special regex characters let accept_chars = escape(accept_chars, '\\/.*$^~[]' ) " Remove all characters that are not acceptable let syn_list = substitute( syn_list, '[^0-9A-Za-z_ '.accept_chars.']', ' ', 'g' ) endif if b:omni_syntax_minimum_length > 0 " If the user specified a minimum length, enforce it let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.b:omni_syntax_minimum_length.'}\ze ', ' ', 'g') endif else let syn_list = '' endif return syn_list endfunction
zyz2011-vim
runtime/autoload/syntaxcomplete.vim
Vim Script
gpl2
17,783
" Vim completion script " Language: XML " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) " Last Change: 2006 Aug 15 " Version: 1.9 " " Changelog: " 1.9 - 2007 Aug 15 " - fix closing of namespaced tags (Johannes Weiss) " 1.8 - 2006 Jul 18 " - allow for closing of xml tags even when data file isn't available " This function will create Dictionary with users namespace strings and values " canonical (system) names of data files. Names should be lowercase, " descriptive to avoid any future conflicts. For example 'xhtml10s' should be " name for data of XHTML 1.0 Strict and 'xhtml10t' for XHTML 1.0 Transitional " User interface will be provided by XMLns command defined in ftplugin/xml.vim " Currently supported canonicals are: " xhtml10s - XHTML 1.0 Strict " xsl - XSL function! xmlcomplete#CreateConnection(canonical, ...) " {{{ " When only one argument provided treat name as default namespace (without " 'prefix:'). if exists("a:1") let users = a:1 else let users = 'DEFAULT' endif " Source data file. Due to suspected errors in autoload do it with " :runtime. " TODO: make it properly (using autoload, that is) later exe "runtime autoload/xml/".a:canonical.".vim" " Remove all traces of unexisting files to return [] when trying " omnicomplete something " TODO: give warning about non-existing canonicals - should it be? if !exists("g:xmldata_".a:canonical) unlet! g:xmldata_connection return 0 endif " We need to initialize Dictionary to add key-value pair if !exists("g:xmldata_connection") let g:xmldata_connection = {} endif let g:xmldata_connection[users] = a:canonical endfunction " }}} function! xmlcomplete#CreateEntConnection(...) " {{{ if a:0 > 0 let g:xmldata_entconnect = a:1 else let g:xmldata_entconnect = 'DEFAULT' endif endfunction " }}} function! xmlcomplete#CompleteTags(findstart, base) if a:findstart " locate the start of the word let curline = line('.') let line = getline('.') let start = col('.') - 1 let compl_begin = col('.') - 2 while start >= 0 && line[start - 1] =~ '\(\k\|[:.-]\)' let start -= 1 endwhile if start >= 0 && line[start - 1] =~ '&' let b:entitiescompl = 1 let b:compl_context = '' return start endif let b:compl_context = getline('.')[0:(compl_begin)] if b:compl_context !~ '<[^>]*$' " Look like we may have broken tag. Check previous lines. Up to " 10? let i = 1 while 1 let context_line = getline(curline-i) if context_line =~ '<[^>]*$' " Yep, this is this line let context_lines = getline(curline-i, curline-1) + [b:compl_context] let b:compl_context = join(context_lines, ' ') break elseif context_line =~ '>[^<]*$' || i == curline " Normal tag line, no need for completion at all " OR reached first line without tag at all let b:compl_context = '' break endif let i += 1 endwhile " Make sure we don't have counter unlet! i endif let b:compl_context = matchstr(b:compl_context, '.*\zs<.*') " Make sure we will have only current namespace unlet! b:xml_namespace let b:xml_namespace = matchstr(b:compl_context, '^<\zs\k*\ze:') if b:xml_namespace == '' let b:xml_namespace = 'DEFAULT' endif return start else " Initialize base return lists let res = [] let res2 = [] " a:base is very short - we need context if len(b:compl_context) == 0 && !exists("b:entitiescompl") return [] endif let context = matchstr(b:compl_context, '^<\zs.*') unlet! b:compl_context " There is no connection of namespace and data file. if !exists("g:xmldata_connection") || g:xmldata_connection == {} " There is still possibility we may do something - eg. close tag let b:unaryTagsStack = "base meta link hr br param img area input col" if context =~ '^\/' let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack") return [opentag.">"] else return [] endif endif " Make entities completion if exists("b:entitiescompl") unlet! b:entitiescompl if !exists("g:xmldata_entconnect") || g:xmldata_entconnect == 'DEFAULT' let values = g:xmldata{'_'.g:xmldata_connection['DEFAULT']}['vimxmlentities'] else let values = g:xmldata{'_'.g:xmldata_entconnect}['vimxmlentities'] endif " Get only lines with entity declarations but throw out " parameter-entities - they may be completed in future let entdecl = filter(getline(1, "$"), 'v:val =~ "<!ENTITY\\s\\+[^%]"') if len(entdecl) > 0 let intent = map(copy(entdecl), 'matchstr(v:val, "<!ENTITY\\s\\+\\zs\\(\\k\\|[.-:]\\)\\+\\ze")') let values = intent + values endif if len(a:base) == 1 for m in values if m =~ '^'.a:base call add(res, m.';') endif endfor return res else for m in values if m =~? '^'.a:base call add(res, m.';') elseif m =~? a:base call add(res2, m.';') endif endfor return res + res2 endif endif if context =~ '>' " Generally if context contains > it means we are outside of tag and " should abandon action return [] endif " find tags matching with "a:base" " If a:base contains white space it is attribute. " It could be also value of attribute... " We have to get first word to offer " proper completions if context == '' let tag = '' else let tag = split(context)[0] endif " Get rid of namespace let tag = substitute(tag, '^'.b:xml_namespace.':', '', '') " Get last word, it should be attr name let attr = matchstr(context, '.*\s\zs.*') " Possible situations where any prediction would be difficult: " 1. Events attributes if context =~ '\s' " If attr contains =\s*[\"'] we catched value of attribute if attr =~ "=\s*[\"']" || attr =~ "=\s*$" " Let do attribute specific completion let attrname = matchstr(attr, '.*\ze\s*=') let entered_value = matchstr(attr, ".*=\\s*[\"']\\?\\zs.*") if tag =~ '^[?!]' " Return nothing if we are inside of ! or ? tag return [] else if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, tag) && has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1], attrname) let values = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][attrname] else return [] endif endif if len(values) == 0 return [] endif " We need special version of sbase let attrbase = matchstr(context, ".*[\"']") let attrquote = matchstr(attrbase, '.$') if attrquote !~ "['\"]" let attrquoteopen = '"' let attrquote = '"' else let attrquoteopen = '' endif for m in values " This if is needed to not offer all completions as-is " alphabetically but sort them. Those beginning with entered " part will be as first choices if m =~ '^'.entered_value call add(res, attrquoteopen . m . attrquote.' ') elseif m =~ entered_value call add(res2, attrquoteopen . m . attrquote.' ') endif endfor return res + res2 endif if tag =~ '?xml' " Two possible arguments for <?xml> plus variation let attrs = ['encoding', 'version="1.0"', 'version'] elseif tag =~ '^!' " Don't make completion at all " return [] else if !has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, tag) " Abandon when data file isn't complete return [] endif let attrs = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1]) endif for m in sort(attrs) if m =~ '^'.attr call add(res, m) elseif m =~ attr call add(res2, m) endif endfor let menu = res + res2 let final_menu = [] if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, 'vimxmlattrinfo') for i in range(len(menu)) let item = menu[i] if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'], item) let m_menu = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'][item][0] let m_info = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'][item][1] else let m_menu = '' let m_info = '' endif if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$' let item = item else let item .= '="' endif let final_menu += [{'word':item, 'menu':m_menu, 'info':m_info}] endfor else for i in range(len(menu)) let item = menu[i] if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$' let item = item else let item .= '="' endif let final_menu += [item] endfor endif return final_menu endif " Close tag let b:unaryTagsStack = "base meta link hr br param img area input col" if context =~ '^\/' let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack") return [opentag.">"] endif " Complete elements of XML structure " TODO: #REQUIRED, #IMPLIED, #FIXED, #PCDATA - but these should be detected like " entities - in first run " keywords: CDATA, ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS " are hardly recognizable but keep it in reserve " also: EMPTY ANY SYSTEM PUBLIC DATA if context =~ '^!' let tags = ['!ELEMENT', '!DOCTYPE', '!ATTLIST', '!ENTITY', '!NOTATION', '![CDATA[', '![INCLUDE[', '![IGNORE['] for m in tags if m =~ '^'.context let m = substitute(m, '^!\[\?', '', '') call add(res, m) elseif m =~ context let m = substitute(m, '^!\[\?', '', '') call add(res2, m) endif endfor return res + res2 endif " Complete text declaration if context =~ '^?' let tags = ['?xml'] for m in tags if m =~ '^'.context call add(res, substitute(m, '^?', '', '')) elseif m =~ context call add(res, substitute(m, '^?', '', '')) endif endfor return res + res2 endif " Deal with tag completion. let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack") let opentag = substitute(opentag, '^\k*:', '', '') if opentag == '' "return [] let tags = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}) call filter(tags, 'v:val !~ "^vimxml"') else if !has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, opentag) " Abandon when data file isn't complete return [] endif let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0] endif let context = substitute(context, '^\k*:', '', '') for m in tags if m =~ '^'.context call add(res, m) elseif m =~ context call add(res2, m) endif endfor let menu = res + res2 if b:xml_namespace == 'DEFAULT' let xml_namespace = '' else let xml_namespace = b:xml_namespace.':' endif if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, 'vimxmltaginfo') let final_menu = [] for i in range(len(menu)) let item = menu[i] if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'], item) let m_menu = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'][item][0] let m_info = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'][item][1] else let m_menu = '' let m_info = '' endif let final_menu += [{'word':xml_namespace.item, 'menu':m_menu, 'info':m_info}] endfor else let final_menu = map(menu, 'xml_namespace.v:val') endif return final_menu endif endfunction " MM: This is severely reduced closetag.vim used with kind permission of Steven " Mueller " Changes: strip all comments; delete error messages; add checking for " namespace " Author: Steven Mueller <diffusor@ugcs.caltech.edu> " Last Modified: Tue May 24 13:29:48 PDT 2005 " Version: 0.9.1 function! xmlcomplete#GetLastOpenTag(unaryTagsStack) let linenum=line('.') let lineend=col('.') - 1 " start: cursor position let first=1 " flag for first line searched let b:TagStack='' " main stack of tags let startInComment=s:InComment() if exists("b:xml_namespace") if b:xml_namespace == 'DEFAULT' let tagpat='</\=\(\k\|[.:-]\)\+\|/>' else let tagpat='</\='.b:xml_namespace.':\(\k\|[.-]\)\+\|/>' endif else let tagpat='</\=\(\k\|[.:-]\)\+\|/>' endif while (linenum>0) let line=getline(linenum) if first let line=strpart(line,0,lineend) else let lineend=strlen(line) endif let b:lineTagStack='' let mpos=0 let b:TagCol=0 while (mpos > -1) let mpos=matchend(line,tagpat) if mpos > -1 let b:TagCol=b:TagCol+mpos let tag=matchstr(line,tagpat) if exists('b:closetag_disable_synID') || startInComment==s:InCommentAt(linenum, b:TagCol) let b:TagLine=linenum call s:Push(matchstr(tag,'[^<>]\+'),'b:lineTagStack') endif let lineend=lineend-mpos let line=strpart(line,mpos,lineend) endif endwhile while (!s:EmptystackP('b:lineTagStack')) let tag=s:Pop('b:lineTagStack') if match(tag, '^/') == 0 "found end tag call s:Push(tag,'b:TagStack') elseif s:EmptystackP('b:TagStack') && !s:Instack(tag, a:unaryTagsStack) "found unclosed tag return tag else let endtag=s:Peekstack('b:TagStack') if endtag == '/'.tag || endtag == '/' call s:Pop('b:TagStack') "found a open/close tag pair elseif !s:Instack(tag, a:unaryTagsStack) "we have a mismatch error return '' endif endif endwhile let linenum=linenum-1 | let first=0 endwhile return '' endfunction function! s:InComment() return synIDattr(synID(line('.'), col('.'), 0), 'name') =~ 'Comment\|String' endfunction function! s:InCommentAt(line, col) return synIDattr(synID(a:line, a:col, 0), 'name') =~ 'Comment\|String' endfunction function! s:SetKeywords() let g:IsKeywordBak=&iskeyword let &iskeyword='33-255' endfunction function! s:RestoreKeywords() let &iskeyword=g:IsKeywordBak endfunction function! s:Push(el, sname) if !s:EmptystackP(a:sname) exe 'let '.a:sname."=a:el.' '.".a:sname else exe 'let '.a:sname.'=a:el' endif endfunction function! s:EmptystackP(sname) exe 'let stack='.a:sname if match(stack,'^ *$') == 0 return 1 else return 0 endif endfunction function! s:Instack(el, sname) exe 'let stack='.a:sname call s:SetKeywords() let m=match(stack, '\<'.a:el.'\>') call s:RestoreKeywords() if m < 0 return 0 else return 1 endif endfunction function! s:Peekstack(sname) call s:SetKeywords() exe 'let stack='.a:sname let top=matchstr(stack, '\<.\{-1,}\>') call s:RestoreKeywords() return top endfunction function! s:Pop(sname) if s:EmptystackP(a:sname) return '' endif exe 'let stack='.a:sname call s:SetKeywords() let loc=matchend(stack,'\<.\{-1,}\>') exe 'let '.a:sname.'=strpart(stack, loc+1, strlen(stack))' let top=strpart(stack, match(stack, '\<'), loc) call s:RestoreKeywords() return top endfunction function! s:Clearstack(sname) exe 'let '.a:sname."=''" endfunction " vim:set foldmethod=marker:
zyz2011-vim
runtime/autoload/xmlcomplete.vim
Vim Script
gpl2
14,933
" vimball.vim : construct a file containing both paths and files " Author: Charles E. Campbell, Jr. " Date: Jan 17, 2012 " Version: 35 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " Copyright: (c) 2004-2011 by Charles E. Campbell, Jr. " The VIM LICENSE applies to Vimball.vim, and Vimball.txt " (see |copyright|) except use "Vimball" instead of "Vim". " No warranty, express or implied. " *** *** Use At-Your-Own-Risk! *** *** " --------------------------------------------------------------------- " Load Once: {{{1 if &cp || exists("g:loaded_vimball") finish endif let g:loaded_vimball = "v35" if v:version < 702 echohl WarningMsg echo "***warning*** this version of vimball needs vim 7.2" echohl Normal finish endif let s:keepcpo= &cpo set cpo&vim "DechoTabOn " ===================================================================== " Constants: {{{1 if !exists("s:USAGE") let s:USAGE = 0 let s:WARNING = 1 let s:ERROR = 2 " determine if cygwin is in use or not if !exists("g:netrw_cygwin") if has("win32") || has("win95") || has("win64") || has("win16") if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$' let g:netrw_cygwin= 1 else let g:netrw_cygwin= 0 endif else let g:netrw_cygwin= 0 endif endif " set up g:vimball_mkdir if the mkdir() call isn't defined if !exists("*mkdir") if exists("g:netrw_local_mkdir") let g:vimball_mkdir= g:netrw_local_mkdir elseif executable("mkdir") let g:vimball_mkdir= "mkdir" elseif executable("makedir") let g:vimball_mkdir= "makedir" endif if !exists(g:vimball_mkdir) call vimball#ShowMesg(s:WARNING,"(vimball) g:vimball_mkdir undefined") endif endif endif " ===================================================================== " Functions: {{{1 " --------------------------------------------------------------------- " vimball#MkVimball: creates a vimball given a list of paths to files {{{2 " Input: " line1,line2: a range of lines containing paths to files to be included in the vimball " writelevel : if true, force a write to filename.vmb, even if it exists " (usually accomplished with :MkVimball! ... " filename : base name of file to be created (ie. filename.vmb) " Output: a filename.vmb using vimball format: " path " filesize " [file] " path " filesize " [file] fun! vimball#MkVimball(line1,line2,writelevel,...) range " call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0) if a:1 =~ '\.vim$' || a:1 =~ '\.txt$' let vbname= substitute(a:1,'\.\a\{3}$','.vmb','') else let vbname= a:1 endif if vbname !~ '\.vmb$' let vbname= vbname.'.vmb' endif " call Decho("vbname<".vbname.">") if !a:writelevel && a:1 =~ '[\/]' call vimball#ShowMesg(s:ERROR,"(MkVimball) vimball name<".a:1."> should not include slashes; use ! to insist") " call Dret("MkVimball : vimball name<".a:1."> should not include slashes") return endif if !a:writelevel && filereadable(vbname) call vimball#ShowMesg(s:ERROR,"(MkVimball) file<".vbname."> exists; use ! to insist") " call Dret("MkVimball : file<".vbname."> already exists; use ! to insist") return endif " user option bypass call vimball#SaveSettings() if a:0 >= 2 " allow user to specify where to get the files let home= expand(a:2) else " use first existing directory from rtp let home= vimball#VimballHome() endif " save current directory let curdir = getcwd() call s:ChgDir(home) " record current tab, initialize while loop index let curtabnr = tabpagenr() let linenr = a:line1 " call Decho("curtabnr=".curtabnr) while linenr <= a:line2 let svfile = getline(linenr) " call Decho("svfile<".svfile.">") if !filereadable(svfile) call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">") call s:ChgDir(curdir) call vimball#RestoreSettings() " call Dret("MkVimball") return endif " create/switch to mkvimball tab if !exists("vbtabnr") tabnew sil! file Vimball let vbtabnr= tabpagenr() else exe "tabn ".vbtabnr endif let lastline= line("$") + 1 if lastline == 2 && getline("$") == "" call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.') call setline(2,'UseVimball') call setline(3,'finish') let lastline= line("$") + 1 endif call setline(lastline ,substitute(svfile,'$',' [[[1','')) call setline(lastline+1,0) " write the file from the tab " call Decho("exe $r ".fnameescape(svfile)) exe "$r ".fnameescape(svfile) call setline(lastline+1,line("$") - lastline - 1) " call Decho("lastline=".lastline." line$=".line("$")) " restore to normal tab exe "tabn ".curtabnr let linenr= linenr + 1 endwhile " write the vimball exe "tabn ".vbtabnr call s:ChgDir(curdir) setlocal ff=unix if a:writelevel " call Decho("exe w! ".fnameescape(vbname)) exe "w! ".fnameescape(vbname) else " call Decho("exe w ".fnameescape(vbname)) exe "w ".fnameescape(vbname) endif " call Decho("Vimball<".vbname."> created") echo "Vimball<".vbname."> created" " remove the evidence setlocal nomod bh=wipe exe "tabn ".curtabnr exe "tabc ".vbtabnr " restore options call vimball#RestoreSettings() " call Dret("MkVimball") endfun " --------------------------------------------------------------------- " vimball#Vimball: extract and distribute contents from a vimball {{{2 " (invoked the the UseVimball command embedded in " vimballs' prologue) fun! vimball#Vimball(really,...) " call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0) if v:version < 701 || (v:version == 701 && !exists('*fnameescape')) echoerr "your vim is missing the fnameescape() function (pls upgrade to vim 7.2 or later)" " call Dret("vimball#Vimball : needs 7.1 with patch 299 or later") return endif if getline(1) !~ '^" Vimball Archiver' echoerr "(Vimball) The current file does not appear to be a Vimball!" " call Dret("vimball#Vimball") return endif " set up standard settings call vimball#SaveSettings() let curtabnr = tabpagenr() let vimballfile = expand("%:tr") " set up vimball tab " call Decho("setting up vimball tab") tabnew sil! file Vimball let vbtabnr= tabpagenr() let didhelp= "" " go to vim plugin home if a:0 > 0 " let user specify the directory where the vimball is to be unpacked. " If, however, the user did not specify a full path, set the home to be below the current directory let home= expand(a:1) if has("win32") || has("win95") || has("win64") || has("win16") if home !~ '^\a:[/\\]' let home= getcwd().'/'.a:1 endif elseif home !~ '^/' let home= getcwd().'/'.a:1 endif else let home= vimball#VimballHome() endif " call Decho("home<".home.">") " save current directory and remove older same-named vimball, if any let curdir = getcwd() " call Decho("home<".home.">") " call Decho("curdir<".curdir.">") call s:ChgDir(home) let s:ok_unablefind= 1 call vimball#RmVimball(vimballfile) unlet s:ok_unablefind let linenr = 4 let filecnt = 0 " give title to listing of (extracted) files from Vimball Archive if a:really echohl Title | echomsg "Vimball Archive" | echohl None else echohl Title | echomsg "Vimball Archive Listing" | echohl None echohl Statement | echomsg "files would be placed under: ".home | echohl None endif " apportion vimball contents to various files " call Decho("exe tabn ".curtabnr) exe "tabn ".curtabnr " call Decho("linenr=".linenr." line$=".line("$")) while 1 < linenr && linenr < line("$") let fname = substitute(getline(linenr),'\t\[\[\[1$','','') let fname = substitute(fname,'\\','/','g') let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0 let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','') let filecnt = filecnt + 1 " call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc) if a:really echomsg "extracted <".fname.">: ".fsize." lines" else echomsg "would extract <".fname.">: ".fsize." lines" endif " call Decho("using L#".linenr.": will extract file<".fname.">") " call Decho("using L#".(linenr+1).": fsize=".fsize) " Allow AsNeeded/ directory to take place of plugin/ directory " when AsNeeded/filename is filereadable or was present in VimballRecord if fname =~ '\<plugin/' let anfname= substitute(fname,'\<plugin/','AsNeeded/','') if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~ anfname) " call Decho("using anfname<".anfname."> instead of <".fname.">") let fname= anfname endif endif " make directories if they don't exist yet if a:really " call Decho("making directories if they don't exist yet (fname<".fname.">)") let fnamebuf= substitute(fname,'\\','/','g') let dirpath = substitute(home,'\\','/','g') " call Decho("init: fnamebuf<".fnamebuf.">") " call Decho("init: dirpath <".dirpath.">") while fnamebuf =~ '/' let dirname = dirpath."/".substitute(fnamebuf,'/.*$','','') let dirpath = dirname let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','') " call Decho("dirname<".dirname.">") " call Decho("dirpath<".dirpath.">") if !isdirectory(dirname) " call Decho("making <".dirname.">") if exists("g:vimball_mkdir") call system(g:vimball_mkdir." ".shellescape(dirname)) else call mkdir(dirname) endif call s:RecordInVar(home,"rmdir('".dirname."')") endif endwhile endif call s:ChgDir(home) " grab specified qty of lines and place into "a" buffer " (skip over path/filename and qty-lines) let linenr = linenr + 2 let lastline = linenr + fsize - 1 " call Decho("exe ".linenr.",".lastline."yank a") " no point in handling a zero-length file if lastline >= linenr exe "silent ".linenr.",".lastline."yank a" " copy "a" buffer into tab " call Decho('copy "a buffer into tab#'.vbtabnr) exe "tabn ".vbtabnr setlocal ma sil! %d silent put a 1 sil! d " write tab to file if a:really let fnamepath= home."/".fname " call Decho("exe w! ".fnameescape(fnamepath)) if fenc != "" exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath) else exe "silent w! ".fnameescape(fnamepath) endif echo "wrote ".fnameescape(fnamepath) call s:RecordInVar(home,"call delete('".fnamepath."')") endif " return to tab with vimball " call Decho("exe tabn ".curtabnr) exe "tabn ".curtabnr " set up help if its a doc/*.txt file " call Decho("didhelp<".didhelp."> fname<".fname.">") if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$' let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','') " call Decho("didhelp<".didhelp.">") endif endif " update for next file " call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize)) let linenr= linenr + fsize endwhile " set up help " call Decho("about to set up help: didhelp<".didhelp.">") if didhelp != "" let htpath= home."/".didhelp " call Decho("exe helptags ".htpath) exe "helptags ".fnameescape(htpath) echo "did helptags" endif " make sure a "Press ENTER..." prompt appears to keep the messages showing! while filecnt <= &ch echomsg " " let filecnt= filecnt + 1 endwhile " record actions in <.VimballRecord> call s:RecordInFile(home) " restore events, delete tab and buffer exe "tabn ".vbtabnr setlocal nomod bh=wipe exe "tabn ".curtabnr exe "tabc ".vbtabnr call vimball#RestoreSettings() call s:ChgDir(curdir) " call Dret("vimball#Vimball") endfun " --------------------------------------------------------------------- " vimball#RmVimball: remove any files, remove any directories made by any {{{2 " previous vimball extraction based on a file of the current " name. " Usage: RmVimball (assume current file is a vimball; remove) " RmVimball vimballname fun! vimball#RmVimball(...) " call Dfunc("vimball#RmVimball() a:0=".a:0) if exists("g:vimball_norecord") " call Dret("vimball#RmVimball : (g:vimball_norecord)") return endif if a:0 == 0 let curfile= expand("%:tr") " call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))") else if a:1 =~ '[\/]' call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]") " call Dret("vimball#RmVimball : suspect a:1<".a:1.">") return endif let curfile= a:1 " call Decho("case a:0=".a:0.": curfile<".curfile.">") endif if curfile =~ '\.vmb$' let curfile= substitute(curfile,'\.vmb','','') elseif curfile =~ '\.vba$' let curfile= substitute(curfile,'\.vba','','') endif if a:0 >= 2 let home= expand(a:2) else let home= vimball#VimballHome() endif let curdir = getcwd() " call Decho("home <".home.">") " call Decho("curfile<".curfile.">") " call Decho("curdir <".curdir.">") call s:ChgDir(home) if filereadable(".VimballRecord") " call Decho(".VimballRecord is readable") " call Decho("curfile<".curfile.">") keepalt keepjumps 1split sil! keepalt keepjumps e .VimballRecord let keepsrch= @/ " call Decho('search for ^\M'.curfile.'.\m: ') " call Decho('search for ^\M'.curfile.'.\m{vba|vmb}: ') " call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.{vba|vmb}: ') if search('^\M'.curfile."\m: ".'cw') let foundit= 1 elseif search('^\M'.curfile.".\mvmb: ",'cw') let foundit= 2 elseif search('^\M'.curfile.'\m[-0-9.]*\.vmb: ','cw') let foundit= 2 elseif search('^\M'.curfile.".\mvba: ",'cw') let foundit= 1 elseif search('^\M'.curfile.'\m[-0-9.]*\.vba: ','cw') let foundit= 1 else let foundit = 0 endif if foundit if foundit == 1 let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','') else let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','') endif let s:VBRstring= substitute(exestring,'call delete(','','g') let s:VBRstring= substitute(s:VBRstring,"[')]",'','g') " call Decho("exe ".exestring) sil! keepalt keepjumps exe exestring sil! keepalt keepjumps d let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g")) " call Decho("exestring<".exestring.">") echomsg "removed ".exestring." files" else let s:VBRstring= '' let curfile = substitute(curfile,'\.vmb','','') " call Decho("unable to find <".curfile."> in .VimballRecord") if !exists("s:ok_unablefind") call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord") endif endif sil! keepalt keepjumps g/^\s*$/d sil! keepalt keepjumps wq! let @/= keepsrch endif call s:ChgDir(curdir) " call Dret("vimball#RmVimball") endfun " --------------------------------------------------------------------- " vimball#Decompress: attempts to automatically decompress vimballs {{{2 fun! vimball#Decompress(fname,...) " call Dfunc("Decompress(fname<".a:fname.">) a:0=".a:0) " decompression: if expand("%") =~ '.*\.gz' && executable("gunzip") " handle *.gz with gunzip silent exe "!gunzip ".shellescape(a:fname) if v:shell_error != 0 call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">") endif let fname= substitute(a:fname,'\.gz$','','') exe "e ".escape(fname,' \') if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.gz' && executable("gzip") " handle *.gz with gzip -d silent exe "!gzip -d ".shellescape(a:fname) if v:shell_error != 0 call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">") endif let fname= substitute(a:fname,'\.gz$','','') exe "e ".escape(fname,' \') if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.bz2' && executable("bunzip2") " handle *.bz2 with bunzip2 silent exe "!bunzip2 ".shellescape(a:fname) if v:shell_error != 0 call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">") endif let fname= substitute(a:fname,'\.bz2$','','') exe "e ".escape(fname,' \') if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.bz2' && executable("bzip2") " handle *.bz2 with bzip2 -d silent exe "!bzip2 -d ".shellescape(a:fname) if v:shell_error != 0 call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">") endif let fname= substitute(a:fname,'\.bz2$','','') exe "e ".escape(fname,' \') if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.zip' && executable("unzip") " handle *.zip with unzip silent exe "!unzip ".shellescape(a:fname) if v:shell_error != 0 call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">") endif let fname= substitute(a:fname,'\.zip$','','') exe "e ".escape(fname,' \') if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif endif if a:0 == 0| setlocal noma bt=nofile fmr=[[[,]]] fdm=marker | endif " call Dret("Decompress") endfun " --------------------------------------------------------------------- " vimball#ShowMesg: {{{2 fun! vimball#ShowMesg(level,msg) " call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)") let rulerkeep = &ruler let showcmdkeep = &showcmd set noruler noshowcmd redraw! if &fo =~ '[ta]' echomsg "***vimball*** ".a:msg else if a:level == s:WARNING || a:level == s:USAGE echohl WarningMsg elseif a:level == s:ERROR echohl Error endif echomsg "***vimball*** ".a:msg echohl None endif if a:level != s:USAGE call inputsave()|let ok= input("Press <cr> to continue")|call inputrestore() endif let &ruler = rulerkeep let &showcmd = showcmdkeep " call Dret("vimball#ShowMesg") endfun " ===================================================================== " s:ChgDir: change directory (in spite of Windoze) {{{2 fun! s:ChgDir(newdir) " call Dfunc("ChgDir(newdir<".a:newdir.">)") if (has("win32") || has("win95") || has("win64") || has("win16")) try exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g')) catch /^Vim\%((\a\+)\)\=:E/ call mkdir(fnameescape(substitute(a:newdir,'/','\\','g'))) exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g')) endtry else try exe 'silent cd '.fnameescape(a:newdir) catch /^Vim\%((\a\+)\)\=:E/ call mkdir(fnameescape(a:newdir)) exe 'silent cd '.fnameescape(a:newdir) endtry endif " call Dret("ChgDir : curdir<".getcwd().">") endfun " --------------------------------------------------------------------- " s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2 fun! s:RecordInVar(home,cmd) " call Dfunc("RecordInVar(home<".a:home."> cmd<".a:cmd.">)") if a:cmd =~ '^rmdir' " if !exists("s:recorddir") " let s:recorddir= substitute(a:cmd,'^rmdir',"call s:Rmdir",'') " else " let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'') " endif elseif !exists("s:recordfile") let s:recordfile= a:cmd else let s:recordfile= s:recordfile."|".a:cmd endif " call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">") endfun " --------------------------------------------------------------------- " s:RecordInFile: {{{2 fun! s:RecordInFile(home) " call Dfunc("s:RecordInFile()") if exists("g:vimball_norecord") " call Dret("s:RecordInFile : g:vimball_norecord") return endif if exists("s:recordfile") || exists("s:recorddir") let curdir= getcwd() call s:ChgDir(a:home) keepalt keepjumps 1split let cmd= expand("%:tr").": " " call Decho("cmd<".cmd.">") sil! keepalt keepjumps e .VimballRecord setlocal ma $ if exists("s:recordfile") && exists("s:recorddir") let cmd= cmd.s:recordfile."|".s:recorddir elseif exists("s:recorddir") let cmd= cmd.s:recorddir elseif exists("s:recordfile") let cmd= cmd.s:recordfile else " call Dret("s:RecordInFile : neither recordfile nor recorddir exist") return endif " call Decho("cmd<".cmd.">") " put command into buffer, write .VimballRecord `file keepalt keepjumps put=cmd sil! keepalt keepjumps g/^\s*$/d sil! keepalt keepjumps wq! call s:ChgDir(curdir) if exists("s:recorddir") " call Decho("unlet s:recorddir<".s:recorddir.">") unlet s:recorddir endif if exists("s:recordfile") " call Decho("unlet s:recordfile<".s:recordfile.">") unlet s:recordfile endif else " call Decho("s:record[file|dir] doesn't exist") endif " call Dret("s:RecordInFile") endfun " --------------------------------------------------------------------- " vimball#VimballHome: determine/get home directory path (usually from rtp) {{{2 fun! vimball#VimballHome() " call Dfunc("vimball#VimballHome()") if exists("g:vimball_home") let home= g:vimball_home else " go to vim plugin home for home in split(&rtp,',') + [''] if isdirectory(home) && filewritable(home) | break | endif let basehome= substitute(home,'[/\\]\.vim$','','') if isdirectory(basehome) && filewritable(basehome) let home= basehome."/.vim" break endif endfor if home == "" " just pick the first directory let home= substitute(&rtp,',.*$','','') endif if (has("win32") || has("win95") || has("win64") || has("win16")) let home= substitute(home,'/','\\','g') endif endif " insure that the home directory exists " call Decho("picked home<".home.">") if !isdirectory(home) if exists("g:vimball_mkdir") " call Decho("home<".home."> isn't a directory -- making it now with g:vimball_mkdir<".g:vimball_mkdir.">") " call Decho("system(".g:vimball_mkdir." ".shellescape(home).")") call system(g:vimball_mkdir." ".shellescape(home)) else " call Decho("home<".home."> isn't a directory -- making it now with mkdir()") call mkdir(home) endif endif " call Dret("vimball#VimballHome <".home.">") return home endfun " --------------------------------------------------------------------- " vimball#SaveSettings: {{{2 fun! vimball#SaveSettings() " call Dfunc("SaveSettings()") let s:makeep = getpos("'a") let s:regakeep= @a if exists("&acd") let s:acdkeep = &acd endif let s:eikeep = &ei let s:fenkeep = &l:fen let s:hidkeep = &hidden let s:ickeep = &ic let s:lzkeep = &lz let s:pmkeep = &pm let s:repkeep = &report let s:vekeep = &ve let s:ffkeep = &l:ff let s:swfkeep = &l:swf if exists("&acd") setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf else setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf endif " vimballs should be in unix format setlocal ff=unix " call Dret("SaveSettings") endfun " --------------------------------------------------------------------- " vimball#RestoreSettings: {{{2 fun! vimball#RestoreSettings() " call Dfunc("RestoreSettings()") let @a = s:regakeep if exists("&acd") let &acd = s:acdkeep endif let &l:fen = s:fenkeep let &hidden = s:hidkeep let &ic = s:ickeep let &lz = s:lzkeep let &pm = s:pmkeep let &report = s:repkeep let &ve = s:vekeep let &ei = s:eikeep let &l:ff = s:ffkeep if s:makeep[0] != 0 " restore mark a " call Decho("restore mark-a: makeep=".string(makeep)) call setpos("'a",s:makeep) endif if exists("&acd") unlet s:acdkeep endif unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep " call Dret("RestoreSettings") endfun let &cpo = s:keepcpo unlet s:keepcpo " --------------------------------------------------------------------- " Modelines: {{{1 " vim: fdm=marker
zyz2011-vim
runtime/autoload/vimball.vim
Vim Script
gpl2
24,333
" netrw.vim: Handles file transfer and remote directory listing across " AUTOLOAD SECTION " Date: Apr 05, 2012 " Version: 145 " Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 1999-2010 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, " netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided " *as is* and come with no warranty of any kind, either " expressed or implied. By using this plugin, you agree that " in no event will the copyright holder be liable for any damages " resulting from the use of this software. "redraw!|call DechoSep()|call inputsave()|call input("Press <cr> to continue")|call inputrestore() " " But be doers of the Word, and not only hearers, deluding your own selves {{{1 " (James 1:22 RSV) " =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- " Load Once: {{{1 if &cp || exists("g:loaded_netrw") finish endif let g:loaded_netrw = "v145" 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 " sanity checks if v:version < 700 call netrw#ErrorMsg(s:WARNING,"you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw",1) finish endif let s:keepcpo= &cpo set cpo&vim "DechoTabOn "call Decho("doing autoload/netrw.vim version ".g:loaded_netrw) " ====================== " Netrw Variables: {{{1 " ====================== " --------------------------------------------------------------------- " netrw#ErrorMsg: {{{2 " 0=note = s:NOTE " 1=warning = s:WARNING " 2=error = s:ERROR " Apr 05, 2012 : max errnum currently is 88 fun! netrw#ErrorMsg(level,msg,errnum) " call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow) if a:level < g:netrw_errorlvl call Dret("netrw#ErrorMsg : suppressing level=".a:level." since g;netrw_errorlvl=".g:netrw_errorlvl) return endif if a:level == 1 let level= "**warning** (netrw) " elseif a:level == 2 let level= "**error** (netrw) " else let level= "**note** (netrw) " endif " call Decho("level=".level) if g:netrw_use_errorwindow " (default) netrw creates a one-line window to show error/warning " messages (reliably displayed) " record current window number for NetrwRestorePosn()'s benefit let s:winBeforeErr= winnr() " call Decho("s:winBeforeErr=".s:winBeforeErr) " getting messages out reliably is just plain difficult! " This attempt splits the current window, creating a one line window. if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0 " call Decho("write to NetrwMessage buffer") exe bufwinnr("NetrwMessage")."wincmd w" " call Decho("setl ma noro") setl ma noro keepj call setline(line("$")+1,level.a:msg) keepj $ else " call Decho("create a NetrwMessage buffer window") bo 1split sil! call s:NetrwEnew() sil! keepj call s:NetrwSafeOptions() setl bt=nofile keepj file NetrwMessage " call Decho("setlocal ma noro") setl ma noro call setline(line("$"),level.a:msg) endif " call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr()) if &fo !~ '[ta]' syn clear syn match netrwMesgNote "^\*\*note\*\*" syn match netrwMesgWarning "^\*\*warning\*\*" syn match netrwMesgError "^\*\*error\*\*" hi link netrwMesgWarning WarningMsg hi link netrwMesgError Error endif " call Decho("(ErrorMsg) setl noma ro bh=wipe") setl noma ro bh=wipe else " (optional) netrw will show messages using echomsg. Even if the " message doesn't appear, at least it'll be recallable via :messages " redraw! if a:level == s:WARNING echohl WarningMsg elseif a:level == s:ERROR echohl Error endif echomsg level.a:msg " call Decho("echomsg ***netrw*** ".a:msg) echohl None endif " call Dret("netrw#ErrorMsg") endfun " --------------------------------------------------------------------- " 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 call s:NetrwInit("g:netrw_dirhist_cnt",0) if !exists("s:LONGLIST") 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 call s:NetrwInit("g:netrw_use_errorwindow",1) 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") let g:netrw_fetch_cmd = "fetch -o" else let g:netrw_fetch_cmd = "" endif endif if !exists("g:netrw_ftp_cmd") let g:netrw_ftp_cmd = "ftp" endif let s:netrw_ftp_cmd= g:netrw_ftp_cmd if !exists("g:netrw_ftp_options") let g:netrw_ftp_options= "-i -n" endif if !exists("g:netrw_http_cmd") if executable("elinks") let g:netrw_http_cmd = "elinks" call s:NetrwInit("g:netrw_http_xcmd","-source >") elseif executable("links") let g:netrw_http_cmd = "links" call s:NetrwInit("g:netrw_http_xcmd","-source >") elseif executable("curl") let g:netrw_http_cmd = "curl" call s:NetrwInit("g:netrw_http_xcmd","-o") elseif executable("wget") let g:netrw_http_cmd = "wget" call s:NetrwInit("g:netrw_http_xcmd","-q -O") elseif executable("fetch") let g:netrw_http_cmd = "fetch" call s:NetrwInit("g:netrw_http_xcmd","-o") else let g:netrw_http_cmd = "" endif 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") \ && g:netrw_use_nt_rcp \ && executable( $SystemRoot .'/system32/rcp.exe') let s:netrw_has_nt_rcp = 1 let s:netrw_rcpmode = '-b' else let s:netrw_has_nt_rcp = 0 let s:netrw_rcpmode = '' endif " --------------------------------------------------------------------- " Default values for netrw's global variables {{{2 " Cygwin Detection ------- {{{3 if !exists("g:netrw_cygwin") if has("win32") || has("win95") || has("win64") || has("win16") if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$' let g:netrw_cygwin= 1 else let g:netrw_cygwin= 0 endif else let g:netrw_cygwin= 0 endif endif " Default values - a-c ---------- {{{3 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_bufsettings" , "noma nomod nonu nobl nowrap ro") 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") && !exists("g:netrw_cursor") call netrw#ErrorMsg(s:NOTE,'g:netrw_cursorline is deprecated; use g:netrw_cursor instead',77) let g:netrw_cursor= g:netrw_cursorline endif call s:NetrwInit("g:netrw_cursor" , 2) let s:netrw_usercul = &cursorline let s:netrw_usercuc = &cursorcolumn " Default values - d-g ---------- {{{3 call s:NetrwInit("g:netrw_dirhist_cnt" , 0) call s:NetrwInit("g:netrw_decompress" , '{ ".gz" : "gunzip", ".bz2" : "bunzip2", ".zip" : "unzip", ".tar" : "tar -xf", ".xz" : "unxz" }') call s:NetrwInit("g:netrw_dirhistmax" , 10) call s:NetrwInit("g:netrw_errorlvl" , s:NOTE) 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" let g:netrw_ftp_timelist_cmd = "ls -tlF" let g:netrw_ftp_sizelist_cmd = "ls -slF" else let g:netrw_ftp_list_cmd = "dir" let g:netrw_ftp_timelist_cmd = "dir" let g:netrw_ftp_sizelist_cmd = "dir" endif endif call s:NetrwInit("g:netrw_ftpmode",'binary') " Default values - h-lh ---------- {{{3 call s:NetrwInit("g:netrw_hide",1) if !exists("g:netrw_ignorenetrc") if &shell =~ '\c\<\%(cmd\|4nt\)\.exe$' let g:netrw_ignorenetrc= 1 else let g:netrw_ignorenetrc= 0 endif 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 if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable("c:\\private.ppk") let g:netrw_scp_cmd ="pscp -i C:\\private.ppk" endif let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME:" elseif executable(g:netrw_ssh_cmd) " provide a default listing command let g:netrw_list_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME ls -FLa" else " call Decho(g:netrw_ssh_cmd." is not executable") let g:netrw_list_cmd= "" endif endif call s:NetrwInit("g:netrw_list_hide","") " Default values - lh-lz ---------- {{{3 if exists("g:netrw_local_copycmd") let g:netrw_localcopycmd= g:netrw_local_copycmd" call netrw#ErrorMsg(s:NOTE,"g:netrw_local_copycmd is deprecated in favor of g:netrw_localcopycmd",84) endif if !exists("g:netrw_localcopycmd") if has("win32") || has("win95") || has("win64") || has("win16") if g:netrw_cygwin let g:netrw_localcopycmd= "cp" else let g:netrw_localcopycmd= "copy" endif elseif has("unix") || has("macunix") let g:netrw_localcopycmd= "cp" else let g:netrw_localcopycmd= "" endif if !executable(g:netrw_localcopycmd) call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80) endif endif if exists("g:netrw_local_mkdir") let g:netrw_localmkdir= g:netrw_local_mkdir" call netrw#ErrorMsg(s:NOTE,"g:netrw_local_mkdir is deprecated in favor of g:netrw_localmkdir",87) endif call s:NetrwInit("g:netrw_localmkdir","mkdir") if !executable(g:netrw_localmkdir) call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) endif call s:NetrwInit("g:netrw_remote_mkdir","mkdir") if exists("g:netrw_local_movecmd") let g:netrw_localmovecmd= g:netrw_local_movecmd" call netrw#ErrorMsg(s:NOTE,"g:netrw_local_movecmd is deprecated in favor of g:netrw_localmovecmd",88) endif if !exists("g:netrw_localmovecmd") if has("win32") || has("win95") || has("win64") || has("win16") if g:netrw_cygwin let g:netrw_localmovecmd= "mv" else let g:netrw_localmovecmd= "move" endif elseif has("unix") || has("macunix") let g:netrw_localmovecmd= "mv" else let g:netrw_localmovecmd= "" endif if !executable(g:netrw_localmkdir) call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",81) endif endif call s:NetrwInit("g:netrw_localrmdir", "rmdir") if exists("g:netrw_local_rmdir") let g:netrw_localrmdir= g:netrw_local_rmdir" call netrw#ErrorMsg(s:NOTE,"g:netrw_local_rmdir is deprecated in favor of g:netrw_localrmdir",86) endif if !executable(g:netrw_localrmdir) call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localrmdir<".g:netrw_localrmdir."> to something that works",82) endif call s:NetrwInit("g:netrw_liststyle" , s:THINLIST) " sanity checks if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST 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 call s:NetrwInit("g:netrw_markfileesc" , '*./[\~') call s:NetrwInit("g:netrw_maxfilenamelen", 32) call s:NetrwInit("g:netrw_menu" , 1) call s:NetrwInit("g:netrw_mkdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mkdir") call s:NetrwInit("g:netrw_mousemaps" , (exists("&mouse") && &mouse =~ '[anh]')) call s:NetrwInit("g:netrw_retmap" , 0) if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin) call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME") elseif has("win32") || has("win95") || has("win64") || has("win16") call s:NetrwInit("g:netrw_chgperm" , "cacls FILENAME /e /p PERM") else call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME") endif call s:NetrwInit("g:netrw_preview" , 0) call s:NetrwInit("g:netrw_scpport" , "-P") call s:NetrwInit("g:netrw_sshport" , "-p") call s:NetrwInit("g:netrw_rename_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mv") call s:NetrwInit("g:netrw_rm_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rm") call s:NetrwInit("g:netrw_rmdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rmdir") call s:NetrwInit("g:netrw_rmf_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rm -f") " Default values - s ---------- {{{3 " g:netrw_sepchr: picking a character that doesn't appear in filenames that can be used to separate priority from filename call s:NetrwInit("g:netrw_sepchr" , (&enc == "euc-jp")? "\<Char-0x01>" : "\<Char-0xff>") call s:NetrwInit("s:netrw_silentxfer" , (exists("g:netrw_silent") && g:netrw_silent != 0)? "sil keepj " : "keepj ") call s:NetrwInit("g:netrw_sort_by" , "name") " alternatives: date , size call s:NetrwInit("g:netrw_sort_options" , "") call s:NetrwInit("g:netrw_sort_direction", "normal") " alternative: reverse (z y x ...) if !exists("g:netrw_sort_sequence") if has("unix") let g:netrw_sort_sequence= '[\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$' else let g:netrw_sort_sequence= '[\/]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$' endif endif call s:NetrwInit("g:netrw_special_syntax" , 0) call s:NetrwInit("g:netrw_ssh_browse_reject", '^total\s\+\d\+$') call s:NetrwInit("g:netrw_use_noswf" , 0) " Default values - t-w ---------- {{{3 call s:NetrwInit("g:netrw_timefmt","%c") call s:NetrwInit("g:netrw_xstrlen",0) call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.") call s:NetrwInit("g:netrw_win95ftp",1) call s:NetrwInit("g:netrw_winsize",50) if g:netrw_winsize == 0|let g:netrw_winsize= -1|endif if g:netrw_winsize > 100|let g:netrw_winsize= 100|endif " --------------------------------------------------------------------- " Default values for netrw's script variables: {{{2 call s:NetrwInit("g:netrw_fname_escape",' ?&;%') if has("win32") || has("win95") || has("win64") || has("win16") call s:NetrwInit("g:netrw_glob_escape",'[]*?`{$') else call s:NetrwInit("g:netrw_glob_escape",'[]*?`{~$\') endif call s:NetrwInit("g:netrw_menu_escape",'./&? \') call s:NetrwInit("g:netrw_tmpfile_escape",' &;') call s:NetrwInit("s:netrw_map_escape","<|\n\r\\\<C-V>\"") " BufEnter event ignored by decho when following variable is true " Has a side effect that doau BufReadPost doesn't work, so " files read by network transfer aren't appropriately highlighted. "let g:decho_bufenter = 1 "Decho " ====================== " Netrw Initialization: {{{1 " ====================== if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on") let s:initbeval = &beval " let s:initbexpr = &l:bexpr let &l:bexpr = "netrw#NetrwBalloonHelp()" set beval au BufWinEnter,WinEnter * if &ft == "netrw"|set beval|else|let &beval= s:initbeval|endif endif au WinEnter * if &ft == "netrw"|call s:NetrwInsureWinVars()|endif " ============================== " Netrw Utility Functions: {{{1 " ============================== " --------------------------------------------------------------------- " netrw#NetrwBalloonHelp: {{{2 if v:version >= 700 && has("balloon_eval") && &beval == 1 && has("syntax") && exists("g:syntax_on") fun! netrw#NetrwBalloonHelp() if !exists("w:netrw_bannercnt") || v:beval_lnum >= w:netrw_bannercnt || (exists("g:netrw_nobeval") && g:netrw_nobeval) let mesg= "" elseif v:beval_text == "Netrw" || v:beval_text == "Directory" || v:beval_text == "Listing" let mesg = "i: thin-long-wide-tree gh: quick hide/unhide of dot-files qf: quick file info %:open new file" elseif getline(v:beval_lnum) =~ '^"\s*/' let mesg = "<cr>: edit/enter o: edit/enter in horiz window t: edit/enter in new tab v:edit/enter in vert window" elseif v:beval_text == "Sorted" || v:beval_text == "by" let mesg = 's: sort by name, time, or file size r: reverse sorting order mt: mark target' elseif v:beval_text == "Sort" || v:beval_text == "sequence" let mesg = "S: edit sorting sequence" elseif v:beval_text == "Hiding" || v:beval_text == "Showing" let mesg = "a: hiding-showing-all ctrl-h: editing hiding list mh: hide/show by suffix" elseif v:beval_text == "Quick" || v:beval_text == "Help" let mesg = "Help: press <F1>" elseif v:beval_text == "Copy/Move" || v:beval_text == "Tgt" let mesg = "mt: mark target mc: copy marked file to target mm: move marked file to target" else let mesg= "" endif return mesg endfun endif " ------------------------------------------------------------------------ " s:NetrwOptionSave: save options and set to "standard" form {{{2 " 06/08/07 : removed call to NetrwSafeOptions(), either placed " immediately after NetrwOptionSave() calls in NetRead " and NetWrite, or after the s:NetrwEnew() call in " NetrwBrowse. " vt: normally its "w:" or "s:" (a variable type) fun! s:NetrwOptionSave(vt) " call Dfunc("s:NetrwOptionSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")) " call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist")) if !exists("{a:vt}netrw_optionsave") let {a:vt}netrw_optionsave= 1 else " call Dret("s:NetrwOptionSave : options already saved") return endif " call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff) " Save current settings and current directory " call Decho("saving current settings and current directory") let s:yykeep = @@ if exists("&l:acd")|let {a:vt}netrw_acdkeep = &l:acd|endif let {a:vt}netrw_aikeep = &l:ai let {a:vt}netrw_awkeep = &l:aw let {a:vt}netrw_bhkeep = &l:bh let {a:vt}netrw_blkeep = &l:bl let {a:vt}netrw_btkeep = &l:bt let {a:vt}netrw_bombkeep = &l:bomb let {a:vt}netrw_cikeep = &l:ci let {a:vt}netrw_cinkeep = &l:cin let {a:vt}netrw_cinokeep = &l:cino let {a:vt}netrw_comkeep = &l:com let {a:vt}netrw_cpokeep = &l:cpo let {a:vt}netrw_diffkeep = &l:diff let {a:vt}netrw_fenkeep = &l:fen let {a:vt}netrw_ffkeep = &l:ff let {a:vt}netrw_fokeep = &l:fo " formatoptions let {a:vt}netrw_gdkeep = &l:gd " gdefault let {a:vt}netrw_hidkeep = &l:hidden let {a:vt}netrw_imkeep = &l:im let {a:vt}netrw_iskkeep = &l:isk let {a:vt}netrw_lskeep = &l:ls let {a:vt}netrw_makeep = &l:ma let {a:vt}netrw_magickeep = &l:magic let {a:vt}netrw_modkeep = &l:mod let {a:vt}netrw_nukeep = &l:nu let {a:vt}netrw_repkeep = &l:report let {a:vt}netrw_rokeep = &l:ro let {a:vt}netrw_selkeep = &l:sel let {a:vt}netrw_spellkeep = &l:spell let {a:vt}netrw_tskeep = &l:ts let {a:vt}netrw_twkeep = &l:tw " textwidth let {a:vt}netrw_wigkeep = &l:wig " wildignore let {a:vt}netrw_wrapkeep = &l:wrap let {a:vt}netrw_writekeep = &l:write if g:netrw_use_noswf && has("win32") && !has("win95") let {a:vt}netrw_swfkeep = &l:swf endif " save a few selected netrw-related variables " call Decho("saving a few selected netrw-related variables") if g:netrw_keepdir let {a:vt}netrw_dirkeep = getcwd() endif if has("win32") && !has("win95") let {a:vt}netrw_swfkeep = &l:swf " swapfile endif if &go =~# 'a' | sil! let {a:vt}netrw_regstar = @* | endif sil! let {a:vt}netrw_regslash= @/ " call Dret("s:NetrwOptionSave : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) endfun " ------------------------------------------------------------------------ " s:NetrwOptionRestore: restore options {{{2 fun! s:NetrwOptionRestore(vt) " call Dfunc("s:NetrwOptionRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$")) if !exists("{a:vt}netrw_optionsave") if exists("s:nbcd_curpos_{bufnr('%')}") " call Decho("(NetrwOptionRestore) restoring previous position (s:nbcd_curpos_".bufnr('%')." exists)") keepj call netrw#NetrwRestorePosn(s:nbcd_curpos_{bufnr('%')}) " call Decho("(NetrwOptionRestore) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$")) " call Decho("(NetrwOptionRestore) unlet s:nbcd_curpos_".bufnr('%')) unlet s:nbcd_curpos_{bufnr('%')} else " call Decho("(NetrwOptionRestore) no previous position") endif " call Decho("(NetrwOptionRestore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist") return endif unlet {a:vt}netrw_optionsave if exists("&acd") if exists("{a:vt}netrw_acdkeep") " call Decho("(NetrwOptionRestore) g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) let curdir = getcwd() let &l:acd = {a:vt}netrw_acdkeep unlet {a:vt}netrw_acdkeep if &l:acd " call Decho("exe keepj lcd ".fnameescape(curdir)) " NOTE: was g:netrw_fname_escape for some reason try if !exists("&l:acd") && !&l:acd exe 'keepj lcd '.fnameescape(curdir) endif catch /^Vim\%((\a\+)\)\=:E472/ call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".curdir."> (permissions?)",61) endtry endif endif endif if exists("{a:vt}netrw_aikeep") |let &l:ai = {a:vt}netrw_aikeep |unlet {a:vt}netrw_aikeep |endif if exists("{a:vt}netrw_awkeep") |let &l:aw = {a:vt}netrw_awkeep |unlet {a:vt}netrw_awkeep |endif if exists("{a:vt}netrw_bhkeep") |let &l:bh = {a:vt}netrw_bhkeep |unlet {a:vt}netrw_bhkeep |endif if exists("{a:vt}netrw_blkeep") |let &l:bl = {a:vt}netrw_blkeep |unlet {a:vt}netrw_blkeep |endif if exists("{a:vt}netrw_btkeep") |let &l:bt = {a:vt}netrw_btkeep |unlet {a:vt}netrw_btkeep |endif if exists("{a:vt}netrw_bombkeep") |let &l:bomb = {a:vt}netrw_bombkeep |unlet {a:vt}netrw_bombkeep |endif if exists("{a:vt}netrw_cikeep") |let &l:ci = {a:vt}netrw_cikeep |unlet {a:vt}netrw_cikeep |endif if exists("{a:vt}netrw_cinkeep") |let &l:cin = {a:vt}netrw_cinkeep |unlet {a:vt}netrw_cinkeep |endif if exists("{a:vt}netrw_cinokeep") |let &l:cino = {a:vt}netrw_cinokeep |unlet {a:vt}netrw_cinokeep |endif if exists("{a:vt}netrw_comkeep") |let &l:com = {a:vt}netrw_comkeep |unlet {a:vt}netrw_comkeep |endif if exists("{a:vt}netrw_cpokeep") |let &l:cpo = {a:vt}netrw_cpokeep |unlet {a:vt}netrw_cpokeep |endif if exists("{a:vt}netrw_diffkeep") |let &l:diff = {a:vt}netrw_diffkeep |unlet {a:vt}netrw_diffkeep |endif if exists("{a:vt}netrw_fenkeep") |let &l:fen = {a:vt}netrw_fenkeep |unlet {a:vt}netrw_fenkeep |endif if exists("{a:vt}netrw_ffkeep") |let &l:ff = {a:vt}netrw_ffkeep |unlet {a:vt}netrw_ffkeep |endif if exists("{a:vt}netrw_fokeep") |let &l:fo = {a:vt}netrw_fokeep |unlet {a:vt}netrw_fokeep |endif if exists("{a:vt}netrw_gdkeep") |let &l:gd = {a:vt}netrw_gdkeep |unlet {a:vt}netrw_gdkeep |endif if exists("{a:vt}netrw_hidkeep") |let &l:hidden = {a:vt}netrw_hidkeep |unlet {a:vt}netrw_hidkeep |endif if exists("{a:vt}netrw_imkeep") |let &l:im = {a:vt}netrw_imkeep |unlet {a:vt}netrw_imkeep |endif if exists("{a:vt}netrw_iskkeep") |let &l:isk = {a:vt}netrw_iskkeep |unlet {a:vt}netrw_iskkeep |endif if exists("{a:vt}netrw_lskeep") |let &l:ls = {a:vt}netrw_lskeep |unlet {a:vt}netrw_lskeep |endif if exists("{a:vt}netrw_makeep") |let &l:ma = {a:vt}netrw_makeep |unlet {a:vt}netrw_makeep |endif if exists("{a:vt}netrw_magickeep")|let &l:magic = {a:vt}netrw_magickeep |unlet {a:vt}netrw_magickeep|endif if exists("{a:vt}netrw_modkeep") |let &l:mod = {a:vt}netrw_modkeep |unlet {a:vt}netrw_modkeep |endif if exists("{a:vt}netrw_nukeep") |let &l:nu = {a:vt}netrw_nukeep |unlet {a:vt}netrw_nukeep |endif if exists("{a:vt}netrw_repkeep") |let &l:report = {a:vt}netrw_repkeep |unlet {a:vt}netrw_repkeep |endif if exists("{a:vt}netrw_rokeep") |let &l:ro = {a:vt}netrw_rokeep |unlet {a:vt}netrw_rokeep |endif if exists("{a:vt}netrw_selkeep") |let &l:sel = {a:vt}netrw_selkeep |unlet {a:vt}netrw_selkeep |endif if exists("{a:vt}netrw_spellkeep")|let &l:spell = {a:vt}netrw_spellkeep |unlet {a:vt}netrw_spellkeep|endif if exists("{a:vt}netrw_tskeep") |let &l:ts = {a:vt}netrw_tskeep |unlet {a:vt}netrw_tskeep |endif if exists("{a:vt}netrw_twkeep") |let &l:tw = {a:vt}netrw_twkeep |unlet {a:vt}netrw_twkeep |endif if exists("{a:vt}netrw_wigkeep") |let &l:wig = {a:vt}netrw_wigkeep |unlet {a:vt}netrw_wigkeep |endif if exists("{a:vt}netrw_wrapkeep") |let &l:wrap = {a:vt}netrw_wrapkeep |unlet {a:vt}netrw_wrapkeep |endif if exists("{a:vt}netrw_writekeep")|let &l:write = {a:vt}netrw_writekeep |unlet {a:vt}netrw_writekeep|endif if exists("s:yykeep") |let @@ = s:yykeep |unlet s:yykeep |endif if exists("{a:vt}netrw_swfkeep") if &directory == "" " user hasn't specified a swapfile directory; " netrw will temporarily set the swapfile directory " to the current directory as returned by getcwd(). let &l:directory = getcwd() sil! let &l:swf = {a:vt}netrw_swfkeep setlocal directory= unlet {a:vt}netrw_swfkeep elseif &l:swf != {a:vt}netrw_swfkeep " following line causes a Press ENTER in windows -- can't seem to work around it!!! sil! let &l:swf= {a:vt}netrw_swfkeep unlet {a:vt}netrw_swfkeep endif endif if exists("{a:vt}netrw_dirkeep") && isdirectory({a:vt}netrw_dirkeep) && g:netrw_keepdir let dirkeep = substitute({a:vt}netrw_dirkeep,'\\','/','g') if exists("{a:vt}netrw_dirkeep") |exe "keepj lcd ".fnameescape(dirkeep)|unlet {a:vt}netrw_dirkeep |endif endif if exists("{a:vt}netrw_regstar") |sil! let @*= {a:vt}netrw_regstar |unlet {a:vt}netrw_regstar |endif if exists("{a:vt}netrw_regslash")|sil! let @/= {a:vt}netrw_regslash|unlet {a:vt}netrw_regslash|endif if exists("s:nbcd_curpos_{bufnr('%')}") " call Decho("(NetrwOptionRestore) restoring previous position (s:nbcd_curpos_".bufnr('%')." exists)") keepj call netrw#NetrwRestorePosn(s:nbcd_curpos_{bufnr('%')}) " call Decho("(NetrwOptionRestore) unlet s:nbcd_curpos_".bufnr('%')) unlet s:nbcd_curpos_{bufnr('%')} else " call Decho("no previous position") endif " call Decho("(NetrwOptionRestore) g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) " call Decho("(NetrwOptionRestore) fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist")) " call Decho("(NetrwOptionRestore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Decho("(NetrwOptionRestore) diff=".&l:diff." win#".winnr()." w:netrw_diffkeep=".(exists("w:netrw_diffkeep")? w:netrw_diffkeep : "doesn't exist")) " call Dret("s:NetrwOptionRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) endfun " --------------------------------------------------------------------- " s:NetrwSafeOptions: sets options to help netrw do its job {{{2 fun! s:NetrwSafeOptions() " call Dfunc("s:NetrwSafeOptions() win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%"))."> winnr($)=".winnr("$")) " call Decho("win#".winnr()."'s ft=".&ft) if exists("&acd") | setlocal noacd | endif setlocal noai setlocal noaw setlocal nobomb setlocal noci setlocal nocin setlocal cino= setlocal com= setlocal cpo-=a setlocal cpo-=A setlocal fo=nroql2 setlocal nohid setlocal noim setlocal isk+=@ isk+=* isk+=/ setlocal magic setlocal report=10000 setlocal sel=inclusive setlocal nospell setlocal tw=0 setlocal wig= if g:netrw_use_noswf && has("win32") && !has("win95") setlocal noswf endif call s:NetrwCursor() " allow the user to override safe options " call Decho("ft<".&ft."> ei=".&ei) if &ft == "netrw" " call Decho("do any netrw FileType autocmds") sil! keepalt keepj doau FileType netrw endif " call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist")) " call Dret("s:NetrwSafeOptions") endfun " --------------------------------------------------------------------- " netrw#NetrwClean: remove netrw {{{2 " supports :NetrwClean -- remove netrw from first directory on runtimepath " :NetrwClean! -- remove netrw from all directories on runtimepath fun! netrw#NetrwClean(sys) " call Dfunc("netrw#NetrwClean(sys=".a:sys.")") if a:sys let choice= confirm("Remove personal and system copies of netrw?","&Yes\n&No") else let choice= confirm("Remove personal copy of netrw?","&Yes\n&No") endif " call Decho("choice=".choice) let diddel= 0 let diddir= "" if choice == 1 for dir in split(&rtp,',') if filereadable(dir."/plugin/netrwPlugin.vim") " call Decho("removing netrw-related files from ".dir) if s:NetrwDelete(dir."/plugin/netrwPlugin.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55) |endif if s:NetrwDelete(dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif if s:NetrwDelete(dir."/autoload/netrwSettings.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55) |endif if s:NetrwDelete(dir."/autoload/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55) |endif if s:NetrwDelete(dir."/syntax/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55) |endif if s:NetrwDelete(dir."/syntax/netrwlist.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55) |endif let diddir= dir let diddel= diddel + 1 if !a:sys|break|endif endif endfor endif echohl WarningMsg if diddel == 0 echomsg "netrw is either not installed or not removable" elseif diddel == 1 echomsg "removed one copy of netrw from <".diddir.">" else echomsg "removed ".diddel." copies of netrw" endif echohl None " call Dret("netrw#NetrwClean") endfun " --------------------------------------------------------------------- " netrw#Nread: {{{2 fun! netrw#Nread(mode,fname) " call Dfunc("netrw#Nread(mode=".a:mode." fname<".a:fname.">)") call netrw#NetrwSavePosn() call netrw#NetRead(a:mode,a:fname) call netrw#NetrwRestorePosn() " call Dret("netrw#Nread") endfun " ------------------------------------------------------------------------ " Netrw Transfer Functions: {{{1 " =============================== " ------------------------------------------------------------------------ " netrw#NetRead: responsible for reading a file over the net {{{2 " mode: =0 read remote file and insert before current line " =1 read remote file and insert after current line " =2 replace with remote file " =3 obtain file, but leave in temporary format fun! netrw#NetRead(mode,...) " call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw) " NetRead: save options {{{3 call s:NetrwOptionSave("w:") call s:NetrwSafeOptions() call s:RestoreCursorline() " NetRead: interpret mode into a readcmd {{{3 if a:mode == 0 " read remote file before current line let readcmd = "0r" elseif a:mode == 1 " read file after current line let readcmd = "r" elseif a:mode == 2 " replace with remote file let readcmd = "%r" elseif a:mode == 3 " skip read of file (leave as temporary) let readcmd = "t" else exe a:mode let readcmd = "r" endif let ichoice = (a:0 == 0)? 0 : 1 " call Decho("readcmd<".readcmd."> ichoice=".ichoice) " NetRead: get temporary filename {{{3 let tmpfile= s:GetTempfile("") if tmpfile == "" " call Dret("netrw#NetRead : unable to get a tempfile!") return endif while ichoice <= a:0 " attempt to repeat with previous host-file-etc if exists("b:netrw_lastfile") && a:0 == 0 " call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">") let choice = b:netrw_lastfile let ichoice= ichoice + 1 else exe "let choice= a:" . ichoice " call Decho("no lastfile: choice<" . choice . ">") if match(choice,"?") == 0 " give help echomsg 'NetRead Usage:' echomsg ':Nread machine:path uses rcp' echomsg ':Nread "machine path" uses ftp with <.netrc>' echomsg ':Nread "machine id password path" uses ftp' echomsg ':Nread dav://machine[:port]/path uses cadaver' echomsg ':Nread fetch://machine/path uses fetch' echomsg ':Nread ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' echomsg ':Nread http://[user@]machine/path uses http wget' echomsg ':Nread rcp://[user@]machine/path uses rcp' echomsg ':Nread rsync://machine[:port]/path uses rsync' echomsg ':Nread scp://[user@]machine[[:#]port]/path uses scp' echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp' sleep 4 break elseif match(choice,'^"') != -1 " Reconstruct Choice if choice starts with '"' " call Decho("reconstructing choice") if match(choice,'"$') != -1 " case "..." let choice= strpart(choice,1,strlen(choice)-2) else " case "... ... ..." let choice = strpart(choice,1,strlen(choice)-1) let wholechoice = "" while match(choice,'"$') == -1 let wholechoice = wholechoice . " " . choice let ichoice = ichoice + 1 if ichoice > a:0 if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3) endif " call Dret("netrw#NetRead :2 getcwd<".getcwd().">") return endif let choice= a:{ichoice} endwhile let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) endif endif endif " call Decho("choice<" . choice . ">") let ichoice= ichoice + 1 " NetRead: Determine method of read (ftp, rcp, etc) {{{3 call s:NetrwMethod(choice) if !exists("b:netrw_method") || b:netrw_method < 0 " call Dfunc("netrw#NetRead : unsupported method") return endif let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix " Check if NetrwBrowse() should be handling this request " call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">") if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://' " call Decho("yes, choice matches '^.*[\/]$'") keepj call s:NetrwBrowse(0,choice) " call Dret("netrw#NetRead :3 getcwd<".getcwd().">") return endif " ============ " NetRead: Perform Protocol-Based Read {{{3 " =========================== if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 echo "(netrw) Processing your read request..." endif "......................................... " NetRead: (rcp) NetRead Method #1 {{{3 if b:netrw_method == 1 " read with rcp " call Decho("read via rcp (method #1)") " ER: nothing done with g:netrw_uid yet? " ER: on Win2K" rcp machine[.user]:file tmpfile " ER: if machine contains '.' adding .user is required (use $USERNAME) " ER: the tmpfile is full path: rcp sees C:\... as host C if s:netrw_has_nt_rcp == 1 if exists("g:netrw_uid") && ( g:netrw_uid != "" ) let uid_machine = g:netrw_machine .'.'. g:netrw_uid else " Any way needed it machine contains a '.' let uid_machine = g:netrw_machine .'.'. $USERNAME endif else if exists("g:netrw_uid") && ( g:netrw_uid != "" ) let uid_machine = g:netrw_uid .'@'. g:netrw_machine else let uid_machine = g:netrw_machine endif endif " call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... " NetRead: (ftp + <.netrc>) NetRead Method #2 {{{3 elseif b:netrw_method == 2 " read with ftp + <.netrc> " call Decho("read via ftp+.netrc (method #2)") let netrw_fname= b:netrw_fname keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars() let filtbuf= bufnr("%") setlocal ff=unix keepj put =g:netrw_ftpmode " call Decho("filter input: ".getline(line("$"))) if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline(line("$"))) endif call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile) " call Decho("filter input: ".getline(line("$"))) if exists("g:netrw_port") && g:netrw_port != "" " call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) else " call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' let debugkeep = &debug setlocal debug=msg keepj call netrw#ErrorMsg(s:ERROR,getline(1),4) let &debug = debugkeep endif call s:SaveBufVars() bd! if bufname("%") == "" && getline("$") == "" && line('$') == 1 " needed when one sources a file in a nolbl setting window via ftp q! endif call s:RestoreBufVars() let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... " NetRead: (ftp + machine,id,passwd,filename) NetRead Method #3 {{{3 elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname " Construct execution string (four lines) which will be passed through filter " call Decho("read via ftp+mipf (method #3)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) keepj call s:SaveBufVars()|new|keepj call s:RestoreBufVars() let filtbuf= bufnr("%") setlocal ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port " call Decho("filter input: ".getline('.')) else keepj put ='open '.g:netrw_machine " call Decho("filter input: ".getline('.')) endif if exists("g:netrw_uid" && g:netrw_uid != "" if exists("g:netrw_ftp") && g:netrw_ftp == 1 keepj put =g:netrw_uid " call Decho("filter input: ".getline('.')) if exists("s:netrw_passwd") keepj put ='\"'.s:netrw_passwd.'\"' endif " call Decho("filter input: ".getline('.')) elseif exists("s:netrw_passwd") keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' " call Decho("filter input: ".getline('.')) endif endif if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" keepj put =g:netrw_ftpmode " call Decho("filter input: ".getline('.')) endif if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('.')) endif keepj put ='get \"'.netrw_fname.'\" '.tmpfile " call Decho("filter input: ".getline('.')) " perform ftp: " -i : turns off interactive prompting from ftp " -n unix : DON'T use <.netrc>, even though it exists " -n win32: quit being obnoxious about password keepj norm! 1Gdd " call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" " call Decho("error<".getline(1).">") if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,getline(1),5) endif endif call s:SaveBufVars()|bd!|call s:RestoreBufVars() let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... " NetRead: (scp) NetRead Method #4 {{{3 elseif b:netrw_method == 4 " read with scp " call Decho("read via scp (method #4)") if exists("g:netrw_port") && g:netrw_port != "" let useport= " ".g:netrw_scpport." ".g:netrw_port else let useport= "" endif " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... " NetRead: (http) NetRead Method #5 (wget) {{{3 elseif b:netrw_method == 5 " call Decho("read via http (method #5)") if g:netrw_http_cmd == "" if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"neither the wget nor the fetch command is available",6) endif " call Dret("netrw#NetRead :4 getcwd<".getcwd().">") return endif if match(b:netrw_fname,"#") == -1 || exists("g:netrw_http_xcmd") " using g:netrw_http_cmd (usually elinks, links, curl, wget, or fetch) " call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)") if exists("g:netrw_http_xcmd") " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)) exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1) else " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)) exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1) endif let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) else " wget/curl/fetch plus a jump to an in-page marker (ie. http://abc/def.html#aMarker) " call Decho("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)") let netrw_html= substitute(b:netrw_fname,"#.*$","","") let netrw_tag = substitute(b:netrw_fname,"^.*#","","") " call Decho("netrw_html<".netrw_html.">") " call Decho("netrw_tag <".netrw_tag.">") " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1)) exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1) let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) " call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/') exe 'keepj norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>" endif let b:netrw_lastfile = choice " call Decho("(NetRead) setl ro") setl ro "......................................... " NetRead: (dav) NetRead Method #6 {{{3 elseif b:netrw_method == 6 " call Decho("read via cadaver (method #6)") if !executable(g:netrw_dav_cmd) call netrw#ErrorMsg(s:ERROR,g:netrw_dav_cmd." is not executable",73) " call Dret("netrw#NetRead : ".g:netrw_dav_cmd." not executable") return endif if g:netrw_dav_cmd =~ "curl" " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_dav_cmd." ".shellescape("dav://".g:netrw_machine.b:netrw_fname,1)." ".shellescape(tmpfile,1)) exe s:netrw_silentxfer."!".g:netrw_dav_cmd." ".shellescape("dav://".g:netrw_machine.b:netrw_fname,1)." ".shellescape(tmpfile,1) else " Construct execution string (four lines) which will be passed through filter let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) new setlocal ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port else keepj put ='open '.g:netrw_machine endif if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != "" keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd endif keepj put ='get '.netrw_fname.' '.tmpfile keepj put ='quit' " perform cadaver operation: keepj norm! 1Gdd " call Decho("executing: %!".g:netrw_dav_cmd) exe s:netrw_silentxfer."%!".g:netrw_dav_cmd bd! endif let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... " NetRead: (rsync) NetRead Method #7 {{{3 elseif b:netrw_method == 7 " call Decho("read via rsync (method #7)") " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... " NetRead: (fetch) NetRead Method #8 {{{3 " fetch://[user@]host[:http]/path elseif b:netrw_method == 8 " call Decho("read via fetch (method #8)") if g:netrw_fetch_cmd == "" if !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:ERROR,"fetch command not available",7) endif " call Dret("NetRead") return endif if exists("g:netrw_option") && g:netrw_option == ":https\=" let netrw_option= "http" else let netrw_option= "ftp" endif " call Decho("read via fetch for ".netrw_option) if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != "" " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1)) exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1) else " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1)) exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1) endif let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice " call Decho("(NetRead) setl ro") setl ro "......................................... " NetRead: (sftp) NetRead Method #9 {{{3 elseif b:netrw_method == 9 " call Decho("read via sftp (method #9)") " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile) exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... " NetRead: Complain {{{3 else call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",8) endif endwhile " NetRead: cleanup {{{3 if exists("b:netrw_method") " call Decho("cleanup b:netrw_method and b:netrw_fname") unlet b:netrw_method unlet b:netrw_fname endif if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't' && tmpfile !~ '.tar.xz$' && tmpfile !~ '.txz' " call Decho("cleanup by deleting tmpfile<".tmpfile.">") keepj call s:NetrwDelete(tmpfile) endif keepj call s:NetrwOptionRestore("w:") " call Dret("netrw#NetRead :5 getcwd<".getcwd().">") endfun " ------------------------------------------------------------------------ " netrw#NetWrite: responsible for writing a file over the net {{{2 fun! netrw#NetWrite(...) range " call Dfunc("netrw#NetWrite(a:0=".a:0.") ".g:loaded_netrw) " NetWrite: option handling {{{3 let mod= 0 call s:NetrwOptionSave("w:") call s:NetrwSafeOptions() " NetWrite: Get Temporary Filename {{{3 let tmpfile= s:GetTempfile("") if tmpfile == "" " call Dret("netrw#NetWrite : unable to get a tempfile!") return endif if a:0 == 0 let ichoice = 0 else let ichoice = 1 endif let curbufname= expand("%") " call Decho("curbufname<".curbufname.">") if &binary " For binary writes, always write entire file. " (line numbers don't really make sense for that). " Also supports the writing of tar and zip files. " call Decho("(write entire file) sil exe w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)) exe "sil keepj w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) elseif g:netrw_cygwin " write (selected portion of) file to temporary let cygtmpfile= substitute(tmpfile,'/cygdrive/\(.\)','\1:','') " call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile)) exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile) else " write (selected portion of) file to temporary " call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)) exe "sil keepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) endif if curbufname == "" " if the file is [No Name], and one attempts to Nwrite it, the buffer takes " on the temporary file's name. Deletion of the temporary file during " cleanup then causes an error message. 0file! endif " NetWrite: while choice loop: {{{3 while ichoice <= a:0 " Process arguments: {{{4 " attempt to repeat with previous host-file-etc if exists("b:netrw_lastfile") && a:0 == 0 " call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">") let choice = b:netrw_lastfile let ichoice= ichoice + 1 else exe "let choice= a:" . ichoice " Reconstruct Choice if choice starts with '"' if match(choice,"?") == 0 echomsg 'NetWrite Usage:"' echomsg ':Nwrite machine:path uses rcp' echomsg ':Nwrite "machine path" uses ftp with <.netrc>' echomsg ':Nwrite "machine id password path" uses ftp' echomsg ':Nwrite dav://[user@]machine/path uses cadaver' echomsg ':Nwrite fetch://[user@]machine/path uses fetch' echomsg ':Nwrite ftp://machine[#port]/path uses ftp (autodetects <.netrc>)' echomsg ':Nwrite rcp://machine/path uses rcp' echomsg ':Nwrite rsync://[user@]machine/path uses rsync' echomsg ':Nwrite scp://[user@]machine[[:#]port]/path uses scp' echomsg ':Nwrite sftp://[user@]machine/path uses sftp' sleep 4 break elseif match(choice,"^\"") != -1 if match(choice,"\"$") != -1 " case "..." let choice=strpart(choice,1,strlen(choice)-2) else " case "... ... ..." let choice = strpart(choice,1,strlen(choice)-1) let wholechoice = "" while match(choice,"\"$") == -1 let wholechoice= wholechoice . " " . choice let ichoice = ichoice + 1 if choice > a:0 if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13) endif " call Dret("netrw#NetWrite") return endif let choice= a:{ichoice} endwhile let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) endif endif endif let ichoice= ichoice + 1 " call Decho("choice<" . choice . "> ichoice=".ichoice) " Determine method of write (ftp, rcp, etc) {{{4 keepj call s:NetrwMethod(choice) if !exists("b:netrw_method") || b:netrw_method < 0 " call Dfunc("netrw#NetWrite : unsupported method") return endif " ============= " NetWrite: Perform Protocol-Based Write {{{3 " ============================ if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 echo "(netrw) Processing your write request..." " call Decho("(netrw) Processing your write request...") endif "......................................... " NetWrite: (rcp) NetWrite Method #1 {{{3 if b:netrw_method == 1 " call Decho("write via rcp (method #1)") if s:netrw_has_nt_rcp == 1 if exists("g:netrw_uid") && ( g:netrw_uid != "" ) let uid_machine = g:netrw_machine .'.'. g:netrw_uid else let uid_machine = g:netrw_machine .'.'. $USERNAME endif else if exists("g:netrw_uid") && ( g:netrw_uid != "" ) let uid_machine = g:netrw_uid .'@'. g:netrw_machine else let uid_machine = g:netrw_machine endif endif " call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1)) exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1) let b:netrw_lastfile = choice "......................................... " NetWrite: (ftp + <.netrc>) NetWrite Method #2 {{{3 elseif b:netrw_method == 2 " call Decho("write via ftp+.netrc (method #2)") let netrw_fname = b:netrw_fname " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead let bhkeep = &l:bh let curbuf = bufnr("%") setlocal bh=hide enew " call Decho("filter input window#".winnr()) setlocal ff=unix keepj put =g:netrw_ftpmode " call Decho("filter input: ".getline('$')) if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline("$")) endif keepj call setline(line("$")+1,'put "'.tmpfile.'" "'.netrw_fname.'"') " call Decho("filter input: ".getline("$")) if exists("g:netrw_port") && g:netrw_port != "" " call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) else " call Decho("filter input window#".winnr()) " call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" if !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:ERROR,getline(1),14) endif let mod=1 endif " remove enew buffer (quietly) let filtbuf= bufnr("%") exe curbuf."b!" let &l:bh = bhkeep exe filtbuf."bw!" let b:netrw_lastfile = choice "......................................... " NetWrite: (ftp + machine, id, passwd, filename) NetWrite Method #3 {{{3 elseif b:netrw_method == 3 " Construct execution string (three or more lines) which will be passed through filter " call Decho("read via ftp+mipf (method #3)") let netrw_fname = b:netrw_fname let bhkeep = &l:bh " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead let curbuf = bufnr("%") setlocal bh=hide enew setlocal ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port " call Decho("filter input: ".getline('.')) else keepj put ='open '.g:netrw_machine " call Decho("filter input: ".getline('.')) endif if exists("g:netrw_uid") && g:netrw_uid != "" if exists("g:netrw_ftp") && g:netrw_ftp == 1 keepj put =g:netrw_uid " call Decho("filter input: ".getline('.')) if exists("s:netrw_passwd") && s:netrw_passwd != "" keepj put ='\"'.s:netrw_passwd.'\"' endif " call Decho("filter input: ".getline('.')) elseif exists("s:netrw_passwd") && s:netrw_passwd != "" keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' " call Decho("filter input: ".getline('.')) endif endif keepj put =g:netrw_ftpmode " call Decho("filter input: ".getline('$')) if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline("$")) endif keepj put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"' " call Decho("filter input: ".getline('.')) " save choice/id/password for future use let b:netrw_lastfile = choice " perform ftp: " -i : turns off interactive prompting from ftp " -n unix : DON'T use <.netrc>, even though it exists " -n win32: quit being obnoxious about password keepj norm! 1Gdd " call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,getline(1),15) endif let mod=1 endif " remove enew buffer (quietly) let filtbuf= bufnr("%") exe curbuf."b!" let &l:bh= bhkeep exe filtbuf."bw!" "......................................... " NetWrite: (scp) NetWrite Method #4 {{{3 elseif b:netrw_method == 4 " call Decho("write via scp (method #4)") if exists("g:netrw_port") && g:netrw_port != "" let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port) else let useport= "" endif " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)) exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1) let b:netrw_lastfile = choice "......................................... " NetWrite: (http) NetWrite Method #5 {{{3 elseif b:netrw_method == 5 " call Decho("write via http (method #5)") if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"currently <netrw.vim> does not support writing using http:",16) endif "......................................... " NetWrite: (dav) NetWrite Method #6 (cadaver) {{{3 elseif b:netrw_method == 6 " call Decho("write via cadaver (method #6)") " Construct execution string (four lines) which will be passed through filter let netrw_fname = escape(b:netrw_fname,g:netrw_fname_escape) let bhkeep = &l:bh " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead let curbuf = bufnr("%") setlocal bh=hide enew setlocal ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port else keepj put ='open '.g:netrw_machine endif if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != "" keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd endif keepj put ='put '.tmpfile.' '.netrw_fname " perform cadaver operation: keepj norm! 1Gdd " call Decho("executing: %!".g:netrw_dav_cmd) exe s:netrw_silentxfer."%!".g:netrw_dav_cmd " remove enew buffer (quietly) let filtbuf= bufnr("%") exe curbuf."b!" let &l:bh = bhkeep exe filtbuf."bw!" let b:netrw_lastfile = choice "......................................... " NetWrite: (rsync) NetWrite Method #7 {{{3 elseif b:netrw_method == 7 " call Decho("write via rsync (method #7)") " call Decho("executing: !".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)) exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1) let b:netrw_lastfile = choice "......................................... " NetWrite: (sftp) NetWrite Method #9 {{{3 elseif b:netrw_method == 9 " call Decho("read via sftp (method #9)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) if exists("g:netrw_uid") && ( g:netrw_uid != "" ) let uid_machine = g:netrw_uid .'@'. g:netrw_machine else let uid_machine = g:netrw_machine endif " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead let bhkeep = &l:bh let curbuf = bufnr("%") setlocal bh=hide enew setlocal ff=unix call setline(1,'put "'.escape(tmpfile,'\').'" '.netrw_fname) " call Decho("filter input: ".getline('.')) " call Decho("executing: %!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1)) exe s:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1) let filtbuf= bufnr("%") exe curbuf."b!" let &l:bh = bhkeep exe filtbuf."bw!" let b:netrw_lastfile = choice "......................................... " NetWrite: Complain {{{3 else call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",17) let leavemod= 1 endif endwhile " NetWrite: Cleanup: {{{3 " call Decho("cleanup") if s:FileReadable(tmpfile) " call Decho("tmpfile<".tmpfile."> readable, will now delete it") call s:NetrwDelete(tmpfile) endif call s:NetrwOptionRestore("w:") if a:firstline == 1 && a:lastline == line("$") " restore modifiability; usually equivalent to set nomod let &mod= mod " call Decho("(NetWrite) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") elseif !exists("leavemod") " indicate that the buffer has not been modified since last written " call Decho("(NetWrite) set nomod") set nomod " call Decho("(NetWrite) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") endif " call Dret("netrw#NetWrite") endfun " --------------------------------------------------------------------- " netrw#NetSource: source a remotely hosted vim script {{{2 " uses NetRead to get a copy of the file into a temporarily file, " then sources that file, " then removes that file. fun! netrw#NetSource(...) " call Dfunc("netrw#NetSource() a:0=".a:0) if a:0 > 0 && a:1 == '?' " give help echomsg 'NetSource Usage:' echomsg ':Nsource dav://machine[:port]/path uses cadaver' echomsg ':Nsource fetch://machine/path uses fetch' echomsg ':Nsource ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' echomsg ':Nsource http[s]://[user@]machine/path uses http wget' echomsg ':Nsource rcp://[user@]machine/path uses rcp' echomsg ':Nsource rsync://machine[:port]/path uses rsync' echomsg ':Nsource scp://[user@]machine[[:#]port]/path uses scp' echomsg ':Nsource sftp://[user@]machine[[:#]port]/path uses sftp' sleep 4 else let i= 1 while i <= a:0 call netrw#NetRead(3,a:{i}) " call Decho("(netrw#NetSource) s:netread_tmpfile<".s:netrw_tmpfile.">") if s:FileReadable(s:netrw_tmpfile) " call Decho("(netrw#NetSource) exe so ".fnameescape(s:netrw_tmpfile)) exe "so ".fnameescape(s:netrw_tmpfile) " call Decho("(netrw#NetSource) delete(".s:netrw_tmpfile.")") call delete(s:netrw_tmpfile) unlet s:netrw_tmpfile else call netrw#ErrorMsg(s:ERROR,"unable to source <".a:{i}.">!",48) endif let i= i + 1 endwhile endif " call Dret("netrw#NetSource") endfun " =========================================== " s:NetrwGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2 " readcmd == %r : replace buffer with newly read file " == 0r : read file at top of buffer " == r : read file after current line " == t : leave file in temporary form (ie. don't read into buffer) fun! s:NetrwGetFile(readcmd, tfile, method) " call Dfunc("NetrwGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)") " readcmd=='t': simply do nothing if a:readcmd == 't' " call Decho("(NetrwGetFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("NetrwGetFile : skip read of <".a:tfile.">") return endif " get name of remote filename (ie. url and all) let rfile= bufname("%") " call Decho("rfile<".rfile.">") if exists("*NetReadFixup") " for the use of NetReadFixup (not otherwise used internally) let line2= line("$") endif if a:readcmd[0] == '%' " get file into buffer " call Decho("get file into buffer") " rename the current buffer to the temp file (ie. tfile) if g:netrw_cygwin let tfile= substitute(a:tfile,'/cygdrive/\(.\)','\1:','') else let tfile= a:tfile endif " call Decho("exe sil! keepalt file ".fnameescape(tfile)) exe "sil! keepalt file ".fnameescape(tfile) " edit temporary file (ie. read the temporary file in) if rfile =~ '\.zip$' " call Decho("handling remote zip file with zip#Browse(tfile<".tfile.">)") call zip#Browse(tfile) elseif rfile =~ '\.tar$' " call Decho("handling remote tar file with tar#Browse(tfile<".tfile.">)") call tar#Browse(tfile) elseif rfile =~ '\.tar\.gz$' " call Decho("handling remote gzip-compressed tar file") call tar#Browse(tfile) elseif rfile =~ '\.tar\.bz2$' " call Decho("handling remote bz2-compressed tar file") call tar#Browse(tfile) elseif rfile =~ '\.tar\.xz$' " call Decho("handling remote xz-compressed tar file") call tar#Browse(tfile) elseif rfile =~ '\.txz$' " call Decho("handling remote xz-compressed tar file (.txz)") call tar#Browse(tfile) else " call Decho("edit temporary file") e! endif " rename buffer back to remote filename " call Decho("exe sil! keepalt file ".fnameescape(rfile)) exe "sil! keepj keepalt file ".fnameescape(rfile) " detect filetype of local version of remote file " Note that isk must not include a "/" for scripts.vim " to process this detection correctly. " call Decho("detect filetype of local version of remote file") let iskkeep= &isk set isk-=/ filetype detect let &isk= iskkeep " call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!") let line1 = 1 let line2 = line("$") elseif s:FileReadable(a:tfile) " read file after current line " call Decho("read file<".a:tfile."> after current line") let curline = line(".") let lastline= line("$") " call Decho("exe<".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)."> line#".curline) exe "keepj ".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile) let line1= curline + 1 let line2= line("$") - lastline + 1 else " not readable " call Decho("(NetrwGetFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Decho("tfile<".a:tfile."> not readable") keepj call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9) " call Dret("NetrwGetFile : tfile<".a:tfile."> not readable") return endif " User-provided (ie. optional) fix-it-up command if exists("*NetReadFixup") " call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")") keepj call NetReadFixup(a:method, line1, line2) " else " Decho " call Decho("NetReadFixup() not called, doesn't exist (line1=".line1." line2=".line2.")") endif if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu " update the Buffers menu keepj call s:UpdateBuffersMenu() endif " call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile)) " make sure file is being displayed " redraw! " call Decho("(NetrwGetFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("NetrwGetFile") endfun " ------------------------------------------------------------------------ " s:NetrwMethod: determine method of transfer {{{2 " Input: " choice = url [protocol:]//[userid@]hostname[:port]/[path-to-file] " Output: " b:netrw_method= 1: rcp " 2: ftp + <.netrc> " 3: ftp + machine, id, password, and [path]filename " 4: scp " 5: http[s] (wget) " 6: dav " 7: rsync " 8: fetch " 9: sftp " g:netrw_machine= hostname " b:netrw_fname = filename " g:netrw_port = optional port number (for ftp) " g:netrw_choice = copy of input url (choice) fun! s:NetrwMethod(choice) " call Dfunc("NetrwMethod(a:choice<".a:choice.">)") " sanity check: choice should have at least three slashes in it if strlen(substitute(a:choice,'[^/]','','g')) < 3 call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78) let b:netrw_method = -1 " call Dret("NetrwMethod : incorrect url format<".a:choice.">") return endif " record current g:netrw_machine, if any " curmachine used if protocol == ftp and no .netrc if exists("g:netrw_machine") let curmachine= g:netrw_machine " call Decho("curmachine<".curmachine.">") else let curmachine= "N O T A HOST" endif if exists("g:netrw_port") let netrw_port= g:netrw_port endif " insure that netrw_ftp_cmd starts off every method determination " with the current g:netrw_ftp_cmd let s:netrw_ftp_cmd= g:netrw_ftp_cmd " initialization let b:netrw_method = 0 let g:netrw_machine = "" let b:netrw_fname = "" let g:netrw_port = "" let g:netrw_choice = a:choice " Patterns: " mipf : a:machine a:id password filename Use ftp " mf : a:machine filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd " ftpurm : ftp://[user@]host[[#:]port]/filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd " rcpurm : rcp://[user@]host/filename Use rcp " rcphf : [user@]host:filename Use rcp " scpurm : scp://[user@]host[[#:]port]/filename Use scp " httpurm : http[s]://[user@]host/filename Use wget " davurm : dav[s]://host[:port]/path Use cadaver/curl " rsyncurm : rsync://host[:port]/path Use rsync " fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http) " sftpurm : sftp://[user@]host/filename Use scp let mipf = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$' let mf = '^\(\S\+\)\s\+\(\S\+\)$' " let ftpurm = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' " let rcpurm = '^rcp://\%(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$' " let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' let ftpurm = '^ftp://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' let rcpurm = '^rcp://\%(\([^/]*\)@\)\=\([^/]\{-}\)/\(.*\)$' let rcphf = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$' let scpurm = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$' let httpurm = '^https\=://\([^/]\{-}\)\(/.*\)\=$' let davurm = '^davs\=://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$' let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$' let fetchurm = '^fetch://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$' " call Decho("determine method:") " Determine Method " Method#1: rcp://user@hostname/...path-to-file {{{3 if match(a:choice,rcpurm) == 0 " call Decho("rcp://...") let b:netrw_method = 1 let userid = substitute(a:choice,rcpurm,'\1',"") let g:netrw_machine = substitute(a:choice,rcpurm,'\2',"") let b:netrw_fname = substitute(a:choice,rcpurm,'\3',"") if userid != "" let g:netrw_uid= userid endif " Method#4: scp://user@hostname/...path-to-file {{{3 elseif match(a:choice,scpurm) == 0 " call Decho("scp://...") let b:netrw_method = 4 let g:netrw_machine = substitute(a:choice,scpurm,'\1',"") let g:netrw_port = substitute(a:choice,scpurm,'\2',"") let b:netrw_fname = substitute(a:choice,scpurm,'\3',"") " Method#5: http[s]://user@hostname/...path-to-file {{{3 elseif match(a:choice,httpurm) == 0 " call Decho("http://...") let b:netrw_method = 5 let g:netrw_machine= substitute(a:choice,httpurm,'\1',"") let b:netrw_fname = substitute(a:choice,httpurm,'\2',"") " Method#6: dav://hostname[:port]/..path-to-file.. {{{3 elseif match(a:choice,davurm) == 0 " call Decho("dav://...") let b:netrw_method= 6 if a:choice =~ 'davs:' let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"") else let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"") endif let b:netrw_fname = substitute(a:choice,davurm,'\3',"") " Method#7: rsync://user@hostname/...path-to-file {{{3 elseif match(a:choice,rsyncurm) == 0 " call Decho("rsync://...") let b:netrw_method = 7 let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"") let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"") " Methods 2,3: ftp://[user@]hostname[[:#]port]/...path-to-file {{{3 elseif match(a:choice,ftpurm) == 0 " call Decho("ftp://...") let userid = substitute(a:choice,ftpurm,'\2',"") let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"") let g:netrw_port = substitute(a:choice,ftpurm,'\4',"") let b:netrw_fname = substitute(a:choice,ftpurm,'\5',"") " call Decho("g:netrw_machine<".g:netrw_machine.">") if userid != "" let g:netrw_uid= userid endif if curmachine != g:netrw_machine if exists("s:netwr_hup[".g:netrw_machine."]") call NetUserPass("ftp:".g:netrw_machine) elseif exists("s:netrw_passwd") " if there's a change in hostname, require password re-entry unlet s:netrw_passwd endif if exists("netrw_port") unlet netrw_port endif endif if exists("g:netrw_uid") && exists("s:netrw_passwd") let b:netrw_method = 3 else let host= substitute(g:netrw_machine,'\..*$','','') if exists("s:netrw_hup[host]") call NetUserPass("ftp:".host) elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~ '-[sS]:' " call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">") " call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">") if g:netrw_ftp_cmd =~ '-[sS]:\S*MACHINE\>' let machine = substitute(g:netrw_machine,'\([^.]\+\)\.\S*','\1','') let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\<MACHINE\>',machine.".ftp",'') " call Decho("s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">") endif let b:netrw_method= 2 elseif s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc " call Decho("using <".expand("$HOME/.netrc")."> (readable)") let b:netrw_method= 2 else if !exists("g:netrw_uid") || g:netrw_uid == "" call NetUserPass() elseif !exists("s:netrw_passwd") || s:netrw_passwd == "" call NetUserPass(g:netrw_uid) " else just use current g:netrw_uid and s:netrw_passwd endif let b:netrw_method= 3 endif endif " Method#8: fetch {{{3 elseif match(a:choice,fetchurm) == 0 " call Decho("fetch://...") let b:netrw_method = 8 let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"") let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"") let b:netrw_option = substitute(a:choice,fetchurm,'\4',"") let b:netrw_fname = substitute(a:choice,fetchurm,'\5',"") " Method#3: Issue an ftp : "machine id password [path/]filename" {{{3 elseif match(a:choice,mipf) == 0 " call Decho("(ftp) host id pass file") let b:netrw_method = 3 let g:netrw_machine = substitute(a:choice,mipf,'\1',"") let g:netrw_uid = substitute(a:choice,mipf,'\2',"") let s:netrw_passwd = substitute(a:choice,mipf,'\3',"") let b:netrw_fname = substitute(a:choice,mipf,'\4',"") call NetUserPass(g:netrw_machine,g:netrw_uid,s:netrw_passwd) " Method#3: Issue an ftp: "hostname [path/]filename" {{{3 elseif match(a:choice,mf) == 0 " call Decho("(ftp) host file") if exists("g:netrw_uid") && exists("s:netrw_passwd") let b:netrw_method = 3 let g:netrw_machine = substitute(a:choice,mf,'\1',"") let b:netrw_fname = substitute(a:choice,mf,'\2',"") elseif s:FileReadable(expand("$HOME/.netrc")) let b:netrw_method = 2 let g:netrw_machine = substitute(a:choice,mf,'\1',"") let b:netrw_fname = substitute(a:choice,mf,'\2',"") endif " Method#9: sftp://user@hostname/...path-to-file {{{3 elseif match(a:choice,sftpurm) == 0 " call Decho("sftp://...") let b:netrw_method = 9 let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"") let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"") " Method#1: Issue an rcp: hostname:filename" (this one should be last) {{{3 elseif match(a:choice,rcphf) == 0 " call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">") let b:netrw_method = 1 let userid = substitute(a:choice,rcphf,'\2',"") let g:netrw_machine = substitute(a:choice,rcphf,'\3',"") let b:netrw_fname = substitute(a:choice,rcphf,'\4',"") " call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">") " call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">") " call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">") " call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">") if userid != "" let g:netrw_uid= userid endif " Cannot Determine Method {{{3 else if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:WARNING,"cannot determine method (format: protocol://[user@]hostname[:port]/[path])",45) endif let b:netrw_method = -1 endif "}}}3 if g:netrw_port != "" " remove any leading [:#] from port number let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','') elseif exists("netrw_port") " retain port number as implicit for subsequent ftp operations let g:netrw_port= netrw_port endif " call Decho("a:choice <".a:choice.">") " call Decho("b:netrw_method <".b:netrw_method.">") " call Decho("g:netrw_machine<".g:netrw_machine.">") " call Decho("g:netrw_port <".g:netrw_port.">") " if exists("g:netrw_uid") "Decho " call Decho("g:netrw_uid <".g:netrw_uid.">") " endif "Decho " if exists("s:netrw_passwd") "Decho " call Decho("s:netrw_passwd <".s:netrw_passwd.">") " endif "Decho " call Decho("b:netrw_fname <".b:netrw_fname.">") " call Dret("NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port) endfun " ------------------------------------------------------------------------ " NetReadFixup: this sort of function is typically written by the user {{{2 " to handle extra junk that their system's ftp dumps " into the transfer. This function is provided as an " example and as a fix for a Windows 95 problem: in my " experience, win95's ftp always dumped four blank lines " at the end of the transfer. if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp fun! NetReadFixup(method, line1, line2) " call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")") " sanity checks -- attempt to convert inputs to integers let method = a:method + 0 let line1 = a:line1 + 0 let line2 = a:line2 + 0 if type(method) != 0 || type(line1) != 0 || type(line2) != 0 || method < 0 || line1 <= 0 || line2 <= 0 " call Dret("NetReadFixup") return endif if method == 3 " ftp (no <.netrc>) let fourblanklines= line2 - 3 if fourblanklines >= line1 exe "sil keepj ".fourblanklines.",".line2."g/^\s*$/d" call histdel("/",-1) endif endif " call Dret("NetReadFixup") endfun endif " --------------------------------------------------------------------- " NetUserPass: set username and password for subsequent ftp transfer {{{2 " Usage: :call NetUserPass() -- will prompt for userid and password " :call NetUserPass("uid") -- will prompt for password " :call NetUserPass("uid","password") -- sets global userid and password " :call NetUserPass("ftp:host") -- looks up userid and password using hup dictionary " :call NetUserPass("host","uid","password") -- sets hup dictionary with host, userid, password fun! NetUserPass(...) " call Dfunc("NetUserPass() a:0=".a:0) if !exists('s:netrw_hup') let s:netrw_hup= {} endif if a:0 == 0 if !exists("g:netrw_uid") || g:netrw_uid == "" " get uid via prompt let g:netrw_uid= input('Enter username: ') endif " get password via prompt let s:netrw_passwd= inputsecret("Enter Password: ") " set up hup database let host = substitute(g:netrw_machine,'\..*$','','') if !exists('s:netrw_hup[host]') let s:netrw_hup[host]= {} endif let s:netrw_hup[host].uid = g:netrw_uid let s:netrw_hup[host].passwd = s:netrw_passwd elseif a:0 == 1 if a:1 =~ '^ftp:' " access userid and password from hup (host-user-passwd) dictionary let host = substitute(a:1,'^ftp:','','') let host = substitute(host,'\..*','','') if exists("s:netrw_hup[host]") let g:netrw_uid = s:netrw_hup[host].uid let s:netrw_passwd = s:netrw_hup[host].passwd " call Decho("get s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">") " call Decho("get s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">") else let g:netrw_uid = input("Enter UserId: ") let s:netrw_passwd = inputsecret("Enter Password: ") endif else " set userid, prompt for password " call Decho("set g:netrw_uid= <".a:1.">") if exists("g:netrw_machine") let host= substitute(g:netrw_machine,'\..*$','','') endif let g:netrw_uid = a:1 let s:netrw_passwd = inputsecret("Enter Password: ") endif " call Decho("host<".host.">") if exists("host") if !exists('s:netrw_hup[host]') let s:netrw_hup[host]= {} endif let s:netrw_hup[host].uid = g:netrw_uid let s:netrw_hup[host].passwd = s:netrw_passwd endif elseif a:0 == 2 let g:netrw_uid = a:1 let s:netrw_passwd = a:2 elseif a:0 == 3 " enter hostname, user-id, and password into the hup dictionary let host = substitute(a:1,'^\a\+:','','') let host = substitute(host,'\..*$','','') if !exists('s:netrw_hup[host]') let s:netrw_hup[host]= {} endif let s:netrw_hup[host].uid = a:2 let s:netrw_hup[host].passwd = a:3 let g:netrw_uid = s:netrw_hup[host].uid let s:netrw_passwd = s:netrw_hup[host].passwd " call Decho("set s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">") " call Decho("set s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">") endif " call Dret("NetUserPass : uid<".g:netrw_uid."> passwd<".s:netrw_passwd.">") endfun " =========================================== " Shared Browsing Support: {{{1 " =========================================== " --------------------------------------------------------------------- " s:NetrwMaps: {{{2 fun! s:NetrwMaps(islocal) " call Dfunc("s:NetrwMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") " set up Rexplore and [ 2-leftmouse-click -or- c-leftmouse ] " call Decho("set up Rexplore command") com! Rexplore if exists("w:netrw_rexlocal")|call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".")|else|call netrw#ErrorMsg(s:WARNING,"not a former netrw window",79)|endif if g:netrw_mousemaps && g:netrw_retmap " call Decho("set up Rexplore 2-leftmouse") if !hasmapto("<Plug>NetrwReturn") if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$' " call Decho("making map for 2-leftmouse") nmap <unique> <silent> <2-leftmouse> <Plug>NetrwReturn elseif maparg("<c-leftmouse>","n") == "" " call Decho("making map for c-leftmouse") nmap <unique> <silent> <c-leftmouse> <Plug>NetrwReturn endif endif nno <silent> <Plug>NetrwReturn :Rexplore<cr> " call Decho("made <Plug>NetrwReturn map") endif if a:islocal " call Decho("make local maps") " local normal-mode maps nnoremap <buffer> <silent> a :call <SID>NetrwHide(1)<cr> nnoremap <buffer> <silent> % :call <SID>NetrwOpenFile(1)<cr> nnoremap <buffer> <silent> c :exe "keepjumps lcd ".fnameescape(b:netrw_curdir)<cr> nnoremap <buffer> <silent> C :let g:netrw_chgwin= winnr()<cr> nnoremap <buffer> <silent> <cr> :call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord()))<cr> nnoremap <buffer> <silent> d :call <SID>NetrwMakeDir("")<cr> nnoremap <buffer> <silent> - :exe "norm! 0"<bar>call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,'../'))<cr> nnoremap <buffer> <silent> gb :<c-u>call <SID>NetrwBookHistHandler(1,b:netrw_curdir)<cr> nnoremap <buffer> <silent> gd :<c-u>call <SID>NetrwForceChgDir(1,<SID>NetrwGetWord())<cr> nnoremap <buffer> <silent> gf :<c-u>call <SID>NetrwForceFile(1,<SID>NetrwGetWord())<cr> nnoremap <buffer> <silent> gh :<c-u>call <SID>NetrwHidden(1)<cr> nnoremap <buffer> <silent> gp :<c-u>call <SID>NetrwChgPerm(1,b:netrw_curdir)<cr> nnoremap <buffer> <silent> I :call <SID>NetrwBannerCtrl(1)<cr> nnoremap <buffer> <silent> i :call <SID>NetrwListStyle(1)<cr> nnoremap <buffer> <silent> mb :<c-u>call <SID>NetrwBookHistHandler(0,b:netrw_curdir)<cr> nnoremap <buffer> <silent> mB :<c-u>call <SID>NetrwBookHistHandler(6,b:netrw_curdir)<cr> nnoremap <buffer> <silent> mc :<c-u>call <SID>NetrwMarkFileCopy(1)<cr> nnoremap <buffer> <silent> md :<c-u>call <SID>NetrwMarkFileDiff(1)<cr> nnoremap <buffer> <silent> me :<c-u>call <SID>NetrwMarkFileEdit(1)<cr> nnoremap <buffer> <silent> mf :<c-u>call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr> nnoremap <buffer> <silent> mg :<c-u>call <SID>NetrwMarkFileGrep(1)<cr> nnoremap <buffer> <silent> mh :<c-u>call <SID>NetrwMarkHideSfx(1)<cr> nnoremap <buffer> <silent> mm :<c-u>call <SID>NetrwMarkFileMove(1)<cr> nnoremap <buffer> <silent> mp :<c-u>call <SID>NetrwMarkFilePrint(1)<cr> nnoremap <buffer> <silent> mr :<c-u>call <SID>NetrwMarkFileRegexp(1)<cr> nnoremap <buffer> <silent> ms :<c-u>call <SID>NetrwMarkFileSource(1)<cr> nnoremap <buffer> <silent> mt :<c-u>call <SID>NetrwMarkFileTgt(1)<cr> nnoremap <buffer> <silent> mT :<c-u>call <SID>NetrwMarkFileTag(1)<cr> nnoremap <buffer> <silent> mu :<c-u>call <SID>NetrwUnMarkFile(1)<cr> nnoremap <buffer> <silent> mx :<c-u>call <SID>NetrwMarkFileExe(1)<cr> nnoremap <buffer> <silent> mX :<c-u>call <SID>NetrwMarkFileVimCmd(1)<cr> nnoremap <buffer> <silent> mz :<c-u>call <SID>NetrwMarkFileCompress(1)<cr> nnoremap <buffer> <silent> O :call <SID>NetrwObtain(1)<cr> nnoremap <buffer> <silent> o :call <SID>NetrwSplit(3)<cr> nnoremap <buffer> <silent> p :call <SID>NetrwPreview(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),1))<cr> nnoremap <buffer> <silent> P :call <SID>NetrwPrevWinOpen(1)<cr> nnoremap <buffer> <silent> qb :<c-u>call <SID>NetrwBookHistHandler(2,b:netrw_curdir)<cr> nnoremap <buffer> <silent> qf :<c-u>call <SID>NetrwFileInfo(1,<SID>NetrwGetWord())<cr> nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr> nnoremap <buffer> <silent> s :call <SID>NetrwSortStyle(1)<cr> nnoremap <buffer> <silent> S :call <SID>NetSortSequence(1)<cr> nnoremap <buffer> <silent> T :call <SID>NetrwSplit(4)<bar>norm! gT<cr> nnoremap <buffer> <silent> t :call <SID>NetrwSplit(4)<cr> nnoremap <buffer> <silent> u :<c-u>call <SID>NetrwBookHistHandler(4,expand("%"))<cr> nnoremap <buffer> <silent> U :<c-u>call <SID>NetrwBookHistHandler(5,expand("%"))<cr> nnoremap <buffer> <silent> v :call <SID>NetrwSplit(5)<cr> nnoremap <buffer> <silent> x :call netrw#NetrwBrowseX(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),0),0)"<cr> " local insert-mode maps inoremap <buffer> <silent> a <c-o>:call <SID>NetrwHide(1)<cr> inoremap <buffer> <silent> c <c-o>:exe "keepjumps lcd ".fnameescape(b:netrw_curdir)<cr> inoremap <buffer> <silent> C <c-o>:let g:netrw_chgwin= winnr()<cr> inoremap <buffer> <silent> % <c-o>:call <SID>NetrwOpenFile(1)<cr> inoremap <buffer> <silent> - <c-o>:exe "norm! 0"<bar>call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,'../'))<cr> inoremap <buffer> <silent> <cr> <c-o>:call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord()))<cr> inoremap <buffer> <silent> d <c-o>:call <SID>NetrwMakeDir("")<cr> inoremap <buffer> <silent> gb <c-o>:<c-u>call <SID>NetrwBookHistHandler(1,b:netrw_curdir)<cr> inoremap <buffer> <silent> gh <c-o>:<c-u>call <SID>NetrwHidden(1)<cr> inoremap <buffer> <silent> gp <c-o>:<c-u>call <SID>NetrwChgPerm(1,b:netrw_curdir)<cr> inoremap <buffer> <silent> I <c-o>:call <SID>NetrwBannerCtrl(1)<cr> inoremap <buffer> <silent> i <c-o>:call <SID>NetrwListStyle(1)<cr> inoremap <buffer> <silent> mb <c-o>:<c-u>call <SID>NetrwBookHistHandler(0,b:netrw_curdir)<cr> inoremap <buffer> <silent> mB <c-o>:<c-u>call <SID>NetrwBookHistHandler(6,b:netrw_curdir)<cr> inoremap <buffer> <silent> mc <c-o>:<c-u>call <SID>NetrwMarkFileCopy(1)<cr> inoremap <buffer> <silent> md <c-o>:<c-u>call <SID>NetrwMarkFileDiff(1)<cr> inoremap <buffer> <silent> me <c-o>:<c-u>call <SID>NetrwMarkFileEdit(1)<cr> inoremap <buffer> <silent> mf <c-o>:<c-u>call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr> inoremap <buffer> <silent> mg <c-o>:<c-u>call <SID>NetrwMarkFileGrep(1)<cr> inoremap <buffer> <silent> mh <c-o>:<c-u>call <SID>NetrwMarkHideSfx(1)<cr> inoremap <buffer> <silent> mm <c-o>:<c-u>call <SID>NetrwMarkFileMove(1)<cr> inoremap <buffer> <silent> mp <c-o>:<c-u>call <SID>NetrwMarkFilePrint(1)<cr> inoremap <buffer> <silent> mr <c-o>:<c-u>call <SID>NetrwMarkFileRegexp(1)<cr> inoremap <buffer> <silent> ms <c-o>:<c-u>call <SID>NetrwMarkFileSource(1)<cr> inoremap <buffer> <silent> mT <c-o>:<c-u>call <SID>NetrwMarkFileTag(1)<cr> inoremap <buffer> <silent> mt <c-o>:<c-u>call <SID>NetrwMarkFileTgt(1)<cr> inoremap <buffer> <silent> mu <c-o>:<c-u>call <SID>NetrwUnMarkFile(1)<cr> inoremap <buffer> <silent> mx <c-o>:<c-u>call <SID>NetrwMarkFileExe(1)<cr> inoremap <buffer> <silent> mX <c-o>:<c-u>call <SID>NetrwMarkFileVimCmd(1)<cr> inoremap <buffer> <silent> mz <c-o>:<c-u>call <SID>NetrwMarkFileCompress(1)<cr> inoremap <buffer> <silent> O <c-o>:call <SID>NetrwObtain(1)<cr> inoremap <buffer> <silent> o <c-o>:call <SID>NetrwSplit(3)<cr> inoremap <buffer> <silent> p <c-o>:call <SID>NetrwPreview(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),1))<cr> inoremap <buffer> <silent> P <c-o>:call <SID>NetrwPrevWinOpen(1)<cr> inoremap <buffer> <silent> qb <c-o>:<c-u>call <SID>NetrwBookHistHandler(2,b:netrw_curdir)<cr> inoremap <buffer> <silent> qf <c-o>:<c-u>call <SID>NetrwFileInfo(1,<SID>NetrwGetWord())<cr> inoremap <buffer> <silent> r <c-o>:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr> inoremap <buffer> <silent> s <c-o>:call <SID>NetrwSortStyle(1)<cr> inoremap <buffer> <silent> S <c-o>:call <SID>NetSortSequence(1)<cr> inoremap <buffer> <silent> T <c-o>:call <SID>NetrwSplit(4)<bar>norm! gT<cr> inoremap <buffer> <silent> t <c-o>:call <SID>NetrwSplit(4)<cr> inoremap <buffer> <silent> u <c-o>:<c-u>call <SID>NetrwBookHistHandler(4,expand("%"))<cr> inoremap <buffer> <silent> U <c-o>:<c-u>call <SID>NetrwBookHistHandler(5,expand("%"))<cr> inoremap <buffer> <silent> v <c-o>:call <SID>NetrwSplit(5)<cr> inoremap <buffer> <silent> x <c-o>:call netrw#NetrwBrowseX(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),0),0)"<cr> if !hasmapto('<Plug>NetrwHideEdit') nmap <buffer> <unique> <c-h> <Plug>NetrwHideEdit imap <buffer> <unique> <c-h> <Plug>NetrwHideEdit endif nnoremap <buffer> <silent> <Plug>NetrwHideEdit :call <SID>NetrwHideEdit(1)<cr> if !hasmapto('<Plug>NetrwRefresh') nmap <buffer> <unique> <c-l> <Plug>NetrwRefresh imap <buffer> <unique> <c-l> <Plug>NetrwRefresh endif nnoremap <buffer> <silent> <Plug>NetrwRefresh :call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr> if s:didstarstar || !mapcheck("<s-down>","n") nnoremap <buffer> <silent> <s-down> :Nexplore<cr> inoremap <buffer> <silent> <s-down> :Nexplore<cr> endif if s:didstarstar || !mapcheck("<s-up>","n") nnoremap <buffer> <silent> <s-up> :Pexplore<cr> inoremap <buffer> <silent> <s-up> :Pexplore<cr> endif let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape) if g:netrw_mousemaps == 1 nmap <buffer> <leftmouse> <Plug>NetrwLeftmouse nno <buffer> <silent> <Plug>NetrwLeftmouse <leftmouse>:call <SID>NetrwLeftmouse(1)<cr> nmap <buffer> <middlemouse> <Plug>NetrwMiddlemouse nno <buffer> <silent> <Plug>NetrwMiddlemouse <leftmouse>:call <SID>NetrwPrevWinOpen(1)<cr> nmap <buffer> <s-leftmouse> <Plug>NetrwSLeftmouse nno <buffer> <silent> <Plug>NetrwSLeftmouse <leftmouse>:call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr> nmap <buffer> <2-leftmouse> <Plug>Netrw2Leftmouse nmap <buffer> <silent> <Plug>Netrw2Leftmouse - imap <buffer> <leftmouse> <Plug>ILeftmouse ino <buffer> <silent> <Plug>ILeftmouse <c-o><leftmouse><c-o>:call <SID>NetrwLeftmouse(1)<cr> imap <buffer> <middlemouse> <Plug>IMiddlemouse ino <buffer> <silent> <Plug>IMiddlemouse <c-o><leftmouse><c-o>:call <SID>NetrwPrevWinOpen(1)<cr> imap <buffer> <s-leftmouse> <Plug>ISLeftmouse ino <buffer> <silent> <Plug>ISLeftmouse <c-o><leftmouse><c-o>:call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr> exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' exe 'inoremap <buffer> <silent> <rightmouse> <c-o><leftmouse><c-o>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' endif exe 'nnoremap <buffer> <silent> <del> :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' exe 'nnoremap <buffer> <silent> D :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' exe 'nnoremap <buffer> <silent> R :call <SID>NetrwLocalRename("'.mapsafecurdir.'")<cr>' exe 'nnoremap <buffer> <silent> <Leader>m :call <SID>NetrwMakeDir("")<cr>' exe 'vnoremap <buffer> <silent> <del> :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' exe 'vnoremap <buffer> <silent> D :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' exe 'vnoremap <buffer> <silent> R :call <SID>NetrwLocalRename("'.mapsafecurdir.'")<cr>' exe 'inoremap <buffer> <silent> <del> <c-o>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' exe 'inoremap <buffer> <silent> D <c-o>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>' exe 'inoremap <buffer> <silent> R <c-o>:call <SID>NetrwLocalRename("'.mapsafecurdir.'")<cr>' exe 'inoremap <buffer> <silent> <Leader>m <c-o>:call <SID>NetrwMakeDir("")<cr>' nnoremap <buffer> <F1> :he netrw-quickhelp<cr> else " remote " call Decho("make remote maps") call s:RemotePathAnalysis(b:netrw_curdir) " remote normal-mode maps nnoremap <buffer> <silent> <cr> :call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,<SID>NetrwGetWord()))<cr> nnoremap <buffer> <silent> <c-l> :call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr> nnoremap <buffer> <silent> - :exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'../'))<cr> nnoremap <buffer> <silent> a :call <SID>NetrwHide(0)<cr> nnoremap <buffer> <silent> mb :<c-u>call <SID>NetrwBookHistHandler(0,b:netrw_curdir)<cr> nnoremap <buffer> <silent> mc :<c-u>call <SID>NetrwMarkFileCopy(0)<cr> nnoremap <buffer> <silent> md :<c-u>call <SID>NetrwMarkFileDiff(0)<cr> nnoremap <buffer> <silent> me :<c-u>call <SID>NetrwMarkFileEdit(0)<cr> nnoremap <buffer> <silent> mf :<c-u>call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr> nnoremap <buffer> <silent> mg :<c-u>call <SID>NetrwMarkFileGrep(0)<cr> nnoremap <buffer> <silent> mh :<c-u>call <SID>NetrwMarkHideSfx(0)<cr> nnoremap <buffer> <silent> mm :<c-u>call <SID>NetrwMarkFileMove(0)<cr> nnoremap <buffer> <silent> mp :<c-u>call <SID>NetrwMarkFilePrint(0)<cr> nnoremap <buffer> <silent> mr :<c-u>call <SID>NetrwMarkFileRegexp(0)<cr> nnoremap <buffer> <silent> ms :<c-u>call <SID>NetrwMarkFileSource(0)<cr> nnoremap <buffer> <silent> mt :<c-u>call <SID>NetrwMarkFileTgt(0)<cr> nnoremap <buffer> <silent> mT :<c-u>call <SID>NetrwMarkFileTag(0)<cr> nnoremap <buffer> <silent> mu :<c-u>call <SID>NetrwUnMarkFile(0)<cr> nnoremap <buffer> <silent> mx :<c-u>call <SID>NetrwMarkFileExe(0)<cr> nnoremap <buffer> <silent> mX :<c-u>call <SID>NetrwMarkFileVimCmd(0)<cr> nnoremap <buffer> <silent> mz :<c-u>call <SID>NetrwMarkFileCompress(0)<cr> nnoremap <buffer> <silent> gb :<c-u>call <SID>NetrwBookHistHandler(1,b:netrw_cur)<cr> nnoremap <buffer> <silent> gd :<c-u>call <SID>NetrwForceChgDir(0,<SID>NetrwGetWord())<cr> nnoremap <buffer> <silent> gf :<c-u>call <SID>NetrwForceFile(0,<SID>NetrwGetWord())<cr> nnoremap <buffer> <silent> gh :<c-u>call <SID>NetrwHidden(0)<cr> nnoremap <buffer> <silent> gp :<c-u>call <SID>NetrwChgPerm(0,b:netrw_curdir)<cr> nnoremap <buffer> <silent> C :let g:netrw_chgwin= winnr()<cr> nnoremap <buffer> <silent> i :call <SID>NetrwListStyle(0)<cr> nnoremap <buffer> <silent> I :call <SID>NetrwBannerCtrl(1)<cr> nnoremap <buffer> <silent> o :call <SID>NetrwSplit(0)<cr> nnoremap <buffer> <silent> O :call <SID>NetrwObtain(0)<cr> nnoremap <buffer> <silent> p :call <SID>NetrwPreview(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),1))<cr> nnoremap <buffer> <silent> P :call <SID>NetrwPrevWinOpen(0)<cr> nnoremap <buffer> <silent> qb :<c-u>call <SID>NetrwBookHistHandler(2,b:netrw_curdir)<cr> nnoremap <buffer> <silent> mB :<c-u>call <SID>NetrwBookHistHandler(6,b:netrw_curdir)<cr> nnoremap <buffer> <silent> qf :<c-u>call <SID>NetrwFileInfo(0,<SID>NetrwGetWord())<cr> nnoremap <buffer> <silent> r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'./'))<cr> nnoremap <buffer> <silent> s :call <SID>NetrwSortStyle(0)<cr> nnoremap <buffer> <silent> S :call <SID>NetSortSequence(0)<cr> nnoremap <buffer> <silent> t :call <SID>NetrwSplit(1)<cr> nnoremap <buffer> <silent> T :call <SID>NetrwSplit(1)<bar>norm! gT<cr> nnoremap <buffer> <silent> u :<c-u>call <SID>NetrwBookHistHandler(4,b:netrw_curdir)<cr> nnoremap <buffer> <silent> U :<c-u>call <SID>NetrwBookHistHandler(5,b:netrw_curdir)<cr> nnoremap <buffer> <silent> v :call <SID>NetrwSplit(2)<cr> nnoremap <buffer> <silent> x :call netrw#NetrwBrowseX(<SID>NetrwBrowseChgDir(0,<SID>NetrwGetWord()),1)<cr> nnoremap <buffer> <silent> % :call <SID>NetrwOpenFile(0)<cr> " remote insert-mode maps inoremap <buffer> <silent> <cr> <c-o>:call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,<SID>NetrwGetWord()))<cr> inoremap <buffer> <silent> <c-l> <c-o>:call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr> inoremap <buffer> <silent> - <c-o>:exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'../'))<cr> inoremap <buffer> <silent> a <c-o>:call <SID>NetrwHide(0)<cr> inoremap <buffer> <silent> mb <c-o>:<c-u>call <SID>NetrwBookHistHandler(0,b:netrw_curdir)<cr> inoremap <buffer> <silent> mc <c-o>:<c-u>call <SID>NetrwMarkFileCopy(0)<cr> inoremap <buffer> <silent> md <c-o>:<c-u>call <SID>NetrwMarkFileDiff(0)<cr> inoremap <buffer> <silent> me <c-o>:<c-u>call <SID>NetrwMarkFileEdit(0)<cr> inoremap <buffer> <silent> mf <c-o>:<c-u>call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr> inoremap <buffer> <silent> mg <c-o>:<c-u>call <SID>NetrwMarkFileGrep(0)<cr> inoremap <buffer> <silent> mh <c-o>:<c-u>call <SID>NetrwMarkHideSfx(0)<cr> inoremap <buffer> <silent> mm <c-o>:<c-u>call <SID>NetrwMarkFileMove(0)<cr> inoremap <buffer> <silent> mp <c-o>:<c-u>call <SID>NetrwMarkFilePrint(0)<cr> inoremap <buffer> <silent> mr <c-o>:<c-u>call <SID>NetrwMarkFileRegexp(0)<cr> inoremap <buffer> <silent> ms <c-o>:<c-u>call <SID>NetrwMarkFileSource(0)<cr> inoremap <buffer> <silent> mt <c-o>:<c-u>call <SID>NetrwMarkFileTgt(0)<cr> inoremap <buffer> <silent> mT <c-o>:<c-u>call <SID>NetrwMarkFileTag(0)<cr> inoremap <buffer> <silent> mu <c-o>:<c-u>call <SID>NetrwUnMarkFile(0)<cr> inoremap <buffer> <silent> mx <c-o>:<c-u>call <SID>NetrwMarkFileExe(0)<cr> inoremap <buffer> <silent> mX <c-o>:<c-u>call <SID>NetrwMarkFileVimCmd(0)<cr> inoremap <buffer> <silent> mz <c-o>:<c-u>call <SID>NetrwMarkFileCompress(0)<cr> inoremap <buffer> <silent> gb <c-o>:<c-u>call <SID>NetrwBookHistHandler(1,b:netrw_cur)<cr> inoremap <buffer> <silent> gh <c-o>:<c-u>call <SID>NetrwHidden(0)<cr> inoremap <buffer> <silent> gp <c-o>:<c-u>call <SID>NetrwChgPerm(0,b:netrw_curdir)<cr> inoremap <buffer> <silent> C <c-o>:let g:netrw_chgwin= winnr()<cr> inoremap <buffer> <silent> i <c-o>:call <SID>NetrwListStyle(0)<cr> inoremap <buffer> <silent> I <c-o>:call <SID>NetrwBannerCtrl(1)<cr> inoremap <buffer> <silent> o <c-o>:call <SID>NetrwSplit(0)<cr> inoremap <buffer> <silent> O <c-o>:call <SID>NetrwObtain(0)<cr> inoremap <buffer> <silent> p <c-o>:call <SID>NetrwPreview(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),1))<cr> inoremap <buffer> <silent> P <c-o>:call <SID>NetrwPrevWinOpen(0)<cr> inoremap <buffer> <silent> qb <c-o>:<c-u>call <SID>NetrwBookHistHandler(2,b:netrw_curdir)<cr> inoremap <buffer> <silent> mB <c-o>:<c-u>call <SID>NetrwBookHistHandler(6,b:netrw_curdir)<cr> inoremap <buffer> <silent> qf <c-o>:<c-u>call <SID>NetrwFileInfo(0,<SID>NetrwGetWord())<cr> inoremap <buffer> <silent> r <c-o>:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'./'))<cr> inoremap <buffer> <silent> s <c-o>:call <SID>NetrwSortStyle(0)<cr> inoremap <buffer> <silent> S <c-o>:call <SID>NetSortSequence(0)<cr> inoremap <buffer> <silent> t <c-o>:call <SID>NetrwSplit(1)<cr> inoremap <buffer> <silent> T <c-o>:call <SID>NetrwSplit(1)<bar>norm! gT<cr> inoremap <buffer> <silent> u <c-o>:<c-u>call <SID>NetrwBookHistHandler(4,b:netrw_curdir)<cr> inoremap <buffer> <silent> U <c-o>:<c-u>call <SID>NetrwBookHistHandler(5,b:netrw_curdir)<cr> inoremap <buffer> <silent> v <c-o>:call <SID>NetrwSplit(2)<cr> inoremap <buffer> <silent> x <c-o>:call netrw#NetrwBrowseX(<SID>NetrwBrowseChgDir(0,<SID>NetrwGetWord()),1)<cr> inoremap <buffer> <silent> % <c-o>:call <SID>NetrwOpenFile(0)<cr> if !hasmapto('<Plug>NetrwHideEdit') nmap <buffer> <c-h> <Plug>NetrwHideEdit imap <buffer> <c-h> <Plug>NetrwHideEdit endif nnoremap <buffer> <silent> <Plug>NetrwHideEdit :call <SID>NetrwHideEdit(0)<cr> if !hasmapto('<Plug>NetrwRefresh') nmap <buffer> <c-l> <Plug>NetrwRefresh imap <buffer> <c-l> <Plug>NetrwRefresh endif let mapsafepath = escape(s:path, s:netrw_map_escape) let mapsafeusermach = escape(s:user.s:machine, s:netrw_map_escape) nnoremap <buffer> <silent> <Plug>NetrwRefresh :call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr> if g:netrw_mousemaps == 1 nmap <leftmouse> <Plug>NetrwLeftmouse nno <buffer> <silent> <Plug>NetrwLeftmouse <leftmouse>:call <SID>NetrwLeftmouse(0)<cr> nmap <middlemouse> <Plug>NetrwMiddlemouse nno <buffer> <silent> <middlemouse> <Plug>NetrwMiddlemouse <leftmouse>:call <SID>NetrwPrevWinOpen(0)<cr> nmap <buffer> <s-leftmouse> <Plug>NetrwSLeftmouse nno <buffer> <silent> <Plug>NetrwSLeftmouse <leftmouse>:call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr> nmap <buffer> <2-leftmouse> <Plug>Netrw2Leftmouse nmap <buffer> <silent> <Plug>Netrw2Leftmouse - imap <buffer> <leftmouse> <Plug>ILeftmouse ino <buffer> <silent> <Plug>ILeftmouse <c-o><leftmouse><c-o>:call <SID>NetrwLeftmouse(0)<cr> imap <buffer> <middlemouse> <Plug>IMiddlemouse ino <buffer> <silent> <Plug>IMiddlemouse <c-o><leftmouse><c-o>:call <SID>NetrwPrevWinOpen(0)<cr> imap <buffer> <s-leftmouse> <Plug>ISLeftmouse ino <buffer> <silent> <Plug>ISLeftmouse <c-o><leftmouse><c-o>:call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr> exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' exe 'inoremap <buffer> <silent> <rightmouse> <c-o><leftmouse><c-o>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' endif exe 'nnoremap <buffer> <silent> <del> :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' exe 'nnoremap <buffer> <silent> d :call <SID>NetrwMakeDir("'.mapsafeusermach.'")<cr>' exe 'nnoremap <buffer> <silent> D :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' exe 'nnoremap <buffer> <silent> R :call <SID>NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' exe 'vnoremap <buffer> <silent> <del> :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' exe 'vnoremap <buffer> <silent> D :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' exe 'vnoremap <buffer> <silent> R :call <SID>NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' exe 'inoremap <buffer> <silent> <del> <c-o>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' exe 'inoremap <buffer> <silent> d <c-o>:call <SID>NetrwMakeDir("'.mapsafeusermach.'")<cr>' exe 'inoremap <buffer> <silent> D <c-o>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' exe 'inoremap <buffer> <silent> R <c-o>:call <SID>NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")<cr>' nnoremap <buffer> <F1> :he netrw-quickhelp<cr> inoremap <buffer> <F1> <c-o>:he netrw-quickhelp<cr> endif keepj call s:SetRexDir(a:islocal,b:netrw_curdir) " call Dret("s:NetrwMaps") endfun " --------------------------------------------------------------------- " s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2 fun! s:ExplorePatHls(pattern) " call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)") let repat= substitute(a:pattern,'^**/\{1,2}','','') " call Decho("repat<".repat.">") let repat= escape(repat,'][.\') " call Decho("repat<".repat.">") let repat= '\<'.substitute(repat,'\*','\\(\\S\\+ \\)*\\S\\+','g').'\>' " call Dret("s:ExplorePatHls repat<".repat.">") return repat endfun " --------------------------------------------------------------------- " s:NetrwBookHistHandler: {{{2 " 0: (user: <mb>) bookmark current directory " 1: (user: <gb>) change to the bookmarked directory " 2: (user: <qb>) list bookmarks " 3: (browsing) record current directory history " 4: (user: <u>) go up (previous) bookmark " 5: (user: <U>) go down (next) bookmark " 6: (user: <mB>) delete bookmark fun! s:NetrwBookHistHandler(chg,curdir) " call Dfunc("s:NetrwBookHistHandler(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." histcnt=".g:netrw_dirhist_cnt." histmax=".g:netrw_dirhistmax) if a:chg == 0 " bookmark the current directory " call Decho("(user: <b>) bookmark the current directory") if !exists("g:netrw_bookmarklist") let g:netrw_bookmarklist= [] endif if index(g:netrw_bookmarklist,a:curdir) == -1 " curdir not currently in g:netrw_bookmarklist, so include it call add(g:netrw_bookmarklist,a:curdir) call sort(g:netrw_bookmarklist) endif echo "bookmarked the current directory" elseif a:chg == 1 " change to the bookmarked directory " call Decho("(user: <".v:count."mb>) change to the bookmarked directory") if exists("g:netrw_bookmarklist[v:count-1]") exe "keepj e ".fnameescape(g:netrw_bookmarklist[v:count-1]) else echomsg "Sorry, bookmark#".v:count." doesn't exist!" endif elseif a:chg == 2 " redraw! let didwork= 0 " list user's bookmarks " call Decho("(user: <q>) list user's bookmarks") if exists("g:netrw_bookmarklist") " call Decho('list '.len(g:netrw_bookmarklist).' bookmarks') let cnt= 1 for bmd in g:netrw_bookmarklist " call Decho("Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1]) echo "Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1] let didwork = 1 let cnt = cnt + 1 endfor endif " list directory history let cnt = g:netrw_dirhist_cnt let first = 1 let histcnt = 0 if g:netrw_dirhistmax > 0 while ( first || cnt != g:netrw_dirhist_cnt ) " call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:netrw_dirhist_cnt) let histcnt= histcnt + 1 if exists("g:netrw_dirhist_{cnt}") " call Decho("Netrw History#".histcnt.": ".g:netrw_dirhist_{cnt}) echo "Netrw History#".histcnt.": ".g:netrw_dirhist_{cnt} let didwork= 1 endif let first = 0 let cnt = ( cnt - 1 ) % g:netrw_dirhistmax if cnt < 0 let cnt= cnt + g:netrw_dirhistmax endif endwhile else let g:netrw_dirhist_cnt= 0 endif if didwork call inputsave()|call input("Press <cr> to continue")|call inputrestore() endif elseif a:chg == 3 " saves most recently visited directories (when they differ) " call Decho("(browsing) record curdir history") if !exists("g:netrw_dirhist_cnt") || !exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") || g:netrw_dirhist_{g:netrw_dirhist_cnt} != a:curdir if g:netrw_dirhistmax > 0 let g:netrw_dirhist_cnt = ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax let g:netrw_dirhist_{g:netrw_dirhist_cnt} = a:curdir endif " call Decho("save dirhist#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">") endif elseif a:chg == 4 " u: change to the previous directory stored on the history list " call Decho("(user: <u>) chg to prev dir from history") if g:netrw_dirhistmax > 0 let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - 1 ) % g:netrw_dirhistmax if g:netrw_dirhist_cnt < 0 let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax endif else let g:netrw_dirhist_cnt= 0 endif if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") " call Decho("changedir u#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">") if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") setl ma noro " call Decho("(NetrwBookHistHandler) setl ma noro") sil! keepj %d setl nomod " call Decho("(NetrwBookHistHandler) setl nomod") " call Decho("(NetrwBookHistHandler) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") endif " " call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})) exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}) else if g:netrw_dirhistmax > 0 let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax else let g:netrw_dirhist_cnt= 0 endif echo "Sorry, no predecessor directory exists yet" endif elseif a:chg == 5 " U: change to the subsequent directory stored on the history list " call Decho("(user: <U>) chg to next dir from history") if g:netrw_dirhistmax > 0 let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") " call Decho("changedir U#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">") if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") " call Decho("(NetrwBookHistHandler) setl ma noro") setl ma noro sil! keepj %d " call Decho("removed all lines from buffer (%d)") " call Decho("(NetrwBookHistHandler) setl nomod") setl nomod " call Decho("(set nomod) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") endif " call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})) exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}) else let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - 1 ) % g:netrw_dirhistmax if g:netrw_dirhist_cnt < 0 let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax endif echo "Sorry, no successor directory exists yet" endif else let g:netrw_dirhist_cnt= 0 echo "Sorry, no successor directory exists yet (g:netrw_dirhistmax is ".g:netrw_dirhistmax.")" endif elseif a:chg == 6 " delete the v:count'th bookmark " call Decho("delete bookmark#".v:count."<".g:netrw_bookmarklist[v:count-1].">") let savefile= s:NetrwHome()."/.netrwbook" if filereadable(savefile) keepj call s:NetrwBookHistSave() " done here to merge bookmarks first keepj call delete(savefile) endif keepj call remove(g:netrw_bookmarklist,v:count-1) endif call s:NetrwBookmarkMenu() " call Dret("s:NetrwBookHistHandler") endfun " --------------------------------------------------------------------- " s:NetrwBookHistRead: this function reads bookmarks and history {{{2 " Sister function: s:NetrwBookHistSave() fun! s:NetrwBookHistRead() " call Dfunc("s:NetrwBookHistRead()") if !exists("s:netrw_initbookhist") let home = s:NetrwHome() let savefile= home."/.netrwbook" if filereadable(savefile) " call Decho("sourcing .netrwbook") exe "keepj so ".savefile endif if g:netrw_dirhistmax > 0 let savefile= home."/.netrwhist" if filereadable(savefile) " call Decho("sourcing .netrwhist") exe "keepj so ".savefile endif let s:netrw_initbookhist= 1 au VimLeave * call s:NetrwBookHistSave() endif endif " call Dret("s:NetrwBookHistRead") endfun " --------------------------------------------------------------------- " s:NetrwBookHistSave: this function saves bookmarks and history {{{2 " Sister function: s:NetrwBookHistRead() " I used to do this via viminfo but that appears to " be unreliable for long-term storage fun! s:NetrwBookHistSave() " call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax) if g:netrw_dirhistmax <= 0 " call Dret("s:NetrwBookHistSave : dirhistmax=".g:netrw_dirhistmax) return endif let savefile= s:NetrwHome()."/.netrwhist" 1split call s:NetrwEnew() setlocal cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf setlocal nocin noai noci magic nospell nohid wig= noaw setlocal ma noro write if exists("&acd") | setlocal noacd | endif sil! keepj keepalt %d " save .netrwhist -- no attempt to merge sil! file .netrwhist call setline(1,"let g:netrw_dirhistmax =".g:netrw_dirhistmax) call setline(2,"let g:netrw_dirhist_cnt =".g:netrw_dirhist_cnt) let lastline = line("$") let cnt = 1 while cnt <= g:netrw_dirhist_cnt call setline((cnt+lastline),'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'") let cnt= cnt + 1 endwhile exe "sil! w! ".savefile sil keepj %d if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] " merge and write .netrwbook let savefile= s:NetrwHome()."/.netrwbook" if filereadable(savefile) let booklist= deepcopy(g:netrw_bookmarklist) exe "sil keepj so ".savefile for bdm in booklist if index(g:netrw_bookmarklist,bdm) == -1 call add(g:netrw_bookmarklist,bdm) endif endfor call sort(g:netrw_bookmarklist) exe "sil! w! ".savefile endif " construct and save .netrwbook call setline(1,"let g:netrw_bookmarklist= ".string(g:netrw_bookmarklist)) exe "sil! w! ".savefile endif let bgone= bufnr("%") q! exe bgone."bwipe!" " call Dret("s:NetrwBookHistSave") endfun " --------------------------------------------------------------------- " s:NetrwBrowse: This function uses the command in g:netrw_list_cmd to provide a {{{2 " list of the contents of a local or remote directory. It is assumed that the " g:netrw_list_cmd has a string, USEPORT HOSTNAME, that needs to be substituted " with the requested remote hostname first. fun! s:NetrwBrowse(islocal,dirname) if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif " call Dfunc("s:NetrwBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%")."> win#".winnr()) " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) " call Dredir("ls!") if !exists("s:netrw_initbookhist") keepj call s:NetrwBookHistRead() endif " simplify the dirname (especially for ".."s in dirnames) if a:dirname !~ '^\a\+://' let dirname= simplify(a:dirname) else let dirname= a:dirname endif if exists("s:netrw_skipbrowse") unlet s:netrw_skipbrowse " call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("s:NetrwBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse) return endif if !exists("*shellescape") keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69) " call Dret("s:NetrwBrowse : missing shellescape()") return endif if !exists("*fnameescape") keepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing fnameescape()",70) " call Dret("s:NetrwBrowse : missing fnameescape()") return endif call s:NetrwOptionSave("w:") " re-instate any marked files if exists("s:netrwmarkfilelist_{bufnr('%')}") " call Decho("clearing marked files") exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" endif if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep " call Decho("handle w:netrw_acdkeep:") " call Decho("keepjumps lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")") exe 'keepj lcd '.fnameescape(dirname) call s:NetrwSafeOptions() " call Decho("getcwd<".getcwd().">") elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"' " looks like a regular file, attempt transfer " call Decho("attempt transfer as regular file<".dirname.">") " remove any filetype indicator from end of dirname, except for the {{{3 " "this is a directory" indicator (/). " There shouldn't be one of those here, anyway. let path= substitute(dirname,'[*=@|]\r\=$','','e') " call Decho("new path<".path.">") call s:RemotePathAnalysis(dirname) " remote-read the requested file into current buffer {{{3 keepj mark ' call s:NetrwEnew(dirname) call s:NetrwSafeOptions() setlocal ma noro " call Decho("setlocal ma noro") let b:netrw_curdir = dirname let url = s:method."://".s:user.s:machine.(s:port ? ":".s:port : "")."/".s:path " call Decho("exe sil! keepalt file ".fnameescape(url)." (bt=".&bt.")") exe "sil! keepj keepalt file ".fnameescape(url) exe "sil! keepj keepalt doau BufReadPre ".fnameescape(s:fname) sil call netrw#NetRead(2,url) if s:path !~ '.tar.bz2$' && s:path !~ '.tar.gz' && s:path !~ '.tar.xz' && s:path !~ '.txz' " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error exe "sil keepj keepalt doau BufReadPost ".fnameescape(s:fname) endif " save certain window-oriented variables into buffer-oriented variables {{{3 call s:SetBufWinVars() call s:NetrwOptionRestore("w:") " call Decho("setl ma nomod") setl ma nomod " call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("s:NetrwBrowse : file<".s:fname.">") return endif " use buffer-oriented WinVars if buffer variables exist but associated window variables don't {{{3 call s:UseBufWinVars() " set up some variables {{{3 let b:netrw_browser_active = 1 let dirname = dirname let s:last_sort_by = g:netrw_sort_by " set up menu {{{3 keepj call s:NetrwMenu(1) " set up buffer {{{3 let reusing= s:NetrwGetBuffer(a:islocal,dirname) " maintain markfile highlighting if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" " call Decho("bufnr(%)=".bufnr('%')) " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/") exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" else " call Decho("2match none") 2match none endif if reusing call s:NetrwOptionRestore("w:") " call Decho("(NetrwBrowse) setl noma nomod nowrap") setl noma nomod nowrap " call Decho("(set noma nomod nowrap) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("s:NetrwBrowse : re-using buffer") return endif " set b:netrw_curdir to the new directory name {{{3 " call Decho("set b:netrw_curdir to the new directory name: (buf#".bufnr("%").")") let b:netrw_curdir= dirname if b:netrw_curdir =~ '[/\\]$' let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e') endif if b:netrw_curdir == '' if has("amiga") " On the Amiga, the empty string connotes the current directory let b:netrw_curdir= getcwd() else " under unix, when the root directory is encountered, the result " from the preceding substitute is an empty string. let b:netrw_curdir= '/' endif endif if !a:islocal && b:netrw_curdir !~ '/$' let b:netrw_curdir= b:netrw_curdir.'/' endif " call Decho("b:netrw_curdir<".b:netrw_curdir.">") " ------------ " (local only) {{{3 " ------------ if a:islocal " call Decho("local only:") " Set up ShellCmdPost handling. Append current buffer to browselist call s:LocalFastBrowser() " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3 if !g:netrw_keepdir " call Decho("handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) " call Decho("l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist")) if !exists("&l:acd") || !&l:acd " call Decho('exe keepjumps lcd '.fnameescape(b:netrw_curdir)) try exe 'keepj lcd '.fnameescape(b:netrw_curdir) catch /^Vim\%((\a\+)\)\=:E472/ call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".b:netrw_curdir."> (permissions?)",61) if exists("w:netrw_prvdir") let b:netrw_curdir= w:netrw_prvdir else call s:NetrwOptionRestore("w:") " call Decho("(NetrwBrowse) setl noma nomod nowrap") setl noma nomod nowrap " call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") let b:netrw_curdir= dirname " call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") return endif endtry endif endif " -------------------------------- " remote handling: {{{3 " -------------------------------- else " call Decho("remote only:") " analyze dirname and g:netrw_list_cmd {{{4 " call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> dirname<".dirname.">") if dirname =~ "^NetrwTreeListing\>" let dirname= b:netrw_curdir " call Decho("(dirname was ".dirname.") dirname<".dirname.">") elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") let dirname= substitute(b:netrw_curdir,'\\','/','g') if dirname !~ '/$' let dirname= dirname.'/' endif let b:netrw_curdir = dirname " call Decho("(liststyle is TREELIST) dirname<".dirname.">") else let dirname = substitute(dirname,'\\','/','g') " call Decho("(normal) dirname<".dirname.">") endif let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$' if dirname !~ dirpat if !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20) endif keepj call s:NetrwOptionRestore("w:") " call Decho("(NetrwBrowse) setl noma nomod nowrap") setl noma nomod nowrap " call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">") return endif let b:netrw_curdir= dirname " call Decho("b:netrw_curdir<".b:netrw_curdir."> (remote)") endif " (additional remote handling) " ----------------------- " Directory Listing: {{{3 " ----------------------- keepj call s:NetrwMaps(a:islocal) keepj call s:PerformListing(a:islocal) if v:version >= 700 && has("balloon_eval") && &beval == 0 && &l:bexpr == "" && !exists("g:netrw_nobeval") let &l:bexpr= "netrw#NetrwBalloonHelp()" " call Decho("set up balloon help: l:bexpr=".&l:bexpr) set beval endif call s:NetrwOptionRestore("w:") " The s:LocalBrowseShellCmdRefresh() function is called by an autocmd " installed by s:LocalFastBrowser() when g:netrw_fastbrowse <= 1 (ie. slow, medium speed). " However, s:NetrwBrowse() causes the ShellCmdPost event itself to fire once; setting " the variable below avoids that second refresh of the screen. The s:LocalBrowseShellCmdRefresh() " function gets called due to that autocmd; it notices that the following variable is set " and skips the refresh and sets s:locbrowseshellcmd to zero. Oct 13, 2008 let s:locbrowseshellcmd= 1 " call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("s:NetrwBrowse : did PerformListing ft<".&ft.">") return endfun " --------------------------------------------------------------------- " s:NetrwFileInfo: supports qf (query for file information) {{{2 fun! s:NetrwFileInfo(islocal,fname) " call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">)") if a:islocal if (has("unix") || has("macunix")) && executable("/bin/ls") if exists("b:netrw_curdir") " call Decho('using ls with b:netrw_curdir<'.b:netrw_curdir.'>') if b:netrw_curdir =~ '/$' echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname)) else echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname)) endif else " call Decho('using ls '.a:fname." using cwd<".getcwd().">") echo system("/bin/ls -lsad ".shellescape(a:fname)) endif else " use vim functions to return information about file below cursor " call Decho("using vim functions to query for file info") if !isdirectory(a:fname) && !filereadable(a:fname) && a:fname =~ '[*@/]' let fname= substitute(a:fname,".$","","") else let fname= a:fname endif let t = getftime(fname) let sz = getfsize(fname) echo a:fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(fname)) " call Decho(fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(fname))) endif else echo "sorry, \"qf\" not supported yet for remote files" endif " call Dret("s:NetrwFileInfo") endfun " --------------------------------------------------------------------- " s:NetrwGetBuffer: {{{2 " returns 0=cleared buffer " 1=re-used buffer fun! s:NetrwGetBuffer(islocal,dirname) " call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle) let dirname= a:dirname " re-use buffer if possible {{{3 " call Decho("--re-use a buffer if possible--") if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST " find NetrwTreeList buffer if there is one " call Decho("find NetrwTreeList buffer if there is one") if exists("w:netrw_treebufnr") && w:netrw_treebufnr > 0 " call Decho(" re-use w:netrw_treebufnr=".w:netrw_treebufnr) let eikeep= &ei set ei=all exe "sil! b ".w:netrw_treebufnr let &ei= eikeep " call Dret("s:NetrwGetBuffer : bufnum#".w:netrw_treebufnr."<NetrwTreeListing>") return endif let bufnum= -1 " call Decho(" liststyle=TREE but w:netrw_treebufnr doesn't exist") else " find buffer number of buffer named precisely the same as dirname {{{3 " call Decho("--find buffer numnber of buffer named precisely the same as dirname--") " call Dredir("ls!") " get dirname and associated buffer number let bufnum = bufnr(escape(dirname,'\')) " call Decho(" find buffer<".dirname.">'s number ") " call Decho(" bufnr(dirname<".escape(dirname,'\').">)=".bufnum) if bufnum < 0 && dirname !~ '/$' " try appending a trailing / " call Decho(" try appending a trailing / to dirname<".dirname.">") let bufnum= bufnr(escape(dirname.'/','\')) if bufnum > 0 let dirname= dirname.'/' endif endif if bufnum < 0 && dirname =~ '/$' " try removing a trailing / " call Decho(" try removing a trailing / from dirname<".dirname.">") let bufnum= bufnr(escape(substitute(dirname,'/$','',''),'\')) if bufnum > 0 let dirname= substitute(dirname,'/$','','') endif endif " call Decho(" findbuf1: bufnum=bufnr('".dirname."')=".bufnum." bufname(".bufnum.")<".bufname(bufnum)."> (initial)") " note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/ and abc/ matches) if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.' " handle approximate matches " call Decho(" handling approx match: bufnum#".bufnum."<".bufname(bufnum)."> approx-dirname<".dirname.">") let ibuf = 1 let buflast = bufnr("$") " call Decho(" findbuf2: buflast=bufnr($)=".buflast) while ibuf <= buflast let bname= substitute(bufname(ibuf),'\\','/','g') let bname= substitute(bname,'.\zs/$','','') " call Decho(" findbuf3: while [ibuf=",ibuf."]<=[buflast=".buflast."]: dirname<".dirname."> bname=bufname(".ibuf.")<".bname.">") if bname != '' && dirname =~ '/'.bname.'/\=$' && dirname !~ '^/' " bname is not empty " dirname ends with bname, " dirname doesn't start with /, so its not a absolute path " call Decho(" findbuf3a: passes test 1 : dirname<".dirname.'> =~ /'.bname.'/\=$ && dirname !~ ^/') break endif if bname =~ '^'.dirname.'/\=$' " bname begins with dirname " call Decho(' findbuf3b: passes test 2 : bname<'.bname.'>=~^'.dirname.'/\=$') break endif if dirname =~ '^'.bname.'/$' " call Decho(' findbuf3c: passes test 3 : dirname<'.dirname.'>=~^'.bname.'/$') break endif if bname != '' && dirname =~ '/'.bname.'$' && bname == bufname("%") && line("$") == 1 " call Decho(' findbuf3d: passes test 4 : dirname<'.dirname.'>=~ /'.bname.'$') break endif let ibuf= ibuf + 1 endwhile if ibuf > buflast let bufnum= -1 else let bufnum= ibuf endif " call Decho(" findbuf4: bufnum=".bufnum." (ibuf=".ibuf." buflast=".buflast.")") endif endif " get enew buffer and name it -or- re-use buffer {{{3 sil! keepj mark ' if bufnum < 0 || !bufexists(bufnum) " call Decho("--get enew buffer and name it (bufexists([bufnum=".bufnum."])=".bufexists(bufnum).")") call s:NetrwEnew(dirname) " call Decho(" got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)") " name the buffer if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST " Got enew buffer; transform into a NetrwTreeListing " call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --") if !exists("s:netrw_treelistnum") let s:netrw_treelistnum= 1 else let s:netrw_treelistnum= s:netrw_treelistnum + 1 endif let w:netrw_treebufnr= bufnr("%") " call Decho(" exe sil! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum)) exe 'sil! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum) set bt=nofile noswf nnoremap <silent> <buffer> [ :sil call <SID>TreeListMove('[')<cr> nnoremap <silent> <buffer> ] :sil call <SID>TreeListMove(']')<cr> nnoremap <silent> <buffer> [[ :sil call <SID>TreeListMove('[')<cr> nnoremap <silent> <buffer> ]] :sil call <SID>TreeListMove(']')<cr> " call Decho(" tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr) else " let v:errmsg= "" " Decho let escdirname= fnameescape(dirname) " call Decho(" errmsg<".v:errmsg."> bufnr(escdirname<".escdirname.">)=".bufnr(escdirname)." bufname()<".bufname(bufnr(escdirname)).">") " call Decho(' exe sil! keepalt file '.escdirname) " let v:errmsg= "" " Decho exe 'sil! keepalt file '.escdirname " call Decho(" errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">") endif " call Decho(" named enew buffer#".bufnr("%")."<".bufname("%").">") else " Re-use the buffer " call Decho("--re-use buffer#".bufnum." (bufexists([bufnum=".bufnum."])=".bufexists(bufnum).")") let eikeep= &ei set ei=all if getline(2) =~ '^" Netrw Directory Listing' " call Decho(" re-use buffer#".bufnum."<".((bufnum > 0)? bufname(bufnum) : "")."> using: keepalt b ".bufnum) exe "sil! keepalt b ".bufnum else " call Decho(" reusing buffer#".bufnum."<".((bufnum > 0)? bufname(bufnum) : "")."> using: b ".bufnum) exe "sil! b ".bufnum endif if bufname("%") == '.' " call Decho("exe sil! keepalt file ".fnameescape(getcwd())) exe "sil! keepalt file ".fnameescape(getcwd()) endif let &ei= eikeep if line("$") <= 1 keepj call s:NetrwListSettings(a:islocal) " call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but its empty, so refresh it") return 0 elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST " call Decho("--re-use tree listing--") " call Decho(" clear buffer<".expand("%")."> with :%d") sil keepj %d keepj call s:NetrwListSettings(a:islocal) " call Dret("s:NetrwGetBuffer 0 : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh") return 0 else " call Dret("s:NetrwGetBuffer 1 : buf#".bufnr("%")) return 1 endif endif " do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc {{{3 " fastbrowse Local Remote Hiding a buffer implies it may be re-used (fast) " slow 0 D D Deleting a buffer implies it will not be re-used (slow) " med 1 D H " fast 2 H H " call Decho("--do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--") let fname= expand("%") keepj call s:NetrwListSettings(a:islocal) " call Decho("exe sil! keepalt file ".fnameescape(fname)) exe "sil! keepj keepalt file ".fnameescape(fname) " delete all lines from buffer {{{3 " call Decho("--delete all lines from buffer--") " call Decho(" clear buffer<".expand("%")."> with :%d") sil! keepalt keepj %d " call Dret("s:NetrwGetBuffer 0 : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) return 0 endfun " --------------------------------------------------------------------- " s:NetrwGetcwd: get the current directory. {{{2 " Change backslashes to forward slashes, if any. " If doesc is true, escape certain troublesome characters fun! s:NetrwGetcwd(doesc) " call Dfunc("NetrwGetcwd(doesc=".a:doesc.")") let curdir= substitute(getcwd(),'\\','/','ge') if curdir !~ '[\/]$' let curdir= curdir.'/' endif if a:doesc let curdir= fnameescape(curdir) endif " call Dret("NetrwGetcwd <".curdir.">") return curdir endfun " --------------------------------------------------------------------- " s:NetrwGetWord: it gets the directory/file named under the cursor {{{2 fun! s:NetrwGetWord() " call Dfunc("s:NetrwGetWord() line#".line(".")." liststyle=".g:netrw_liststyle." virtcol=".virtcol(".")) call s:UseBufWinVars() " insure that w:netrw_liststyle is set up if !exists("w:netrw_liststyle") if exists("g:netrw_liststyle") let w:netrw_liststyle= g:netrw_liststyle else let w:netrw_liststyle= s:THINLIST endif " call Decho("w:netrw_liststyle=".w:netrw_liststyle) endif if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt " Active Banner support " call Decho("active banner handling") keepj norm! 0 let dirname= "./" let curline= getline('.') if curline =~ '"\s*Sorted by\s' keepj norm s let s:netrw_skipbrowse= 1 echo 'Pressing "s" also works' elseif curline =~ '"\s*Sort sequence:' let s:netrw_skipbrowse= 1 echo 'Press "S" to edit sorting sequence' elseif curline =~ '"\s*Quick Help:' keepj norm ? let s:netrw_skipbrowse= 1 echo 'Pressing "?" also works' elseif curline =~ '"\s*\%(Hiding\|Showing\):' keepj norm a let s:netrw_skipbrowse= 1 echo 'Pressing "a" also works' elseif line("$") > w:netrw_bannercnt exe 'sil keepj '.w:netrw_bannercnt endif elseif w:netrw_liststyle == s:THINLIST " call Decho("thin column handling") keepj norm! 0 let dirname= getline('.') elseif w:netrw_liststyle == s:LONGLIST " call Decho("long column handling") keepj norm! 0 let dirname= substitute(getline('.'),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e') elseif w:netrw_liststyle == s:TREELIST " call Decho("treelist handling") let dirname= substitute(getline('.'),'^\(| \)*','','e') else " call Decho("obtain word from wide listing") let dirname= getline('.') if !exists("b:netrw_cpf") let b:netrw_cpf= 0 exe 'sil keepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' call histdel("/",-1) " call Decho("computed cpf=".b:netrw_cpf) endif " call Decho("buf#".bufnr("%")."<".bufname("%").">") let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf " call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart." bannercnt=".w:netrw_bannercnt) " call Decho("1: dirname<".dirname.">") if filestart == 0 keepj norm! 0ma else call cursor(line("."),filestart+1) keepj norm! ma endif let rega= @a let eofname= filestart + b:netrw_cpf + 1 if eofname <= col("$") call cursor(line("."),filestart+b:netrw_cpf+1) keepj norm! "ay`a else keepj norm! "ay$ endif let dirname = @a let @a = rega " call Decho("2: dirname<".dirname.">") let dirname= substitute(dirname,'\s\+$','','e') " call Decho("3: dirname<".dirname.">") endif " symlinks are indicated by a trailing "@". Remove it before further processing. let dirname= substitute(dirname,"@$","","") " executables are indicated by a trailing "*". Remove it before further processing. let dirname= substitute(dirname,"\*$","","") " call Dret("s:NetrwGetWord <".dirname.">") return dirname endfun " --------------------------------------------------------------------- " s:NetrwListSettings: make standard settings for a netrw listing {{{2 fun! s:NetrwListSettings(islocal) " call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")") let fname= bufname("%") " call Decho("setlocal bt=nofile nobl ma nonu nowrap noro") setlocal bt=nofile nobl ma nonu nowrap noro " call Decho("exe sil! keepalt file ".fnameescape(fname)) exe "sil! keepalt file ".fnameescape(fname) if g:netrw_use_noswf setlocal noswf endif " call Dredir("ls!") " call Decho("exe setlocal ts=".g:netrw_maxfilenamelen) exe "setlocal ts=".g:netrw_maxfilenamelen setlocal isk+=.,~,- if g:netrw_fastbrowse > a:islocal setlocal bh=hide else setlocal bh=delete endif " call Dret("s:NetrwListSettings") endfun " --------------------------------------------------------------------- " s:NetrwListStyle: {{{2 " islocal=0: remote browsing " =1: local browsing fun! s:NetrwListStyle(islocal) " call Dfunc("NetrwListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle) let fname = s:NetrwGetWord() if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST " call Decho("fname<".fname.">") " call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle) " call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">") if w:netrw_liststyle == s:THINLIST " use one column listing " call Decho("use one column list") let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') elseif w:netrw_liststyle == s:LONGLIST " use long list " call Decho("use long list") let g:netrw_list_cmd = g:netrw_list_cmd." -l" elseif w:netrw_liststyle == s:WIDELIST " give wide list " call Decho("use wide list") let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') elseif w:netrw_liststyle == s:TREELIST " call Decho("use tree list") let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') else keepj call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46) let g:netrw_liststyle = s:THINLIST let w:netrw_liststyle = g:netrw_liststyle let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') endif setlocal ma noro " call Decho("setlocal ma noro") " clear buffer - this will cause NetrwBrowse/LocalBrowseCheck to do a refresh " call Decho("clear buffer<".expand("%")."> with :%d") sil! keepj %d " following prevents tree listing buffer from being marked "modified" " call Decho("(NetrwListStyle) setl nomod") setl nomod " call Decho("(NetrwListStyle) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " refresh the listing " call Decho("(NetrwListStyle) refresh the listing") let svpos= netrw#NetrwSavePosn() keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) keepj call s:NetrwCursor() " keep cursor on the filename sil! keepj $ let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') " call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A')) if result <= 0 && exists("w:netrw_bannercnt") exe "sil! keepj ".w:netrw_bannercnt endif " call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : "")) endfun " --------------------------------------------------------------------- " s:NetrwBannerCtrl: toggles the display of the banner {{{2 fun! s:NetrwBannerCtrl(islocal) " call Dfunc("s:NetrwBannerCtrl(islocal=".a:islocal.") g:netrw_banner=".g:netrw_banner) " toggle the banner (enable/suppress) let g:netrw_banner= !g:netrw_banner " refresh the listing let svpos= netrw#NetrwSavePosn() call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) " keep cursor on the filename let fname= s:NetrwGetWord() sil keepj $ let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') " call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A')) if result <= 0 && exists("w:netrw_bannercnt") exe "keepj ".w:netrw_bannercnt endif " call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner) endfun " --------------------------------------------------------------------- " s:NetrwBookmarkMenu: Uses menu priorities {{{2 " .2.[cnt] for bookmarks, and " .3.[cnt] for history " (see s:NetrwMenu()) fun! s:NetrwBookmarkMenu() if !exists("s:netrw_menucnt") return endif " call Dfunc("NetrwBookmarkMenu() histcnt=".g:netrw_dirhist_cnt." menucnt=".s:netrw_menucnt) " the following test assures that gvim is running, has menus available, and has menus enabled. if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu if exists("g:NetrwTopLvlMenu") " call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)") exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks' exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete' endif if !exists("s:netrw_initbookhist") call s:NetrwBookHistRead() endif " show bookmarked places if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] let cnt= 1 for bmd in g:netrw_bookmarklist " call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmd.' :e '.bmd) let bmd= escape(bmd,g:netrw_menu_escape) " show bookmarks for goto menu exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmd.' :e '.bmd."\<cr>" " show bookmarks for deletion menu exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.bmd.' '.cnt."mB" let cnt= cnt + 1 endfor endif " show directory browsing history if g:netrw_dirhistmax > 0 let cnt = g:netrw_dirhist_cnt let first = 1 let histcnt = 0 while ( first || cnt != g:netrw_dirhist_cnt ) let histcnt = histcnt + 1 let priority = g:netrw_dirhist_cnt + histcnt if exists("g:netrw_dirhist_{cnt}") let histdir= escape(g:netrw_dirhist_{cnt},g:netrw_menu_escape) " call Decho('sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir) exe 'sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir."\<cr>" endif let first = 0 let cnt = ( cnt - 1 ) % g:netrw_dirhistmax if cnt < 0 let cnt= cnt + g:netrw_dirhistmax endif endwhile endif endif " call Dret("NetrwBookmarkMenu") endfun " --------------------------------------------------------------------- " s:NetrwBrowseChgDir: constructs a new directory based on the current {{{2 " directory and a new directory name. Also, if the " "new directory name" is actually a file, " NetrwBrowseChgDir() edits the file. fun! s:NetrwBrowseChgDir(islocal,newdir,...) " call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">") if !exists("b:netrw_curdir") " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called " and the current window is the NetrwMessage window. " call Decho("(NetrwBrowseChgDir) b:netrw_curdir doesn't exist!") " call Decho("(NetrwBrowseChgDir) getcwd<".getcwd().">") " call Dredir("ls!") " call Dret("s:NetrwBrowseChgDir") return endif keepj call s:NetrwOptionSave("s:") keepj call s:NetrwSafeOptions() let nbcd_curpos = netrw#NetrwSavePosn() let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos " call Decho("(NetrwBrowseChgDir) setting s:nbcd_curpos_".bufnr('%')." to SavePosn") if (has("win32") || has("win95") || has("win64") || has("win16")) let dirname = substitute(b:netrw_curdir,'\\','/','ge') else let dirname= b:netrw_curdir endif let newdir = a:newdir let dolockout = 0 " set up o/s-dependent directory recognition pattern if has("amiga") let dirpat= '[\/:]$' else let dirpat= '[\/]$' endif " call Decho("(NetrwBrowseChgDir) dirname<".dirname."> dirpat<".dirpat.">") if dirname !~ dirpat " apparently vim is "recognizing" that it is in a directory and " is removing the trailing "/". Bad idea, so let's put it back. let dirname= dirname.'/' " call Decho("adjusting dirname<".dirname.">") endif if newdir !~ dirpat " ------------ " edit a file: " ------------ " call Decho('(NetrwBrowseChgDir) case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">") " save position for benefit of Rexplore let s:rexposn_{bufnr("%")}= netrw#NetrwSavePosn() " call Decho("(NetrwBrowseChgDir) setting s:rexposn_".bufnr("%")." to SavePosn") if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)' let dirname= s:NetrwTreeDir() if dirname =~ '/$' let dirname= dirname.newdir else let dirname= s:NetrwTreeDir()."/".newdir endif " call Decho("(NetrwBrowseChgDir) dirname<".dirname.">") " call Decho("(NetrwBrowseChgDir) tree listing") elseif newdir =~ '^\(/\|\a:\)' let dirname= newdir else let dirname= s:ComposePath(dirname,newdir) endif " call Decho("(NetrwBrowseChgDir) handling a file: dirname<".dirname."> (a:0=".a:0.")") " this lets NetrwBrowseX avoid the edit if a:0 < 1 " call Decho("(NetrwBrowseChgDir) set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist")) keepj call s:NetrwOptionRestore("s:") if !exists("s:didsplit") if g:netrw_browse_split == 1 new if !&ea wincmd _ endif elseif g:netrw_browse_split == 2 rightb vert new if !&ea wincmd | endif elseif g:netrw_browse_split == 3 tabnew elseif g:netrw_browse_split == 4 if s:NetrwPrevWinOpen(2) == 3 " call Dret("s:NetrwBrowseChgDir") return endif else " handling a file, didn't split, so remove menu " call Decho("(NetrwBrowseChgDir) handling a file+didn't split, so remove menu") call s:NetrwMenu(0) " optional change to window if g:netrw_chgwin >= 1 exe "keepjumps ".g:netrw_chgwin."wincmd w" endif endif endif " the point where netrw actually edits the (local) file " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will if a:islocal " call Decho("(NetrwBrowseChgDir) edit local file: exe e! ".fnameescape(dirname)) exe "e! ".fnameescape(dirname) else " call Decho("(NetrwBrowseChgDir) remote file: NetrwBrowse will edit it") endif let dolockout= 1 " handle g:Netrw_funcref -- call external-to-netrw functions " This code will handle g:Netrw_funcref as an individual function reference " or as a list of function references. It will ignore anything that's not " a function reference. See :help Funcref for information about function references. if exists("g:Netrw_funcref") " call Decho("(NetrwBrowseChgDir) handle optional Funcrefs") if type(g:Netrw_funcref) == 2 " call Decho("(NetrwBrowseChgDir) handling a g:Netrw_funcref") keepj call g:Netrw_funcref() elseif type(g:Netrw_funcref) == 3 " call Decho("(NetrwBrowseChgDir) handling a list of g:Netrw_funcrefs") for Fncref in g:Netrw_funcref if type(FncRef) == 2 keepj call FncRef() endif endfor endif endif endif elseif newdir =~ '^/' " --------------------------------- " just go to the new directory spec " --------------------------------- " call Decho('(NetrwBrowseChgDir) case "just go to new directory spec": newdir<'.newdir.'>') let dirname= newdir keepj call s:SetRexDir(a:islocal,dirname) keepj call s:NetrwOptionRestore("s:") elseif newdir == './' " -------------------------- " refresh the directory list " -------------------------- " call Decho('(NetrwBrowseChgDir) case "refresh directory listing": newdir == "./"') keepj call s:SetRexDir(a:islocal,dirname) elseif newdir == '../' " ------------------- " go up one directory " ------------------- " call Decho('(NetrwBrowseChgDir) case "go up one directory": newdir == "../"') if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") " force a refresh " call Decho("(NetrwBrowseChgDir) clear buffer<".expand("%")."> with :%d") " call Decho("(NetrwBrowseChgDir) setl noro ma") setl noro ma keepj %d endif if has("amiga") " amiga " call Decho('(NetrwBrowseChgDir) case "go up one directory": newdir == "../" and amiga') if a:islocal let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','') let dirname= substitute(dirname,'/$','','') else let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','') endif " call Decho("(NetrwBrowseChgDir) amiga: dirname<".dirname."> (go up one dir)") else " unix or cygwin " call Decho('(NetrwBrowseChgDir) case "go up one directory": newdir == "../" and unix or cygwin') if a:islocal let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') if dirname == "" let dirname= '/' endif else let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','') endif " call Decho("(NetrwBrowseChgDir) unix: dirname<".dirname."> (go up one dir)") endif keepj call s:SetRexDir(a:islocal,dirname) elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") " call Decho('(NetrwBrowseChgDir) case liststyle is TREELIST and w:netrw_treedict exists') " force a refresh (for TREELIST, wait for NetrwTreeDir() to force the refresh) " call Decho("(NetrwBrowseChgDir) setl noro ma") setl noro ma if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")) " call Decho("(NetrwBrowseChgDir) clear buffer<".expand("%")."> with :%d") keepj %d endif let treedir = s:NetrwTreeDir() let s:treecurpos = nbcd_curpos let haskey= 0 " call Decho("(NetrwBrowseChgDir) w:netrw_treedict<".string(w:netrw_treedict).">") " search treedict for tree dir as-is if has_key(w:netrw_treedict,treedir) " call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'> : found it!') let haskey= 1 else " call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'> : not found') endif " search treedict for treedir with a / appended if !haskey && treedir !~ '/$' if has_key(w:netrw_treedict,treedir."/") let treedir= treedir."/" " call Decho('(NetrwBrowseChgDir) ....searched.for treedir<'.treedir.'> found it!') let haskey = 1 else " call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'/> : not found') endif endif " search treedict for treedir with any trailing / elided if !haskey && treedir =~ '/$' let treedir= substitute(treedir,'/$','','') if has_key(w:netrw_treedict,treedir) " call Decho('(NetrwBrowseChgDir) ....searched.for treedir<'.treedir.'> found it!') let haskey = 1 else " call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'> : not found') endif endif if haskey " close tree listing for selected subdirectory " call Decho("(NetrwBrowseChgDir) closing selected subdirectory<".dirname.">") call remove(w:netrw_treedict,treedir) " call Decho("(NetrwBrowseChgDir) removed entry<".treedir."> from treedict") " call Decho("(NetrwBrowseChgDir) yielding treedict<".string(w:netrw_treedict).">") let dirname= w:netrw_treetop else " go down one directory let dirname= substitute(treedir,'/*$','/','') " call Decho("(NetrwBrowseChgDir) go down one dir: treedir<".treedir.">") endif keepj call s:SetRexDir(a:islocal,dirname) let s:treeforceredraw = 1 else " go down one directory let dirname= s:ComposePath(dirname,newdir) " call Decho("(NetrwBrowseChgDir) go down one dir: dirname<".dirname."> newdir<".newdir.">") keepj call s:SetRexDir(a:islocal,dirname) endif keepj call s:NetrwOptionRestore("s:") if dolockout " call Decho("(NetrwBrowseChgDir) filewritable(dirname<".dirname.">)=".filewritable(dirname)) if filewritable(dirname) " call Decho("(NetrwBrowseChgDir) doing modification lockout settings: ma nomod noro") " call Decho("(NetrwBrowseChgDir) setl ma nomod noro") setl ma nomod noro " call Decho("(NetrwBrowseChgDir) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") else " call Decho("(NetrwBrowseChgDir) doing modification lockout settings: ma nomod ro") " call Decho("(NetrwBrowseChgDir) setl ma nomod noro") setl ma nomod ro " call Decho("(NetrwBrowseChgDir) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") endif endif " call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">") return dirname endfun " --------------------------------------------------------------------- " s:NetrwBrowseX: (implements "x") executes a special "viewer" script or program for the {{{2 " given filename; typically this means given their extension. " 0=local, 1=remote fun! netrw#NetrwBrowseX(fname,remote) " call Dfunc("NetrwBrowseX(fname<".a:fname."> remote=".a:remote.")") " special core dump handler if a:fname =~ '/core\(\.\d\+\)\=$' if exists("g:Netrw_corehandler") if type(g:Netrw_corehandler) == 2 " g:Netrw_corehandler is a function reference (see :help Funcref) " call Decho("g:Netrw_corehandler is a funcref") call g:Netrw_corehandler(a:fname) elseif type(g:Netrw_corehandler) == 3) " g:Netrw_corehandler is a List of function references (see :help Funcref) " call Decho("g:Netrw_corehandler is a List") for Fncref in g:Netrw_corehandler if type(FncRef) == 2 call FncRef(a:fname) endif endfor endif " call Dret("NetrwBrowseX : coredump handler invoked") return endif endif " set up the filename " (lower case the extension, make a local copy of a remote file) let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e') if has("win32") || has("win95") || has("win64") || has("win16") let exten= substitute(exten,'^.*$','\L&\E','') endif " call Decho("exten<".exten.">") " seems kde systems often have gnome-open due to dependencies, even though " gnome-open's subsidiary display tools are largely absent. Kde systems " usually have "kdeinit" running, though... (tnx Mikolaj Machowski) if !exists("s:haskdeinit") if has("unix") let s:haskdeinit= system("ps -e") =~ 'kdeinit' if v:shell_error let s:haskdeinit = 0 endif else let s:haskdeinit= 0 endif " call Decho("setting s:haskdeinit=".s:haskdeinit) endif if a:remote == 1 " create a local copy " call Decho("a:remote=".a:remote.": create a local copy of <".a:fname.">") setlocal bh=delete call netrw#NetRead(3,a:fname) " attempt to rename tempfile let basename= substitute(a:fname,'^\(.*\)/\(.*\)\.\([^.]*\)$','\2','') let newname= substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','') " call Decho("basename<".basename.">") " call Decho("newname <".newname.">") if rename(s:netrw_tmpfile,newname) == 0 " renaming succeeded let fname= newname else " renaming failed let fname= s:netrw_tmpfile endif else let fname= a:fname " special ~ handler for local if fname =~ '^\~' && expand("$HOME") != "" " call Decho('invoking special ~ handler') let fname= substitute(fname,'^\~',expand("$HOME"),'') endif endif " call Decho("fname<".fname.">") " call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten)) " set up redirection if &srr =~ "%s" if (has("win32") || has("win95") || has("win64") || has("win16")) let redir= substitute(&srr,"%s","nul","") else let redir= substitute(&srr,"%s","/dev/null","") endif elseif (has("win32") || has("win95") || has("win64") || has("win16")) let redir= &srr . "nul" else let redir= &srr . "/dev/null" endif " call Decho("redir{".redir."} srr{".&srr."}") " extract any viewing options. Assumes that they're set apart by quotes. if exists("g:netrw_browsex_viewer") " call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") if g:netrw_browsex_viewer =~ '\s' let viewer = substitute(g:netrw_browsex_viewer,'\s.*$','','') let viewopt = substitute(g:netrw_browsex_viewer,'^\S\+\s*','','')." " let oviewer = '' let cnt = 1 while !executable(viewer) && viewer != oviewer let viewer = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\1','') let viewopt = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\3','')." " let cnt = cnt + 1 let oviewer = viewer " call Decho("!exe: viewer<".viewer."> viewopt<".viewopt.">") endwhile else let viewer = g:netrw_browsex_viewer let viewopt = "" endif " call Decho("viewer<".viewer."> viewopt<".viewopt.">") endif " execute the file handler if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-' " call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") let ret= netrwFileHandlers#Invoke(exten,fname) elseif exists("g:netrw_browsex_viewer") && executable(viewer) " call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") " call Decho("exe sil !".viewer." ".viewopt.shellescape(fname,1).redir) exe "sil !".viewer." ".viewopt.shellescape(fname,1).redir let ret= v:shell_error elseif has("win32") || has("win64") if executable("start") " call Decho('exe sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) exe 'sil !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) elseif executable("rundll32") " call Decho('exe sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) exe 'sil !rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) else call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74) endif call inputsave()|call input("Press <cr> to continue")|call inputrestore() let ret= v:shell_error elseif has("unix") && executable("gnome-open") && !s:haskdeinit " call Decho("exe sil !gnome-open ".shellescape(fname,1)." ".redir) exe "sil !gnome-open ".shellescape(fname,1).redir let ret= v:shell_error elseif has("unix") && executable("kfmclient") && s:haskdeinit " call Decho("exe sil !kfmclient exec ".shellescape(fname,1)." ".redir) exe "sil !kfmclient exec ".shellescape(fname,1)." ".redir let ret= v:shell_error elseif has("macunix") && executable("open") " call Decho("exe sil !open ".shellescape(fname,1)." ".redir) exe "sil !open ".shellescape(fname,1)." ".redir let ret= v:shell_error else " netrwFileHandlers#Invoke() always returns 0 let ret= netrwFileHandlers#Invoke(exten,fname) endif " if unsuccessful, attempt netrwFileHandlers#Invoke() if ret let ret= netrwFileHandlers#Invoke(exten,fname) endif " restoring redraw! after external file handlers redraw! " cleanup: remove temporary file, " delete current buffer if success with handler, " return to prior buffer (directory listing) " Feb 12, 2008: had to de-activiate removal of " temporary file because it wasn't getting seen. " if a:remote == 1 && fname != a:fname " call Decho("deleting temporary file<".fname.">") " call s:NetrwDelete(fname) " endif if a:remote == 1 setlocal bh=delete bt=nofile if g:netrw_use_noswf setlocal noswf endif exe "sil! keepj norm! \<c-o>" " redraw! endif " call Dret("NetrwBrowseX") endfun " --------------------------------------------------------------------- " s:NetrwChgPerm: (implements "gp") change file permission {{{2 fun! s:NetrwChgPerm(islocal,curdir) " call Dfunc("s:NetrwChgPerm(islocal=".a:islocal." curdir<".a:curdir.">)") call inputsave() let newperm= input("Enter new permission: ") call inputrestore() let chgperm= substitute(g:netrw_chgperm,'\<FILENAME\>',shellescape(expand("<cfile>")),'') let chgperm= substitute(chgperm,'\<PERM\>',shellescape(newperm),'') " call Decho("chgperm<".chgperm.">") call system(chgperm) if v:shell_error != 0 keepj call netrw#ErrorMsg(1,"changing permission on file<".expand("<cfile>")."> seems to have failed",75) endif if a:islocal keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) endif " call Dret("s:NetrwChgPerm") endfun " --------------------------------------------------------------------- " s:NetrwClearExplore: clear explore variables (if any) {{{2 fun! s:NetrwClearExplore() " call Dfunc("s:NetrwClearExplore()") 2match none if exists("s:explore_match") |unlet s:explore_match |endif if exists("s:explore_indx") |unlet s:explore_indx |endif if exists("s:netrw_explore_prvdir") |unlet s:netrw_explore_prvdir |endif if exists("s:dirstarstar") |unlet s:dirstarstar |endif if exists("s:explore_prvdir") |unlet s:explore_prvdir |endif if exists("w:netrw_explore_indx") |unlet w:netrw_explore_indx |endif if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif " redraw! echo " " echo " " " call Dret("s:NetrwClearExplore") endfun " --------------------------------------------------------------------- " netrw#Explore: launch the local browser in the directory of the current file {{{2 " indx: == -1: Nexplore " == -2: Pexplore " == +: this is overloaded: " * If Nexplore/Pexplore is in use, then this refers to the " indx'th item in the w:netrw_explore_list[] of items which " matched the */pattern **/pattern *//pattern **//pattern " * If Hexplore or Vexplore, then this will override " g:netrw_winsize to specify the qty of rows or columns the " newly split window should have. " dosplit==0: the window will be split iff the current file has been modified " dosplit==1: the window will be split before running the local browser " style == 0: Explore style == 1: Explore! " == 2: Hexplore style == 3: Hexplore! " == 4: Vexplore style == 5: Vexplore! " == 6: Texplore fun! netrw#Explore(indx,dosplit,style,...) " call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified." modifiable=".&modifiable." a:0=".a:0." win#".winnr()." buf#".bufnr("%")) if !exists("b:netrw_curdir") let b:netrw_curdir= getcwd() " call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)") endif let curdir = simplify(b:netrw_curdir) let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e') " call Decho("curdir<".curdir."> curfiledir<".curfiledir.">") " save registers sil! let keepregstar = @* sil! let keepregplus = @+ sil! let keepregslash= @/ " if dosplit or file has been modified if a:dosplit || &modified || a:style == 6 " call Decho("case dosplit=".a:dosplit." modified=".&modified." a:style=".a:style.": dosplit or file has been modified") call s:SaveWinVars() let winsz= g:netrw_winsize if a:indx > 0 let winsz= a:indx endif if a:style == 0 " Explore, Sexplore " call Decho("style=0: Explore or Sexplore") let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz exe winsz."wincmd s" elseif a:style == 1 "Explore!, Sexplore! " call Decho("style=1: Explore! or Sexplore!") let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz exe winsz."wincmd v" elseif a:style == 2 " Hexplore " call Decho("style=2: Hexplore") let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz exe "bel ".winsz."wincmd s" elseif a:style == 3 " Hexplore! " call Decho("style=3: Hexplore!") let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz exe "abo ".winsz."wincmd s" elseif a:style == 4 " Vexplore " call Decho("style=4: Vexplore") let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz exe "lefta ".winsz."wincmd v" elseif a:style == 5 " Vexplore! " call Decho("style=5: Vexplore!") let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz exe "rightb ".winsz."wincmd v" elseif a:style == 6 " Texplore call s:SaveBufVars() " call Decho("style = 6: Texplore") exe "tabnew ".fnameescape(curdir) call s:RestoreBufVars() endif call s:RestoreWinVars() " else " Decho " call Decho("case a:dosplit=".a:dosplit." AND modified=".&modified." AND a:style=".a:style." is not 6") endif keepj norm! 0 if a:0 > 0 " call Decho("case [a:0=".a:0."] > 0") if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)) " call Decho("..case a:1<".a:1.">: starts with ~ and unix or cygwin") let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),'')) " call Decho("..using dirname<".dirname."> (case: ~ && unix||cygwin)") elseif a:1 == '.' " call Decho("..case a:1<".a:1.">: matches .") let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd()) if dirname !~ '/$' let dirname= dirname."/" endif " call Decho("..using dirname<".dirname."> (case: ".(exists("b:netrw_curdir")? "b:netrw_curdir" : "getcwd()").")") elseif a:1 =~ '\$' " call Decho("..case a:1<".a:1.">: matches ending $") let dirname= simplify(expand(a:1)) " call Decho("..using user-specified dirname<".dirname."> with $env-var") elseif a:1 !~ '^\*\{1,2}/' " call Decho("..case a:1<".a:1.">: other, not pattern or filepattern") let dirname= simplify(a:1) " call Decho("..using user-specified dirname<".dirname.">") else " call Decho("..case a:1: pattern or filepattern") let dirname= a:1 endif else " clear explore " call Decho("case a:0=".a:0.": clearing Explore list") call s:NetrwClearExplore() " call Dret("netrw#Explore : cleared list") return endif " call Decho("dirname<".dirname.">") if dirname =~ '\.\./\=$' let dirname= simplify(fnamemodify(dirname,':p:h')) elseif dirname =~ '\.\.' || dirname == '.' let dirname= simplify(fnamemodify(dirname,':p')) endif " call Decho("dirname<".dirname."> (after simplify)") if dirname =~ '^\*//' " starpat=1: Explore *//pattern (current directory only search for files containing pattern) " call Decho("case Explore *//pattern") let pattern= substitute(dirname,'^\*//\(.*\)$','\1','') let starpat= 1 " call Decho("..Explore *//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">") if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif elseif dirname =~ '^\*\*//' " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) " call Decho("case Explore **//pattern") let pattern= substitute(dirname,'^\*\*//','','') let starpat= 2 " call Decho("..Explore **//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">") elseif dirname =~ '/\*\*/' " handle .../**/.../filepat " call Decho("case Explore .../**/.../filepat") let prefixdir= substitute(dirname,'^\(.\{-}\)\*\*.*$','\1','') if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && (has("win32") || has("win95") || has("win64") || has("win16"))) let b:netrw_curdir = prefixdir else let b:netrw_curdir= getcwd().'/'.prefixdir endif let dirname= substitute(dirname,'^.\{-}\(\*\*/.*\)$','\1','') let starpat= 4; " call Decho("..pwd<".getcwd()."> dirname<".dirname.">") " call Decho("..case Explore ../**/../filepat (starpat=".starpat.")") elseif dirname =~ '^\*/' " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) let starpat= 3 " call Decho("case Explore */filepat (starpat=".starpat.")") elseif dirname=~ '^\*\*/' " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) let starpat= 4 " call Decho("case Explore **/filepat (starpat=".starpat.")") else let starpat= 0 " call Decho("default case: starpat=".starpat) endif if starpat == 0 && a:indx >= 0 " [Explore Hexplore Vexplore Sexplore] [dirname] " call Decho("case starpat==0 && a:indx=".a:indx.": dirname<".dirname."> Explore Hexplore Vexplore Sexplore") if dirname == "" let dirname= curfiledir " call Decho("..empty dirname, using current file's directory<".dirname.">") endif if dirname =~ '^scp:' || dirname =~ '^ftp:' " call Decho("..calling NetrwBrowse(0,dirname<".dirname.">)") call s:NetrwBrowse(0,dirname) else if dirname == ""|let dirname= getcwd()|endif " call Decho("..calling LocalBrowseCheck(dirname<".dirname.">)") call netrw#LocalBrowseCheck(dirname) " call Decho("win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) endif " call Decho("curdir<".curdir.">") if has("win32") || has("win95") || has("win64") || has("win16") keepj call search('\<'.substitute(curdir,'^.*[/\\]','','e').'\>','cW') else keepj call search('\<'.substitute(curdir,'^.*/','','e').'\>','cW') endif " starpat=1: Explore *//pattern (current directory only search for files containing pattern) " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) elseif a:indx <= 0 " Nexplore, Pexplore, Explore: handle starpat " call Decho("case a:indx<=0: Nexplore, Pexplore, <s-down>, <s-up> starpat=".starpat." a:indx=".a:indx) if !mapcheck("<s-up>","n") && !mapcheck("<s-down>","n") && exists("b:netrw_curdir") " call Decho("..set up <s-up> and <s-down> maps") let s:didstarstar= 1 nnoremap <buffer> <silent> <s-up> :Pexplore<cr> nnoremap <buffer> <silent> <s-down> :Nexplore<cr> endif if has("path_extra") " call Decho("..starpat=".starpat.": has +path_extra") if !exists("w:netrw_explore_indx") let w:netrw_explore_indx= 0 endif let indx = a:indx " call Decho("..starpat=".starpat.": set indx= [a:indx=".indx."]") if indx == -1 " Nexplore " call Decho("..case Nexplore with starpat=".starpat.": (indx=".indx.")") if !exists("w:netrw_explore_list") " sanity check keepj call netrw#ErrorMsg(s:WARNING,"using Nexplore or <s-down> improperly; see help for netrw-starstar",40) sil! let @* = keepregstar sil! let @+ = keepregstar sil! let @/ = keepregslash " call Dret("netrw#Explore") return endif let indx= w:netrw_explore_indx if indx < 0 | let indx= 0 | endif if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif let curfile= w:netrw_explore_list[indx] " call Decho("....indx=".indx." curfile<".curfile.">") while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx] let indx= indx + 1 " call Decho("....indx=".indx." (Nexplore while loop)") endwhile if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif " call Decho("....Nexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) elseif indx == -2 " Pexplore " call Decho("case Pexplore with starpat=".starpat.": (indx=".indx.")") if !exists("w:netrw_explore_list") " sanity check keepj call netrw#ErrorMsg(s:WARNING,"using Pexplore or <s-up> improperly; see help for netrw-starstar",41) sil! let @* = keepregstar sil! let @+ = keepregstar sil! let @/ = keepregslash " call Dret("netrw#Explore") return endif let indx= w:netrw_explore_indx if indx < 0 | let indx= 0 | endif if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif let curfile= w:netrw_explore_list[indx] " call Decho("....indx=".indx." curfile<".curfile.">") while indx >= 0 && curfile == w:netrw_explore_list[indx] let indx= indx - 1 " call Decho("....indx=".indx." (Pexplore while loop)") endwhile if indx < 0 | let indx= 0 | endif " call Decho("....Pexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) else " Explore -- initialize " build list of files to Explore with Nexplore/Pexplore " call Decho("..starpat=".starpat.": case Explore: initialize (indx=".indx.")") keepj call s:NetrwClearExplore() let w:netrw_explore_indx= 0 if !exists("b:netrw_curdir") let b:netrw_curdir= getcwd() endif " call Decho("....starpat=".starpat.": b:netrw_curdir<".b:netrw_curdir.">") " switch on starpat to build the w:netrw_explore_list of files if starpat == 1 " starpat=1: Explore *//pattern (current directory only search for files containing pattern) " call Decho("..case starpat=".starpat.": build *//pattern list (curdir-only srch for files containing pattern) &hls=".&hls) " call Decho("....pattern<".pattern.">") try exe "keepj noautocmd vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*" catch /^Vim\%((\a\+)\)\=:E480/ call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pattern.">",76) " call Dret("netrw#Explore : unable to find pattern<".pattern.">") return endtry let w:netrw_explore_list = s:NetrwExploreListUniq(map(getqflist(),'bufname(v:val.bufnr)')) if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif elseif starpat == 2 " starpat=2: Explore **//pattern (recursive descent search for files containing pattern) " call Decho("..case starpat=".starpat.": build **//pattern list (recursive descent files containing pattern)") " call Decho("....pattern<".pattern.">") try exe "sil keepj noautocmd vimgrep /".pattern."/gj "."**/*" catch /^Vim\%((\a\+)\)\=:E480/ call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45) if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif sil! let @* = keepregstar sil! let @+ = keepregstar sil! let @/ = keepregslash " call Dret("netrw#Explore : no files matched pattern") return endtry let s:netrw_curdir = b:netrw_curdir let w:netrw_explore_list = getqflist() let w:netrw_explore_list = s:NetrwExploreListUniq(map(w:netrw_explore_list,'s:netrw_curdir."/".bufname(v:val.bufnr)')) if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif elseif starpat == 3 " starpat=3: Explore */filepat (search in current directory for filenames matching filepat) " call Decho("..case starpat=".starpat.": build */filepat list (curdir-only srch filenames matching filepat) &hls=".&hls) let filepat= substitute(dirname,'^\*/','','') let filepat= substitute(filepat,'^[%#<]','\\&','') " call Decho("....b:netrw_curdir<".b:netrw_curdir.">") " call Decho("....filepat<".filepat.">") let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".filepat),'\n')) if &hls | let keepregslash= s:ExplorePatHls(filepat) | endif elseif starpat == 4 " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat) " call Decho("..case starpat=".starpat.": build **/filepat list (recursive descent srch filenames matching filepat) &hls=".&hls) let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".dirname),'\n')) if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif endif " switch on starpat to build w:netrw_explore_list let w:netrw_explore_listlen = len(w:netrw_explore_list) " call Decho("....w:netrw_explore_list<".string(w:netrw_explore_list).">") " call Decho("....w:netrw_explore_listlen=".w:netrw_explore_listlen) if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/') keepj call netrw#ErrorMsg(s:WARNING,"no files matched",42) sil! let @* = keepregstar sil! let @+ = keepregstar sil! let @/ = keepregslash " call Dret("netrw#Explore : no files matched") return endif endif " if indx ... endif " NetrwStatusLine support - for exploring support let w:netrw_explore_indx= indx " call Decho("....w:netrw_explore_list<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen) " wrap the indx around, but issue a note if indx >= w:netrw_explore_listlen || indx < 0 " call Decho("....wrap indx (indx=".indx." listlen=".w:netrw_explore_listlen.")") let indx = (indx < 0)? ( w:netrw_explore_listlen - 1 ) : 0 let w:netrw_explore_indx= indx keepj call netrw#ErrorMsg(s:NOTE,"no more files match Explore pattern",43) endif exe "let dirfile= w:netrw_explore_list[".indx."]" " call Decho("....dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">") let newdir= substitute(dirfile,'/[^/]*$','','e') " call Decho("....newdir<".newdir.">") " call Decho("....calling LocalBrowseCheck(newdir<".newdir.">)") call netrw#LocalBrowseCheck(newdir) if !exists("w:netrw_liststyle") let w:netrw_liststyle= g:netrw_liststyle endif if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:LONGLIST keepj call search('^'.substitute(dirfile,"^.*/","","").'\>',"W") else keepj call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w") endif let w:netrw_explore_mtchcnt = indx + 1 let w:netrw_explore_bufnr = bufnr("%") let w:netrw_explore_line = line(".") keepj call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}') " call Decho("....explore: mtchcnt=".w:netrw_explore_mtchcnt." bufnr=".w:netrw_explore_bufnr." line#".w:netrw_explore_line) else " call Decho("..your vim does not have +path_extra") if !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44) endif sil! let @* = keepregstar sil! let @+ = keepregstar sil! let @/ = keepregslash " call Dret("netrw#Explore : missing +path_extra") return endif else " call Decho("..default case: Explore newdir<".dirname.">") if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && dirname =~ '/' sil! unlet w:netrw_treedict sil! unlet w:netrw_treetop endif let newdir= dirname if !exists("b:netrw_curdir") keepj call netrw#LocalBrowseCheck(getcwd()) else keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,newdir)) endif endif " visual display of **/ **// */ Exploration files " call Decho("w:netrw_explore_indx=".(exists("w:netrw_explore_indx")? w:netrw_explore_indx : "doesn't exist")) " call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "n/a").">") if exists("w:netrw_explore_indx") && exists("b:netrw_curdir") " call Decho("s:explore_prvdir<".(exists("s:explore_prvdir")? s:explore_prvdir : "-doesn't exist-")) if !exists("s:explore_prvdir") || s:explore_prvdir != b:netrw_curdir " only update match list if current directory isn't the same as before " call Decho("only update match list if current directory not the same as before") let s:explore_prvdir = b:netrw_curdir let s:explore_match = "" let dirlen = s:Strlen(b:netrw_curdir) if b:netrw_curdir !~ '/$' let dirlen= dirlen + 1 endif let prvfname= "" for fname in w:netrw_explore_list " call Decho("fname<".fname.">") if fname =~ '^'.b:netrw_curdir if s:explore_match == "" let s:explore_match= '\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' else let s:explore_match= s:explore_match.'\|\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>' endif elseif fname !~ '^/' && fname != prvfname if s:explore_match == "" let s:explore_match= '\<'.escape(fname,g:netrw_markfileesc).'\>' else let s:explore_match= s:explore_match.'\|\<'.escape(fname,g:netrw_markfileesc).'\>' endif endif let prvfname= fname endfor " call Decho("explore_match<".s:explore_match.">") exe "2match netrwMarkFile /".s:explore_match."/" endif echo "<s-up>==Pexplore <s-down>==Nexplore" else 2match none if exists("s:explore_match") | unlet s:explore_match | endif if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif echo " " " call Decho("cleared explore match list") endif sil! let @* = keepregstar sil! let @+ = keepregstar sil! let @/ = keepregslash " call Dret("netrw#Explore : @/<".@/.">") endfun " --------------------------------------------------------------------- " s:NetrwExploreListUniq: {{{2 fun! s:NetrwExploreListUniq(explist) " call Dfunc("s:NetrwExploreListUniq(explist<".string(a:explist).">)") " this assumes that the list is already sorted let newexplist= [] for member in a:explist if !exists("uniqmember") || member != uniqmember let uniqmember = member let newexplist = newexplist + [ member ] endif endfor " call Dret("s:NetrwExploreListUniq newexplist<".string(newexplist).">") return newexplist endfun " --------------------------------------------------------------------- " s:NetrwForceChgDir: (gd support) Force treatment as a directory {{{2 fun! s:NetrwForceChgDir(islocal,newdir) " call Dfunc("s:NetrwForceChgDir(islocal=".a:islocal." newdir<".a:newdir.">)") if a:newdir !~ '/$' " ok, looks like force is needed to get directory-style treatment if a:newdir =~ '@$' let newdir= substitute(a:newdir,'@$','/','') elseif a:newdir =~ '[*=|\\]$' let newdir= substitute(a:newdir,'.$','/','') else let newdir= a:newdir.'/' endif " call Decho("adjusting newdir<".newdir."> due to gd") else " should already be getting treatment as a directory let newdir= a:newdir endif call s:NetrwBrowseChgDir(a:islocal,newdir) call s:NetrwBrowse(a:islocal,newdir) " call Dret("s:NetrwForceChgDir") endfun " --------------------------------------------------------------------- " s:NetrwForceFile: (gf support) Force treatment as a file {{{2 fun! s:NetrwForceFile(islocal,newfile) " " call Dfunc("s:NetrwForceFile(islocal=".a:islocal." newdir<".a:newdir.">)") if a:newfile =~ '[/@*=|\\]$' let newfile= substitute(a:newfile,'.$','','') else let newfile= a:newfile endif call s:NetrwBrowseChgDir(a:islocal,newfile) " call Dret("s:NetrwForceFile") endfun " --------------------------------------------------------------------- " s:NetrwHide: this function is invoked by the "a" map for browsing {{{2 " and switches the hiding mode. The actual hiding is done by " s:NetrwListHide(). " g:netrw_hide= 0: show all " 1: show not-hidden files " 2: show hidden files only fun! s:NetrwHide(islocal) " call Dfunc("NetrwHide(islocal=".a:islocal.") g:netrw_hide=".g:netrw_hide) let svpos= netrw#NetrwSavePosn() if exists("s:netrwmarkfilelist_{bufnr('%')}") " call Decho(((g:netrw_hide == 1)? "unhide" : "hide")." files in markfilelist<".string(s:netrwmarkfilelist_{bufnr("%")}).">") " call Decho("g:netrw_list_hide<".g:netrw_list_hide.">") " hide the files in the markfile list for fname in s:netrwmarkfilelist_{bufnr("%")} " call Decho("match(g:netrw_list_hide<".g:netrw_list_hide.'> fname<\<'.fname.'\>>)='.match(g:netrw_list_hide,'\<'.fname.'\>')." isk=".&isk) if match(g:netrw_list_hide,'\<'.fname.'\>') != -1 " remove fname from hiding list let g:netrw_list_hide= substitute(g:netrw_list_hide,'..\<'.escape(fname,g:netrw_fname_escape).'\>..','','') let g:netrw_list_hide= substitute(g:netrw_list_hide,',,',',','g') let g:netrw_list_hide= substitute(g:netrw_list_hide,'^,\|,$','','') " call Decho("unhide: g:netrw_list_hide<".g:netrw_list_hide.">") else " append fname to hiding list if exists("g:netrw_list_hide") && g:netrw_list_hide != "" let g:netrw_list_hide= g:netrw_list_hide.',\<'.escape(fname,g:netrw_fname_escape).'\>' else let g:netrw_list_hide= '\<'.escape(fname,g:netrw_fname_escape).'\>' endif " call Decho("hide: g:netrw_list_hide<".g:netrw_list_hide.">") endif endfor keepj call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) let g:netrw_hide= 1 else " switch between show-all/show-not-hidden/show-hidden let g:netrw_hide=(g:netrw_hide+1)%3 exe "keepj norm! 0" if g:netrw_hide && g:netrw_list_hide == "" keepj call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49) " call Dret("NetrwHide") return endif endif keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) " call Dret("NetrwHide") endfun " --------------------------------------------------------------------- " s:NetrwHidden: invoked by "gh" {{{2 fun! s:NetrwHidden(islocal) " call Dfunc("s:NetrwHidden()") " save current position let svpos= netrw#NetrwSavePosn() if g:netrw_list_hide =~ '\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+' " remove pattern from hiding list let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','') elseif s:Strlen(g:netrw_list_hide) >= 1 let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+' else let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+' endif " refresh screen and return to saved position keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) " call Dret("s:NetrwHidden") endfun " --------------------------------------------------------------------- " s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2 fun! s:NetrwHome() if exists("g:netrw_home") let home= g:netrw_home else " go to vim plugin home for home in split(&rtp,',') + [''] if isdirectory(home) && filewritable(home) | break | endif let basehome= substitute(home,'[/\\]\.vim$','','') if isdirectory(basehome) && filewritable(basehome) let home= basehome."/.vim" break endif endfor if home == "" " just pick the first directory let home= substitute(&rtp,',.*$','','') endif if (has("win32") || has("win95") || has("win64") || has("win16")) let home= substitute(home,'/','\\','g') endif endif " insure that the home directory exists if !isdirectory(home) if exists("g:netrw_mkdir") call system(g:netrw_mkdir." ".shellescape(home)) else call mkdir(home) endif endif let g:netrw_home= home return home endfun " --------------------------------------------------------------------- " s:NetrwLeftmouse: handles the <leftmouse> when in a netrw browsing window {{{2 fun! s:NetrwLeftmouse(islocal) " call Dfunc("s:NetrwLeftmouse(islocal=".a:islocal.")") " check if the status bar was clicked on instead of a file/directory name while getchar(0) != 0 "clear the input stream endwhile call feedkeys("\<LeftMouse>") let c = getchar() let mouse_lnum = v:mouse_lnum let wlastline = line('w$') let lastline = line('$') " call Decho("v:mouse_lnum=".mouse_lnum." line(w$)=".wlastline." line($)=".lastline." v:mouse_win=".v:mouse_win." winnr#".winnr()) " call Decho("v:mouse_col =".v:mouse_col." col=".col(".")." wincol =".wincol()." winwidth =".winwidth(0)) if mouse_lnum >= wlastline + 1 || v:mouse_win != winnr() " appears to be a status bar leftmouse click " call Dret("s:NetrwLeftmouse : detected a status bar leftmouse click") return endif if v:mouse_col != col('.') " call Dret("s:NetrwLeftmouse : detected a vertical separator bar leftmouse click") return endif if a:islocal if exists("b:netrw_curdir") keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord())) endif else if exists("b:netrw_curdir") keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord())) endif endif " call Dret("s:NetrwLeftmouse") endfun " --------------------------------------------------------------------- " s:NetrwListHide: uses [range]g~...~d to delete files that match comma {{{2 " separated patterns given in g:netrw_list_hide fun! s:NetrwListHide() " call Dfunc("NetrwListHide() g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") " find a character not in the "hide" string to use as a separator for :g and :v commands " How-it-works: take the hiding command, convert it into a range. Duplicate " characters don't matter. Remove all such characters from the '/~...90' " string. Use the first character left as a separator character. let listhide= g:netrw_list_hide let sep = strpart(substitute('/~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1) " call Decho("sep=".sep) while listhide != "" if listhide =~ ',' let hide = substitute(listhide,',.*$','','e') let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e') else let hide = listhide let listhide = "" endif " Prune the list by hiding any files which match if g:netrw_hide == 1 " call Decho("hiding<".hide."> listhide<".listhide.">") exe 'sil keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d' elseif g:netrw_hide == 2 " call Decho("showing<".hide."> listhide<".listhide.">") exe 'sil keepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @' endif endwhile if g:netrw_hide == 2 exe 'sil keepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d' exe 'sil keepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e' endif " remove any blank lines that have somehow remained. " This seems to happen under Windows. exe 'sil! keepj 1,$g@^\s*$@d' " call Dret("NetrwListHide") endfun " --------------------------------------------------------------------- " NetrwHideEdit: allows user to edit the file/directory hiding list fun! s:NetrwHideEdit(islocal) " call Dfunc("NetrwHideEdit(islocal=".a:islocal.")") " save current cursor position let svpos= netrw#NetrwSavePosn() " get new hiding list from user call inputsave() let newhide= input("Edit Hiding List: ",g:netrw_list_hide) call inputrestore() let g:netrw_list_hide= newhide " call Decho("new g:netrw_list_hide<".g:netrw_list_hide.">") " refresh the listing sil keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,"./")) " restore cursor position call netrw#NetrwRestorePosn(svpos) " call Dret("NetrwHideEdit") endfun " --------------------------------------------------------------------- " NetSortSequence: allows user to edit the sorting sequence fun! s:NetSortSequence(islocal) " call Dfunc("NetSortSequence(islocal=".a:islocal.")") let svpos= netrw#NetrwSavePosn() call inputsave() let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence) call inputrestore() " refresh the listing let g:netrw_sort_sequence= newsortseq keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) " call Dret("NetSortSequence") endfun " --------------------------------------------------------------------- " s:NetrwMakeDir: this function makes a directory (both local and remote) {{{2 fun! s:NetrwMakeDir(usrhost) " call Dfunc("NetrwMakeDir(usrhost<".a:usrhost.">)") " get name of new directory from user. A bare <CR> will skip. " if its currently a directory, also request will be skipped, but with " a message. call inputsave() let newdirname= input("Please give directory name: ") call inputrestore() " call Decho("newdirname<".newdirname.">") if newdirname == "" " call Dret("NetrwMakeDir : user aborted with bare <cr>") return endif if a:usrhost == "" " call Decho("local mkdir") " Local mkdir: " sanity checks let fullnewdir= b:netrw_curdir.'/'.newdirname " call Decho("fullnewdir<".fullnewdir.">") if isdirectory(fullnewdir) if !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24) endif " call Dret("NetrwMakeDir : directory<".newdirname."> exists previously") return endif if s:FileReadable(fullnewdir) if !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25) endif " call Dret("NetrwMakeDir : file<".newdirname."> exists previously") return endif " requested new local directory is neither a pre-existing file or " directory, so make it! if exists("*mkdir") call mkdir(fullnewdir,"p") else let netrw_origdir= s:NetrwGetcwd(1) exe 'keepj lcd '.fnameescape(b:netrw_curdir) " call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">") " call Decho("exe sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1)) exe "sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1) if !g:netrw_keepdir exe 'keepj lcd '.fnameescape(netrw_origdir) " call Decho("netrw_keepdir=".g:netrw_keepdir.": keepjumps lcd ".fnameescape(netrw_origdir)." getcwd<".getcwd().">") endif endif if v:shell_error == 0 " refresh listing " call Decho("refresh listing") let svpos= netrw#NetrwSavePosn() call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) call netrw#NetrwRestorePosn(svpos) elseif !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",26) endif " redraw! elseif !exists("b:netrw_method") || b:netrw_method == 4 " Remote mkdir: " call Decho("remote mkdir") let mkdircmd = s:MakeSshCmd(g:netrw_mkdir_cmd) let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname " call Decho("exe sil! !".mkdircmd." ".shellescape(newdirname,1)) exe "sil! !".mkdircmd." ".shellescape(newdirname,1) if v:shell_error == 0 " refresh listing let svpos= netrw#NetrwSavePosn() keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) keepj call netrw#NetrwRestorePosn(svpos) elseif !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",27) endif " redraw! elseif b:netrw_method == 2 let svpos= netrw#NetrwSavePosn() call s:NetrwRemoteFtpCmd("",g:netrw_remote_mkdir.' "'.newdirname.'"') keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) keepj call netrw#NetrwRestorePosn(svpos) elseif b:netrw_method == 3 let svpos= netrw#NetrwSavePosn() call s:NetrwRemoteFtpCmd("",g:netrw_remote_mkdir.' "'.newdirname.'"') keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) keepj call netrw#NetrwRestorePosn(svpos) endif " call Dret("NetrwMakeDir") endfun " --------------------------------------------------------------------- " s:NetrwMarkFile: (invoked by mf) This function is used to both {{{2 " mark and unmark files. If a markfile list exists, " then the rename and delete functions will use it instead " of whatever may happen to be under the cursor at that " moment. When the mouse and gui are available, " shift-leftmouse may also be used to mark files. " " Creates two lists " s:netrwmarkfilelist -- holds complete paths to all marked files " s:netrwmarkfilelist_# -- holds list of marked files in current-buffer's directory (#==bufnr()) " " Creates a marked file match string " s:netrwmarfilemtch_# -- used with 2match to display marked files " " Creates a buffer version of islocal " b:netrw_islocal fun! s:NetrwMarkFile(islocal,fname) " call Dfunc("s:NetrwMarkFile(islocal=".a:islocal." fname<".a:fname.">)") let curbufnr= bufnr("%") let curdir = b:netrw_curdir let trailer = '[@=|\/\*]\=\>' if exists("s:netrwmarkfilelist_{curbufnr}") " markfile list pre-exists " call Decho("starting s:netrwmarkfilelist_{curbufnr}<".string(s:netrwmarkfilelist_{curbufnr}).">") " call Decho("starting s:netrwmarkfilemtch_{curbufnr}<".s:netrwmarkfilemtch_{curbufnr}.">") let b:netrw_islocal= a:islocal if index(s:netrwmarkfilelist_{curbufnr},a:fname) == -1 " append filename to buffer's markfilelist " call Decho("append filename<".a:fname."> to local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">") call add(s:netrwmarkfilelist_{curbufnr},a:fname) let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|\<'.escape(a:fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").trailer else " remove filename from buffer's markfilelist " call Decho("remove filename<".a:fname."> from local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">") call filter(s:netrwmarkfilelist_{curbufnr},'v:val != a:fname') if s:netrwmarkfilelist_{curbufnr} == [] " local markfilelist is empty; remove it entirely " call Decho("markfile list now empty") call s:NetrwUnmarkList(curbufnr,curdir) else " rebuild match list to display markings correctly " call Decho("rebuild s:netrwmarkfilemtch_".curbufnr) let s:netrwmarkfilemtch_{curbufnr}= "" let first = 1 for fname in s:netrwmarkfilelist_{curbufnr} if first let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\<'.escape(fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").trailer else let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|\<'.escape(fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").trailer endif let first= 0 endfor " call Decho("ending s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">") endif endif else " initialize new markfilelist " call Decho("add fname<".a:fname."> to new markfilelist_".curbufnr) let s:netrwmarkfilelist_{curbufnr}= [] call add(s:netrwmarkfilelist_{curbufnr},a:fname) " call Decho("ending s:netrwmarkfilelist_{curbufnr}<".string(s:netrwmarkfilelist_{curbufnr}).">") " build initial markfile matching pattern if a:fname =~ '/$' let s:netrwmarkfilemtch_{curbufnr}= '\<'.escape(a:fname,g:netrw_markfileesc) else let s:netrwmarkfilemtch_{curbufnr}= '\<'.escape(a:fname,g:netrw_markfileesc).trailer endif " call Decho("ending s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">") endif " handle global markfilelist if exists("s:netrwmarkfilelist") let dname= s:ComposePath(b:netrw_curdir,a:fname) if index(s:netrwmarkfilelist,dname) == -1 " append new filename to global markfilelist call add(s:netrwmarkfilelist,s:ComposePath(b:netrw_curdir,a:fname)) " call Decho("append filename<".a:fname."> to global markfilelist<".string(s:netrwmarkfilelist).">") else " remove new filename from global markfilelist " call Decho("filter(".string(s:netrwmarkfilelist).",'v:val != '.".dname.")") call filter(s:netrwmarkfilelist,'v:val != "'.dname.'"') " call Decho("ending s:netrwmarkfilelist <".string(s:netrwmarkfilelist).">") if s:netrwmarkfilelist == [] unlet s:netrwmarkfilelist endif endif else " initialize new global-directory markfilelist let s:netrwmarkfilelist= [] call add(s:netrwmarkfilelist,s:ComposePath(b:netrw_curdir,a:fname)) " call Decho("init s:netrwmarkfilelist<".string(s:netrwmarkfilelist).">") endif " set up 2match'ing to netrwmarkfilemtch list if exists("s:netrwmarkfilemtch_{curbufnr}") && s:netrwmarkfilemtch_{curbufnr} != "" " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/") if exists("g:did_drchip_netrwlist_syntax") exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/" endif else " call Decho("2match none") 2match none endif " call Dret("s:NetrwMarkFile : s:netrwmarkfilelist_".curbufnr."<".(exists("s:netrwmarkfilelist_{curbufnr}")? string(s:netrwmarkfilelist_{curbufnr}) : " doesn't exist").">") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileCompress: (invoked by mz) This function is used to {{{2 " compress/decompress files using the programs " in g:netrw_compress and g:netrw_uncompress, " using g:netrw_compress_suffix to know which to " do. By default: " g:netrw_compress = "gzip" " g:netrw_decompress = { ".gz" : "gunzip" , ".bz2" : "bunzip2" , ".zip" : "unzip" , ".tar" : "tar -xf", ".xz" : "unxz"} fun! s:NetrwMarkFileCompress(islocal) " call Dfunc("s:NetrwMarkFileCompress(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() let curdir = b:netrw_curdir let curbufnr = bufnr("%") if exists("s:netrwmarkfilelist_{curbufnr}") && exists("g:netrw_compress") && exists("g:netrw_decompress") for fname in s:netrwmarkfilelist_{curbufnr} " for every filename in the marked list for sfx in sort(keys(g:netrw_decompress)) if fname =~ '\'.sfx.'$' " fname has a suffix indicating that its compressed; apply associated decompression routine let exe= netrw#WinPath(g:netrw_decompress[sfx]) " call Decho("fname<".fname."> is compressed so decompress with <".exe.">") if a:islocal if g:netrw_keepdir let fname= shellescape(s:ComposePath(curdir,fname)) endif else let fname= shellescape(b:netrw_curdir.fname,1) endif if executable(exe) if a:islocal call system(exe." ".fname) else keepj call s:RemoteSystem(exe." ".fname) endif else keepj call netrw#ErrorMsg(s:WARNING,"unable to apply<".exe."> to file<".fname.">",50) endif break endif unlet sfx endfor if exists("exe") unlet exe elseif a:islocal " fname not a compressed file, so compress it call system(netrw#WinPath(g:netrw_compress)." ".shellescape(s:ComposePath(b:netrw_curdir,fname))) else " fname not a compressed file, so compress it keepj call s:RemoteSystem(netrw#WinPath(g:netrw_compress)." ".shellescape(fname)) endif endfor call s:NetrwUnmarkList(curbufnr,curdir) keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) endif " call Dret("s:NetrwMarkFileCompress") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileCopy: (invoked by mc) copy marked files to target {{{2 " If no marked files, then set up directory as the " target. Currently does not support copying entire " directories. Uses the local-buffer marked file list. " Returns 1=success (used by NetrwMarkFileMove()) " 0=failure fun! s:NetrwMarkFileCopy(islocal) " call Dfunc("s:NetrwMarkFileCopy(islocal=".a:islocal.") target<".(exists("s:netrwmftgt")? s:netrwmftgt : '---').">") " sanity checks if !exists("s:netrwmarkfilelist_{bufnr('%')}") || empty(s:netrwmarkfilelist_{bufnr('%')}) keepj call netrw#ErrorMsg(s:ERROR,"there are no marked files in this window (:help netrw-mf)",66) " call Dret("s:NetrwMarkFileCopy 0") return 0 endif " call Decho("sanity chk passed: s:netrwmarkfilelist_".bufnr('%')."<".string(s:netrwmarkfilelist_{bufnr('%')})) if !exists("s:netrwmftgt") keepj call netrw#ErrorMsg(s:ERROR,"your marked file target is empty! (:help netrw-mt)",67) " call Dret("s:NetrwMarkFileCopy 0") return 0 endif " call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">") let curdir = b:netrw_curdir let curbufnr = bufnr("%") if a:islocal && s:netrwmftgt_islocal " Copy marked files, local directory to local directory " call Decho("copy from local to local") let args= join(map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),"shellescape(b:netrw_curdir.\"/\".v:val)")) " call Decho("system(".g:netrw_localcopycmd." ".args." ".shellescape(s:netrwmftgt).")") call system(netrw#WinPath(g:netrw_localcopycmd)." ".args." ".shellescape(s:netrwmftgt)) elseif a:islocal && !s:netrwmftgt_islocal " Copy marked files, local directory to remote directory " call Decho("copy from local to remote") keepj call s:NetrwUpload(s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) elseif !a:islocal && s:netrwmftgt_islocal " call Decho("copy from remote to local") keepj call netrw#NetrwObtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) elseif !a:islocal && !s:netrwmftgt_islocal " call Decho("copy from remote to remote") let curdir = getcwd() let tmpdir = s:GetTempfile("") if tmpdir !~ '/' let tmpdir= curdir."/".tmpdir endif if exists("*mkdir") call mkdir(tmpdir) else exe "sil! !".g:netrw_localmkdir.' '.shellescape(tmpdir,1) endif if isdirectory(tmpdir) exe "keepj lcd ".fnameescape(tmpdir) keepj call netrw#NetrwObtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},tmpdir) let localfiles= map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),'substitute(v:val,"^.*/","","")') keepj call s:NetrwUpload(localfiles,s:netrwmftgt) if getcwd() == tmpdir for fname in s:netrwmarkfilelist_{bufnr('%')} keepj call s:NetrwDelete(fname) endfor exe "keepj lcd ".fnameescape(curdir) exe "sil !".g:netrw_localrmdir." ".shellescape(tmpdir,1) else exe "keepj lcd ".fnameescape(curdir) endif endif endif " ------- " cleanup " ------- " call Decho("cleanup") " remove markings from local buffer call s:NetrwUnmarkList(curbufnr,curdir) " refresh buffers if !s:netrwmftgt_islocal call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt) endif if a:islocal keepj call s:NetrwRefreshDir(a:islocal,curdir) endif if g:netrw_fastbrowse <= 1 keepj call s:LocalBrowseShellCmdRefresh() endif " call Dret("s:NetrwMarkFileCopy 1") return 1 endfun " --------------------------------------------------------------------- " s:NetrwMarkFileDiff: (invoked by md) This function is used to {{{2 " invoke vim's diff mode on the marked files. " Either two or three files can be so handled. " Uses the global marked file list. fun! s:NetrwMarkFileDiff(islocal) " call Dfunc("s:NetrwMarkFileDiff(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") let curbufnr= bufnr("%") if exists("s:netrwmarkfilelist_{curbufnr}") let cnt = 0 let curdir = b:netrw_curdir for fname in s:netrwmarkfilelist let cnt= cnt + 1 if cnt == 1 " call Decho("diffthis: fname<".fname.">") exe "e ".fnameescape(fname) diffthis elseif cnt == 2 || cnt == 3 vsplit wincmd l " call Decho("diffthis: ".fname) exe "e ".fnameescape(fname) diffthis else break endif endfor call s:NetrwUnmarkList(curbufnr,curdir) endif " call Dret("s:NetrwMarkFileDiff") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileEdit: (invoked by me) put marked files on arg list and start editing them {{{2 " Uses global markfilelist fun! s:NetrwMarkFileEdit(islocal) " call Dfunc("s:NetrwMarkFileEdit(islocal=".a:islocal.")") let curdir = b:netrw_curdir let curbufnr = bufnr("%") if exists("s:netrwmarkfilelist_{curbufnr}") call s:SetRexDir(a:islocal,curdir) let flist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)")) " unmark markedfile list " call s:NetrwUnmarkList(curbufnr,curdir) call s:NetrwUnmarkAll() " call Decho("exe sil args ".flist) exe "sil args ".flist endif " call Dret("s:NetrwMarkFileEdit") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileExe: (invoked by mx) execute arbitrary system command on marked files, one at a time {{{2 " Uses the local marked-file list. fun! s:NetrwMarkFileExe(islocal) " call Dfunc("s:NetrwMarkFileExe(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() let curdir = b:netrw_curdir let curbufnr = bufnr("%") if exists("s:netrwmarkfilelist_{curbufnr}") " get the command call inputsave() let cmd= input("Enter command: ","","file") call inputrestore() " call Decho("cmd<".cmd.">") if cmd == "" " " call Dret("s:NetrwMarkFileExe : early exit, empty command") return endif " apply command to marked files. Substitute: filename -> % " If no %, then append a space and the filename to the command for fname in s:netrwmarkfilelist_{curbufnr} if a:islocal if g:netrw_keepdir let fname= shellescape(netrw#WinPath(s:ComposePath(curdir,fname))) endif else let fname= shellescape(netrw#WinPath(b:netrw_curdir.fname)) endif if cmd =~ '%' let xcmd= substitute(cmd,'%',fname,'g') else let xcmd= cmd.' '.fname endif if a:islocal " call Decho("local: xcmd<".xcmd.">") let ret= system(xcmd) else " call Decho("remote: xcmd<".xcmd.">") let ret= s:RemoteSystem(xcmd) endif if v:shell_error < 0 keepj call netrw#ErrorMsg(s:ERROR,"command<".xcmd."> failed, aborting",54) break else echo ret endif endfor " unmark marked file list call s:NetrwUnmarkList(curbufnr,curdir) " refresh the listing keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) else keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif " call Dret("s:NetrwMarkFileExe") endfun " --------------------------------------------------------------------- " s:NetrwMarkHideSfx: (invoked by mh) (un)hide files having same suffix " as the marked file(s) (toggles suffix presence) " Uses the local marked file list. fun! s:NetrwMarkHideSfx(islocal) " call Dfunc("s:NetrwMarkHideSfx(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() let curbufnr = bufnr("%") " s:netrwmarkfilelist_{curbufnr}: the List of marked files if exists("s:netrwmarkfilelist_{curbufnr}") for fname in s:netrwmarkfilelist_{curbufnr} " call Decho("s:NetrwMarkFileCopy: fname<".fname.">") " construct suffix pattern if fname =~ '\.' let sfxpat= "^.*".substitute(fname,'^.*\(\.[^. ]\+\)$','\1','') else let sfxpat= '^\%(\%(\.\)\@!.\)*$' endif " determine if its in the hiding list or not let inhidelist= 0 if g:netrw_list_hide != "" let itemnum = 0 let hidelist= split(g:netrw_list_hide,',') for hidepat in hidelist if sfxpat == hidepat let inhidelist= 1 break endif let itemnum= itemnum + 1 endfor endif " call Decho("fname<".fname."> inhidelist=".inhidelist." sfxpat<".sfxpat.">") if inhidelist " remove sfxpat from list call remove(hidelist,itemnum) let g:netrw_list_hide= join(hidelist,",") elseif g:netrw_list_hide != "" " append sfxpat to non-empty list let g:netrw_list_hide= g:netrw_list_hide.",".sfxpat else " set hiding list to sfxpat let g:netrw_list_hide= sfxpat endif endfor " refresh the listing keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) else keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif " call Dret("s:NetrwMarkHideSfx") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileVimCmd: (invoked by mX) execute arbitrary vim command on marked files, one at a time {{{2 " Uses the local marked-file list. fun! s:NetrwMarkFileVimCmd(islocal) " call Dfunc("s:NetrwMarkFileVimCmd(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() let curdir = b:netrw_curdir let curbufnr = bufnr("%") if exists("s:netrwmarkfilelist_{curbufnr}") " get the command call inputsave() let cmd= input("Enter vim command: ","","file") call inputrestore() " call Decho("cmd<".cmd.">") if cmd == "" " " call Dret("s:NetrwMarkFileVimCmd : early exit, empty command") return endif " apply command to marked files. Substitute: filename -> % " If no %, then append a space and the filename to the command for fname in s:netrwmarkfilelist_{curbufnr} " call Decho("fname<".fname.">") if a:islocal 1split exe "sil! keepalt e ".fnameescape(fname) " call Decho("local<".fname.">: exe ".cmd) exe cmd exe "sil! keepalt wq!" else " COMBAK -- not supported yet " call Decho("remote<".fname.">: exe ".cmd." : NOT SUPPORTED YET") echo "sorry, \"mX\" not supported yet for remote files" endif endfor " unmark marked file list call s:NetrwUnmarkList(curbufnr,curdir) " refresh the listing keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) else keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif " call Dret("s:NetrwMarkFileVimCmd") endfun " --------------------------------------------------------------------- " s:NetrwMarkHideSfx: (invoked by mh) (un)hide files having same suffix " as the marked file(s) (toggles suffix presence) " Uses the local marked file list. fun! s:NetrwMarkHideSfx(islocal) " call Dfunc("s:NetrwMarkHideSfx(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() let curbufnr = bufnr("%") " s:netrwmarkfilelist_{curbufnr}: the List of marked files if exists("s:netrwmarkfilelist_{curbufnr}") for fname in s:netrwmarkfilelist_{curbufnr} " call Decho("s:NetrwMarkFileCopy: fname<".fname.">") " construct suffix pattern if fname =~ '\.' let sfxpat= "^.*".substitute(fname,'^.*\(\.[^. ]\+\)$','\1','') else let sfxpat= '^\%(\%(\.\)\@!.\)*$' endif " determine if its in the hiding list or not let inhidelist= 0 if g:netrw_list_hide != "" let itemnum = 0 let hidelist= split(g:netrw_list_hide,',') for hidepat in hidelist if sfxpat == hidepat let inhidelist= 1 break endif let itemnum= itemnum + 1 endfor endif " call Decho("fname<".fname."> inhidelist=".inhidelist." sfxpat<".sfxpat.">") if inhidelist " remove sfxpat from list call remove(hidelist,itemnum) let g:netrw_list_hide= join(hidelist,",") elseif g:netrw_list_hide != "" " append sfxpat to non-empty list let g:netrw_list_hide= g:netrw_list_hide.",".sfxpat else " set hiding list to sfxpat let g:netrw_list_hide= sfxpat endif endfor " refresh the listing keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) else keepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59) endif " call Dret("s:NetrwMarkHideSfx") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileGrep: (invoked by mg) This function applies vimgrep to marked files {{{2 " Uses the global markfilelist fun! s:NetrwMarkFileGrep(islocal) " call Dfunc("s:NetrwMarkFileGrep(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() let curbufnr = bufnr("%") if exists("s:netrwmarkfilelist") " call Decho("s:netrwmarkfilelist".string(s:netrwmarkfilelist).">") let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)")) call s:NetrwUnmarkAll() " ask user for pattern call inputsave() let pat= input("Enter pattern: ","") call inputrestore() if pat !~ '^\s' if pat !~ '^/' let pat= '/'.pat.'/' endif let pat= " ".pat endif " use vimgrep for both local and remote " call Decho("exe vimgrep".pat." ".netrwmarkfilelist) try exe "keepj noautocmd vimgrep".pat." ".netrwmarkfilelist catch /^Vim\%((\a\+)\)\=:E480/ keepj call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pattern.">",76) " call Dret("s:NetrwMarkFileGrep : unable to find pattern<".pattern.">") return endtry 2match none keepj call netrw#NetrwRestorePosn(svpos) endif " call Dret("s:NetrwMarkFileGrep") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileMove: (invoked by mm) execute arbitrary command on marked files, one at a time {{{2 " uses the global marked file list " s:netrwmfloc= 0: target directory is remote " = 1: target directory is local fun! s:NetrwMarkFileMove(islocal) " call Dfunc("s:NetrwMarkFileMove(islocal=".a:islocal.")") let curdir = b:netrw_curdir let curbufnr = bufnr("%") " sanity check if !exists("s:netrwmarkfilelist_{bufnr('%')}") || empty(s:netrwmarkfilelist_{bufnr('%')}) keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) " call Dret("s:NetrwMarkFileMove") return endif " call Decho("sanity chk passed: s:netrwmarkfilelist_".bufnr('%')."<".string(s:netrwmarkfilelist_{bufnr('%')})) if !exists("s:netrwmftgt") keepj call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67) " call Dret("s:NetrwMarkFileCopy 0") return 0 endif " call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">") if a:islocal && s:netrwmftgt_islocal " move: local -> local " call Decho("move from local to local") " call Decho("(s:NetrwMarkFileMove) local to local move") if executable(g:netrw_localmovecmd) for fname in s:netrwmarkfilelist_{bufnr("%")} " call Decho("system(".g:netrw_localmovecmd." ".shellescape(fname)." ".shellescape(s:netrwmftgt).")") let ret= system(g:netrw_localmovecmd." ".shellescape(fname)." ".shellescape(s:netrwmftgt)) if v:shell_error < 0 call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localmovecmd."> failed, aborting",54) break endif endfor else keepj call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localmovecmd."> is not executable!",57) endif elseif a:islocal && !s:netrwmftgt_islocal " move: local -> remote " call Decho("move from local to remote") " call Decho("copy") let mflist= s:netrwmarkfilelist_{bufnr("%")} keepj call s:NetrwMarkFileCopy(a:islocal) " call Decho("remove") for fname in mflist let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') let ok = s:NetrwLocalRmFile(b:netrw_curdir,barefname,1) endfor unlet mflist elseif !a:islocal && s:netrwmftgt_islocal " move: remote -> local " call Decho("move from remote to local") " call Decho("copy") let mflist= s:netrwmarkfilelist_{bufnr("%")} keepj call s:NetrwMarkFileCopy(a:islocal) " call Decho("remove") for fname in mflist let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') let ok = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1) endfor unlet mflist elseif !a:islocal && !s:netrwmftgt_islocal " move: remote -> remote " call Decho("move from remote to remote") " call Decho("copy") let mflist= s:netrwmarkfilelist_{bufnr("%")} keepj call s:NetrwMarkFileCopy(a:islocal) " call Decho("remove") for fname in mflist let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') let ok = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1) endfor unlet mflist endif " ------- " cleanup " ------- " call Decho("cleanup") " remove markings from local buffer call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer " refresh buffers if !s:netrwmftgt_islocal " call Decho("refresh netrwmftgt<".s:netrwmftgt.">") keepj call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt) endif if a:islocal " call Decho("refresh b:netrw_curdir<".b:netrw_curdir.">") keepj call s:NetrwRefreshDir(a:islocal,b:netrw_curdir) endif if g:netrw_fastbrowse <= 1 " call Decho("since g:netrw_fastbrowse=".g:netrw_fastbrowse.", perform shell cmd refresh") keepj call s:LocalBrowseShellCmdRefresh() endif " call Dret("s:NetrwMarkFileMove") endfun " --------------------------------------------------------------------- " s:NetrwMarkFilePrint: (invoked by mp) This function prints marked files {{{2 " using the hardcopy command. Local marked-file list only. fun! s:NetrwMarkFilePrint(islocal) " call Dfunc("s:NetrwMarkFilePrint(islocal=".a:islocal.")") let curbufnr= bufnr("%") if exists("s:netrwmarkfilelist_{curbufnr}") let netrwmarkfilelist = s:netrwmarkfilelist_{curbufnr} let curdir = b:netrw_curdir call s:NetrwUnmarkList(curbufnr,curdir) for fname in netrwmarkfilelist if a:islocal if g:netrw_keepdir let fname= s:ComposePath(curdir,fname) endif else let fname= curdir.fname endif 1split " the autocmds will handle both local and remote files " call Decho("exe sil e ".escape(fname,' ')) exe "sil e ".fnameescape(fname) " call Decho("hardcopy") hardcopy q endfor 2match none endif " call Dret("s:NetrwMarkFilePrint") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileRegexp: (invoked by mr) This function is used to mark {{{2 " files when given a regexp (for which a prompt is " issued). fun! s:NetrwMarkFileRegexp(islocal) " call Dfunc("s:NetrwMarkFileRegexp(islocal=".a:islocal.")") " get the regular expression call inputsave() let regexp= input("Enter regexp: ","","file") call inputrestore() if a:islocal " get the matching list of files using local glob() " call Decho("handle local regexp") let dirname = escape(b:netrw_curdir,g:netrw_glob_escape) let files = glob(s:ComposePath(dirname,regexp)) " call Decho("files<".files.">") let filelist= split(files,"\n") " mark the list of files for fname in filelist " call Decho("fname<".fname.">") keepj call s:NetrwMarkFile(a:islocal,substitute(fname,'^.*/','','')) endfor else " call Decho("handle remote regexp") " convert displayed listing into a filelist let eikeep = &ei let areg = @a sil keepj %y a set ei=all ma " call Decho("set ei=all ma") 1split keepj call s:NetrwEnew() keepj call s:NetrwSafeOptions() sil keepj norm! "ap keepj 2 let bannercnt= search('^" =====','W') exe "sil keepj 1,".bannercnt."d" set bt=nofile if g:netrw_liststyle == s:LONGLIST sil keepj %s/\s\{2,}\S.*$//e call histdel("/",-1) elseif g:netrw_liststyle == s:WIDELIST sil keepj %s/\s\{2,}/\r/ge call histdel("/",-1) elseif g:netrw_liststyle == s:TREELIST sil keepj %s/^| //e sil! keepj g/^ .*$/d call histdel("/",-1) call histdel("/",-1) endif " convert regexp into the more usual glob-style format let regexp= substitute(regexp,'\*','.*','g') " call Decho("regexp<".regexp.">") exe "sil! keepj v/".escape(regexp,'/')."/d" call histdel("/",-1) let filelist= getline(1,line("$")) q! for filename in filelist keepj call s:NetrwMarkFile(a:islocal,substitute(filename,'^.*/','','')) endfor unlet filelist let @a = areg let &ei = eikeep endif " call Dret("s:NetrwMarkFileRegexp") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileSource: (invoked by ms) This function sources marked files {{{2 " Uses the local marked file list. fun! s:NetrwMarkFileSource(islocal) " call Dfunc("s:NetrwMarkFileSource(islocal=".a:islocal.")") let curbufnr= bufnr("%") if exists("s:netrwmarkfilelist_{curbufnr}") let netrwmarkfilelist = s:netrwmarkfilelist_{bufnr("%")} let curdir = b:netrw_curdir call s:NetrwUnmarkList(curbufnr,curdir) for fname in netrwmarkfilelist if a:islocal if g:netrw_keepdir let fname= s:ComposePath(curdir,fname) endif else let fname= curdir.fname endif " the autocmds will handle sourcing both local and remote files " call Decho("exe so ".fnameescape(fname)) exe "so ".fnameescape(fname) endfor 2match none endif " call Dret("s:NetrwMarkFileSource") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileTag: (invoked by mT) This function applies g:netrw_ctags to marked files {{{2 " Uses the global markfilelist fun! s:NetrwMarkFileTag(islocal) " call Dfunc("s:NetrwMarkFileTag(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() let curdir = b:netrw_curdir let curbufnr = bufnr("%") if exists("s:netrwmarkfilelist") " call Decho("s:netrwmarkfilelist".string(s:netrwmarkfilelist).">") let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "shellescape(v:val,".!a:islocal.")")) call s:NetrwUnmarkAll() if a:islocal if executable(g:netrw_ctags) " call Decho("call system(".g:netrw_ctags." ".netrwmarkfilelist.")") call system(g:netrw_ctags." ".netrwmarkfilelist) else call netrw#ErrorMsg(s:ERROR,"g:netrw_ctags<".g:netrw_ctags."> is not executable!",51) endif else let cmd = s:RemoteSystem(g:netrw_ctags." ".netrwmarkfilelist) call netrw#NetrwObtain(a:islocal,"tags") let curdir= b:netrw_curdir 1split e tags let path= substitute(curdir,'^\(.*\)/[^/]*$','\1/','') " call Decho("curdir<".curdir."> path<".path.">") exe 'keepj %s/\t\(\S\+\)\t/\t'.escape(path,"/\n\r\\").'\1\t/e' call histdel("/",-1) wq! endif 2match none call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) call netrw#NetrwRestorePosn(svpos) endif " call Dret("s:NetrwMarkFileTag") endfun " --------------------------------------------------------------------- " s:NetrwMarkFileTgt: (invoked by mt) This function sets up a marked file target {{{2 " Sets up two variables, " s:netrwmftgt : holds the target directory " s:netrwmftgt_islocal : 0=target directory is remote " 1=target directory is local fun! s:NetrwMarkFileTgt(islocal) " call Dfunc("s:NetrwMarkFileTgt(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() let curdir = b:netrw_curdir let hadtgt = exists("s:netrwmftgt") if !exists("w:netrw_bannercnt") let w:netrw_bannercnt= b:netrw_bannercnt endif " set up target if line(".") < w:netrw_bannercnt " if cursor in banner region, use b:netrw_curdir for the target let s:netrwmftgt= b:netrw_curdir " call Decho("inbanner: s:netrwmftgt<".s:netrwmftgt.">") else " get word under cursor. " * If directory, use it for the target. " * If file, use b:netrw_curdir for the target let curword= s:NetrwGetWord() let tgtdir = s:ComposePath(curdir,curword) if a:islocal && isdirectory(tgtdir) let s:netrwmftgt = tgtdir " call Decho("local isdir: s:netrwmftgt<".s:netrwmftgt.">") elseif !a:islocal && tgtdir =~ '/$' let s:netrwmftgt = tgtdir " call Decho("remote isdir: s:netrwmftgt<".s:netrwmftgt.">") else let s:netrwmftgt = curdir " call Decho("isfile: s:netrwmftgt<".s:netrwmftgt.">") endif endif if a:islocal " simplify the target (eg. /abc/def/../ghi -> /abc/ghi) let s:netrwmftgt= simplify(s:netrwmftgt) " call Decho("simplify: s:netrwmftgt<".s:netrwmftgt.">") endif if g:netrw_cygwin let s:netrwmftgt= substitute(system("cygpath ".shellescape(s:netrwmftgt)),'\n$','','') let s:netrwmftgt= substitute(s:netrwmftgt,'\n$','','') endif let s:netrwmftgt_islocal= a:islocal if g:netrw_fastbrowse <= 1 call s:LocalBrowseShellCmdRefresh() endif call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) call netrw#NetrwRestorePosn(svpos) if !hadtgt sil! keepj norm! j endif " call Dret("s:NetrwMarkFileTgt : netrwmftgt<".(exists("s:netrwmftgt")? s:netrwmftgt : "").">") endfun " --------------------------------------------------------------------- " s:NetrwOpenFile: query user for a filename and open it {{{2 fun! s:NetrwOpenFile(islocal) " call Dfunc("s:NetrwOpenFile(islocal=".a:islocal.")") call inputsave() let fname= input("Enter filename: ") call inputrestore() if fname !~ '[/\\]' if exists("b:netrw_curdir") if exists("g:netrw_quiet") let netrw_quiet_keep = g:netrw_quiet endif let g:netrw_quiet = 1 if b:netrw_curdir =~ '/$' exe "e ".fnameescape(b:netrw_curdir.fname) else exe "e ".fnameescape(b:netrw_curdir."/".fname) endif if exists("netrw_quiet_keep") let g:netrw_quiet= netrw_quiet_keep else unlet g:netrw_quiet endif endif else exe "e ".fnameescape(fname) endif " call Dret("s:NetrwOpenFile") endfun " --------------------------------------------------------------------- " s:NetrwUnmarkList: delete local marked file lists and remove their contents from the global marked-file list {{{2 fun! s:NetrwUnmarkList(curbufnr,curdir) " call Dfunc("s:NetrwUnmarkList(curbufnr=".a:curbufnr." curdir<".a:curdir.">)") " remove all files in local marked-file list from global list if exists("s:netrwmarkfilelist_{a:curbufnr}") for mfile in s:netrwmarkfilelist_{a:curbufnr} let dfile = s:ComposePath(a:curdir,mfile) " prepend directory to mfile let idx = index(s:netrwmarkfilelist,dfile) " get index in list of dfile call remove(s:netrwmarkfilelist,idx) " remove from global list endfor if s:netrwmarkfilelist == [] unlet s:netrwmarkfilelist endif " getting rid of the local marked-file lists is easy unlet s:netrwmarkfilelist_{a:curbufnr} endif if exists("s:netrwmarkfilemtch_{a:curbufnr}") unlet s:netrwmarkfilemtch_{a:curbufnr} endif 2match none " call Dret("s:NetrwUnmarkList") endfun " --------------------------------------------------------------------- " s:NetrwUnmarkAll: remove the global marked file list and all local ones {{{2 fun! s:NetrwUnmarkAll() " call Dfunc("s:NetrwUnmarkAll()") if exists("s:netrwmarkfilelist") unlet s:netrwmarkfilelist endif sil call s:NetrwUnmarkAll2() 2match none " call Dret("s:NetrwUnmarkAll") endfun " --------------------------------------------------------------------- " s:NetrwUnmarkAll2: {{{2 fun! s:NetrwUnmarkAll2() " call Dfunc("s:NetrwUnmarkAll2()") redir => netrwmarkfilelist_let let redir END let netrwmarkfilelist_list= split(netrwmarkfilelist_let,'\n') " convert let string into a let list call filter(netrwmarkfilelist_list,"v:val =~ '^s:netrwmarkfilelist_'") " retain only those vars that start as s:netrwmarkfilelist_ call map(netrwmarkfilelist_list,"substitute(v:val,'\\s.*$','','')") " remove what the entries are equal to for flist in netrwmarkfilelist_list let curbufnr= substitute(flist,'s:netrwmarkfilelist_','','') unlet s:netrwmarkfilelist_{curbufnr} unlet s:netrwmarkfilemtch_{curbufnr} endfor " call Dret("s:NetrwUnmarkAll2") endfun " --------------------------------------------------------------------- " s:NetrwUnMarkFile: {{{2 fun! s:NetrwUnMarkFile(islocal) " call Dfunc("s:NetrwUnMarkFile(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() let curbufnr = bufnr("%") " unmark marked file list (although I expect s:NetrwUpload() " to do it, I'm just making sure) if exists("s:netrwmarkfilelist_{bufnr('%')}") " call Decho("unlet'ing: s:netrwmarkfile[list|mtch]_".bufnr("%")) unlet s:netrwmarkfilelist unlet s:netrwmarkfilelist_{curbufnr} unlet s:netrwmarkfilemtch_{curbufnr} 2match none endif " call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) call netrw#NetrwRestorePosn(svpos) " call Dret("s:NetrwUnMarkFile") endfun " --------------------------------------------------------------------- " s:NetrwMenu: generates the menu for gvim and netrw {{{2 fun! s:NetrwMenu(domenu) if !exists("g:NetrwMenuPriority") let g:NetrwMenuPriority= 80 endif if has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu " call Dfunc("NetrwMenu(domenu=".a:domenu.")") if !exists("s:netrw_menu_enabled") && a:domenu " call Decho("initialize menu") let s:netrw_menu_enabled= 1 exe 'sil! menu '.g:NetrwMenuPriority.'.1 '.g:NetrwTopLvlMenu.'Help<tab><F1> <F1>' exe 'sil! menu '.g:NetrwMenuPriority.'.5 '.g:NetrwTopLvlMenu.'-Sep1- :' exe 'sil! menu '.g:NetrwMenuPriority.'.6 '.g:NetrwTopLvlMenu.'Go\ Up\ Directory<tab>- -' exe 'sil! menu '.g:NetrwMenuPriority.'.7 '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewer<tab>x x' exe 'sil! menu '.g:NetrwMenuPriority.'.8.1 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Current\ Directory<tab>mb mb' exe 'sil! menu '.g:NetrwMenuPriority.'.8.4 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Prev\ Dir\ (History)<tab>u u' exe 'sil! menu '.g:NetrwMenuPriority.'.8.5 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Next\ Dir\ (History)<tab>U U' exe 'sil! menu '.g:NetrwMenuPriority.'.8.6 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.List<tab>qb qb' exe 'sil! menu '.g:NetrwMenuPriority.'.9.1 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ File\ Hiding\ List<tab><ctrl-h>'." \<c-h>'" exe 'sil! menu '.g:NetrwMenuPriority.'.9.2 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ Sorting\ Sequence<tab>S S' exe 'sil! menu '.g:NetrwMenuPriority.'.9.3 '.g:NetrwTopLvlMenu.'Browsing\ Control.Quick\ Hide/Unhide\ Dot\ Files<tab>'."gh gh" exe 'sil! menu '.g:NetrwMenuPriority.'.9.4 '.g:NetrwTopLvlMenu.'Browsing\ Control.Refresh\ Listing<tab>'."<ctrl-l> \<c-l>" exe 'sil! menu '.g:NetrwMenuPriority.'.9.5 '.g:NetrwTopLvlMenu.'Browsing\ Control.Settings/Options<tab>:NetrwSettings '.":NetrwSettings\<cr>" exe 'sil! menu '.g:NetrwMenuPriority.'.10 '.g:NetrwTopLvlMenu.'Delete\ File/Directory<tab>D D' exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Create\ New\ File<tab>% %' exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Current\ Window<tab><cr> '."\<cr>" exe 'sil! menu '.g:NetrwMenuPriority.'.11.2 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Preview\ File/Directory<tab>p p' exe 'sil! menu '.g:NetrwMenuPriority.'.11.3 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Previous\ Window<tab>P P' exe 'sil! menu '.g:NetrwMenuPriority.'.11.4 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Window<tab>o o' exe 'sil! menu '.g:NetrwMenuPriority.'.11.5 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Vertical\ Window<tab>v v' exe 'sil! menu '.g:NetrwMenuPriority.'.12.1 '.g:NetrwTopLvlMenu.'Explore.Directory\ Name :Explore ' exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (curdir\ only)<tab>:Explore\ */ :Explore */' exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (+subdirs)<tab>:Explore\ **/ :Explore **/' exe 'sil! menu '.g:NetrwMenuPriority.'.12.3 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (curdir\ only)<tab>:Explore\ *// :Explore *//' exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (+subdirs)<tab>:Explore\ **// :Explore **//' exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Next\ Match<tab>:Nexplore :Nexplore<cr>' exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Prev\ Match<tab>:Pexplore :Pexplore<cr>' exe 'sil! menu '.g:NetrwMenuPriority.'.13 '.g:NetrwTopLvlMenu.'Make\ Subdirectory<tab>d d' exe 'sil! menu '.g:NetrwMenuPriority.'.14.1 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ File<tab>mf mf' exe 'sil! menu '.g:NetrwMenuPriority.'.14.2 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Files\ by\ Regexp<tab>mr mr' exe 'sil! menu '.g:NetrwMenuPriority.'.14.3 '.g:NetrwTopLvlMenu.'Marked\ Files.Hide-Show-List\ Control<tab>a a' exe 'sil! menu '.g:NetrwMenuPriority.'.14.4 '.g:NetrwTopLvlMenu.'Marked\ Files.Copy\ To\ Target<tab>mc mc' exe 'sil! menu '.g:NetrwMenuPriority.'.14.5 '.g:NetrwTopLvlMenu.'Marked\ Files.Delete<tab>D D' exe 'sil! menu '.g:NetrwMenuPriority.'.14.6 '.g:NetrwTopLvlMenu.'Marked\ Files.Diff<tab>md md' exe 'sil! menu '.g:NetrwMenuPriority.'.14.7 '.g:NetrwTopLvlMenu.'Marked\ Files.Edit<tab>me me' exe 'sil! menu '.g:NetrwMenuPriority.'.14.8 '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmd<tab>mx mx' exe 'sil! menu '.g:NetrwMenuPriority.'.14.9 '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Target<tab>mm mm' exe 'sil! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.Obtain<tab>O O' exe 'sil! menu '.g:NetrwMenuPriority.'.14.11 '.g:NetrwTopLvlMenu.'Marked\ Files.Print<tab>mp mp' exe 'sil! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.Replace<tab>R R' exe 'sil! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Target<tab>mt mt' exe 'sil! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.Tag<tab>mT mT' exe 'sil! menu '.g:NetrwMenuPriority.'.14.15 '.g:NetrwTopLvlMenu.'Marked\ Files.Zip/Unzip/Compress/Uncompress<tab>mz mz' exe 'sil! menu '.g:NetrwMenuPriority.'.15 '.g:NetrwTopLvlMenu.'Obtain\ File<tab>O O' exe 'sil! menu '.g:NetrwMenuPriority.'.16.1 '.g:NetrwTopLvlMenu.'Style.Listing\ Style\ (thin-long-wide-tree)<tab>i i' exe 'sil! menu '.g:NetrwMenuPriority.'.16.2 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show<tab>a a' exe 'sil! menu '.g:NetrwMenuPriority.'.16.3 '.g:NetrwTopLvlMenu.'Style.Reverse\ Sorting\ Order<tab>'."r r" exe 'sil! menu '.g:NetrwMenuPriority.'.16.4 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method\ (name-time-size)<tab>s s' exe 'sil! menu '.g:NetrwMenuPriority.'.17 '.g:NetrwTopLvlMenu.'Rename\ File/Directory<tab>R R' exe 'sil! menu '.g:NetrwMenuPriority.'.18 '.g:NetrwTopLvlMenu.'Set\ Current\ Directory<tab>c c' call s:NetrwBookmarkMenu() " provide some history! uses priorities 2,3, reserves 4, 8.2.x let s:netrw_menucnt= 28 elseif !a:domenu let s:netrwcnt = 0 let curwin = winnr() windo if getline(2) =~ "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif exe curwin."wincmd w" if s:netrwcnt <= 1 " call Decho("clear menus") exe 'sil! unmenu '.g:NetrwTopLvlMenu " call Decho('exe sil! unmenu '.g:NetrwTopLvlMenu.'*') sil! unlet s:netrw_menu_enabled endif endif " call Dret("NetrwMenu") return endif endfun " --------------------------------------------------------------------- " s:NetrwObtain: obtain file under cursor or from markfile list {{{2 " Used by the O maps (as <SID>NetrwObtain()) fun! s:NetrwObtain(islocal) " call Dfunc("NetrwObtain(islocal=".a:islocal.")") if exists("s:netrwmarkfilelist_{bufnr('%')}") let islocal= s:netrwmarkfilelist_{bufnr('%')}[1] !~ '^\a\+://' call netrw#NetrwObtain(islocal,s:netrwmarkfilelist_{bufnr('%')}) call s:NetrwUnmarkList(bufnr('%'),b:netrw_curdir) else call netrw#NetrwObtain(a:islocal,expand("<cWORD>")) endif " call Dret("NetrwObtain") endfun " --------------------------------------------------------------------- " netrw#NetrwObtain: {{{2 " netrw#NetrwObtain(islocal,fname[,tgtdirectory]) " islocal=0 obtain from remote source " =1 obtain from local source " fname : a filename or a list of filenames " tgtdir : optional place where files are to go (not present, uses getcwd()) fun! netrw#NetrwObtain(islocal,fname,...) " call Dfunc("netrw#NetrwObtain(islocal=".a:islocal." fname<".((type(a:fname) == 1)? a:fname : string(a:fname)).">) a:0=".a:0) " NetrwStatusLine support - for obtaining support if type(a:fname) == 1 let fnamelist= [ a:fname ] elseif type(a:fname) == 3 let fnamelist= a:fname else call netrw#ErrorMsg(s:ERROR,"attempting to use NetrwObtain on something not a filename or a list",62) " call Dret("netrw#NetrwObtain") return endif " call Decho("fnamelist<".string(fnamelist).">") if a:0 > 0 let tgtdir= a:1 else let tgtdir= getcwd() endif " call Decho("tgtdir<".tgtdir.">") if exists("b:netrw_islocal") && b:netrw_islocal " obtain a file from local b:netrw_curdir to (local) tgtdir " call Decho("obtain a file from local ".b:netrw_curdir." to ".tgtdir) if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir let topath= s:ComposePath(tgtdir,"") if (has("win32") || has("win95") || has("win64") || has("win16")) " transfer files one at time " call Decho("transfer files one at a time") for fname in fnamelist " call Decho("system(".g:netrw_localcopycmd." ".shellescape(fname)." ".shellescape(topath).")") call system(g:netrw_localcopycmd." ".shellescape(fname)." ".shellescape(topath)) endfor else " transfer files with one command " call Decho("transfer files with one command") let filelist= join(map(deepcopy(fnamelist),"shellescape(v:val)")) " call Decho("system(".g:netrw_localcopycmd." ".filelist." ".shellescape(topath).")") call system(g:netrw_localcopycmd." ".filelist." ".shellescape(topath)) endif elseif !exists("b:netrw_curdir") call netrw#ErrorMsg(s:ERROR,"local browsing directory doesn't exist!",36) else call netrw#ErrorMsg(s:WARNING,"local browsing directory and current directory are identical",37) endif else " obtain files from remote b:netrw_curdir to local tgtdir " call Decho("obtain a file from remote ".b:netrw_curdir." to ".tgtdir) if type(a:fname) == 1 call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.a:fname) endif call s:NetrwMethod(b:netrw_curdir) if b:netrw_method == 4 " obtain file using scp " call Decho("obtain via scp (method#4)") if exists("g:netrw_port") && g:netrw_port != "" let useport= " ".g:netrw_scpport." ".g:netrw_port else let useport= "" endif if b:netrw_fname =~ '/' let path= substitute(b:netrw_fname,'^\(.*/\).\{-}$','\1','') else let path= "" endif let filelist= join(map(deepcopy(fnamelist),'shellescape(g:netrw_machine.":".path.v:val,1)')) " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".filelist." ".shellescape(tgtdir,1)) exe s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".filelist." ".shellescape(tgtdir,1) elseif b:netrw_method == 2 " obtain file using ftp + .netrc " call Decho("obtain via ftp+.netrc (method #2)") call s:SaveBufVars()|sil keepjumps new|call s:RestoreBufVars() let tmpbufnr= bufnr("%") setlocal ff=unix if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" keepj put =g:netrw_ftpmode " call Decho("filter input: ".getline('$')) endif if exists("b:netrw_fname") && b:netrw_fname != "" call setline(line("$")+1,'cd "'.b:netrw_fname.'"') " call Decho("filter input: ".getline('$')) endif if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('$')) endif for fname in fnamelist call setline(line("$")+1,'get "'.fname.'"') " call Decho("filter input: ".getline('$')) endfor if exists("g:netrw_port") && g:netrw_port != "" " call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) else " call Decho("executing: %!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' let debugkeep= &debug setlocal debug=msg call netrw#ErrorMsg(s:ERROR,getline(1),4) let &debug= debugkeep endif elseif b:netrw_method == 3 " obtain with ftp + machine, id, passwd, and fname (ie. no .netrc) " call Decho("obtain via ftp+mipf (method #3)") call s:SaveBufVars()|sil keepjumps new|call s:RestoreBufVars() let tmpbufnr= bufnr("%") setlocal ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port " call Decho("filter input: ".getline('$')) else keepj put ='open '.g:netrw_machine " call Decho("filter input: ".getline('$')) endif if exists("g:netrw_uid") && g:netrw_uid != "" if exists("g:netrw_ftp") && g:netrw_ftp == 1 keepj put =g:netrw_uid " call Decho("filter input: ".getline('$')) if exists("s:netrw_passwd") && s:netrw_passwd != "" keepj put ='\"'.s:netrw_passwd.'\"' endif " call Decho("filter input: ".getline('$')) elseif exists("s:netrw_passwd") keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' " call Decho("filter input: ".getline('$')) endif endif if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" keepj put =g:netrw_ftpmode " call Decho("filter input: ".getline('$')) endif if exists("b:netrw_fname") && b:netrw_fname != "" keepj call setline(line("$")+1,'cd "'.b:netrw_fname.'"') " call Decho("filter input: ".getline('$')) endif if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('$')) endif if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('$')) endif for fname in fnamelist keepj call setline(line("$")+1,'get "'.fname.'"') endfor " call Decho("filter input: ".getline('$')) " perform ftp: " -i : turns off interactive prompting from ftp " -n unix : DON'T use <.netrc>, even though it exists " -n win32: quit being obnoxious about password keepj norm! 1Gdd " call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" " call Decho("error<".getline(1).">") if !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:ERROR,getline(1),5) endif endif elseif !exists("b:netrw_method") || b:netrw_method < 0 " call Dfunc("netrw#NetrwObtain : unsupported method") return endif " restore status line if type(a:fname) == 1 && exists("s:netrw_users_stl") keepj call s:SetupNetrwStatusLine(s:netrw_users_stl) endif endif " cleanup if exists("tmpbufnr") if bufnr("%") != tmpbufnr exe tmpbufnr."bw!" else q! endif endif " call Dret("netrw#NetrwObtain") endfun " --------------------------------------------------------------------- " s:NetrwPrevWinOpen: open file/directory in previous window. {{{2 " If there's only one window, then the window will first be split. " Returns: " choice = 0 : didn't have to choose " choice = 1 : saved modified file in window first " choice = 2 : didn't save modified file, opened window " choice = 3 : cancel open fun! s:NetrwPrevWinOpen(islocal) " call Dfunc("NetrwPrevWinOpen(islocal=".a:islocal.")") " grab a copy of the b:netrw_curdir to pass it along to newly split windows let curdir = b:netrw_curdir " get last window number and the word currently under the cursor let lastwinnr = winnr("$") let curword = s:NetrwGetWord() let choice = 0 " call Decho("lastwinnr=".lastwinnr." curword<".curword.">") let didsplit = 0 if lastwinnr == 1 " if only one window, open a new one first " call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")") if g:netrw_preview let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize " call Decho("exe ".(g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s") exe (g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s" else let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize " call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s") exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" endif let didsplit = 1 else keepj call s:SaveBufVars() " call Decho("wincmd p") wincmd p keepj call s:RestoreBufVars() " if the previous window's buffer has been changed (is modified), " and it doesn't appear in any other extant window, then ask the " user if s/he wants to abandon modifications therein. let bnr = winbufnr(0) let bnrcnt = 0 if &mod " call Decho("detected: prev window's buffer has been modified: bnr=".bnr." winnr#".winnr()) let eikeep= &ei set ei=all windo if winbufnr(0) == bnr | let bnrcnt=bnrcnt+1 | endif exe bnr."wincmd p" let &ei= eikeep " call Decho("bnr=".bnr." bnrcnt=".bnrcnt." buftype=".&bt." winnr#".winnr()) if bnrcnt == 1 let bufname = bufname(winbufnr(winnr())) let choice = confirm("Save modified file<".bufname.">?","&Yes\n&No\n&Cancel") " call Decho("bufname<".bufname."> choice=".choice." winnr#".winnr()) if choice == 1 " Yes -- write file & then browse let v:errmsg= "" sil w if v:errmsg != "" call netrw#ErrorMsg(s:ERROR,"unable to write <".bufname.">!",30) if didsplit q else wincmd p endif " call Dret("NetrwPrevWinOpen ".choice." : unable to write <".bufname.">") return choice endif elseif choice == 2 " No -- don't worry about changed file, just browse anyway " call Decho("(NetrwPrevWinOpen) setl nomod") setl nomod " call Decho("(NetrwPrevWinOpen) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") keepj call netrw#ErrorMsg(s:WARNING,bufname." changes to ".bufname." abandoned",31) wincmd p else " Cancel -- don't do this if didsplit q else wincmd p endif " call Dret("NetrwPrevWinOpen ".choice." : cancelled") return choice endif endif endif endif " restore b:netrw_curdir (window split/enew may have lost it) let b:netrw_curdir= curdir if a:islocal < 2 if a:islocal call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(a:islocal,curword)) else call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,curword)) endif endif " call Dret("NetrwPrevWinOpen ".choice) return choice endfun " --------------------------------------------------------------------- " s:NetrwUpload: load fname to tgt (used by NetrwMarkFileCopy()) {{{2 " Always assumed to be local -> remote " call s:NetrwUpload(filename, target) " call s:NetrwUpload(filename, target, fromdirectory) fun! s:NetrwUpload(fname,tgt,...) " call Dfunc("s:NetrwUpload(fname<".((type(a:fname) == 1)? a:fname : string(a:fname))."> tgt<".a:tgt.">) a:0=".a:0) if a:tgt =~ '^\a\+://' let tgtdir= substitute(a:tgt,'^\a\+://[^/]\+/\(.\{-}\)$','\1','') else let tgtdir= substitute(a:tgt,'^\(.*\)/[^/]*$','\1','') endif " call Decho("tgtdir<".tgtdir.">") if a:0 > 0 let fromdir= a:1 else let fromdir= getcwd() endif " call Decho("fromdir<".fromdir.">") if type(a:fname) == 1 " handle uploading a single file using NetWrite " call Decho("handle uploading a single file via NetWrite") 1split " call Decho("exe e ".fnameescape(a:fname)) exe "e ".fnameescape(a:fname) " call Decho("now locally editing<".expand("%").">, has ".line("$")." lines") if a:tgt =~ '/$' let wfname= substitute(a:fname,'^.*/','','') " call Decho("exe w! ".fnameescape(wfname)) exe "w! ".fnameescape(a:tgt.wfname) else " call Decho("writing local->remote: exe w ".fnameescape(a:tgt)) exe "w ".fnameescape(a:tgt) " call Decho("done writing local->remote") endif q! elseif type(a:fname) == 3 " handle uploading a list of files via scp " call Decho("handle uploading a list of files via scp") let curdir= getcwd() if a:tgt =~ '^scp:' exe "keepjumps sil lcd ".fnameescape(fromdir) let filelist= deepcopy(s:netrwmarkfilelist_{bufnr('%')}) let args = join(map(filelist,"shellescape(v:val, 1)")) if exists("g:netrw_port") && g:netrw_port != "" let useport= " ".g:netrw_scpport." ".g:netrw_port else let useport= "" endif let machine = substitute(a:tgt,'^scp://\([^/:]\+\).*$','\1','') let tgt = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','') " call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".args." ".shellescape(machine.":".tgt,1)) exe s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".args." ".shellescape(machine.":".tgt,1) exe "keepjumps sil lcd ".fnameescape(curdir) elseif a:tgt =~ '^ftp:' call s:NetrwMethod(a:tgt) if b:netrw_method == 2 " handle uploading a list of files via ftp+.netrc let netrw_fname = b:netrw_fname sil keepj new " call Decho("filter input window#".winnr()) keepj put =g:netrw_ftpmode " call Decho("filter input: ".getline('$')) if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('$')) endif keepj call setline(line("$")+1,'lcd "'.fromdir.'"') " call Decho("filter input: ".getline('$')) if tgtdir == "" let tgtdir= '/' endif keepj call setline(line("$")+1,'cd "'.tgtdir.'"') " call Decho("filter input: ".getline('$')) for fname in a:fname keepj call setline(line("$")+1,'put "'.fname.'"') " call Decho("filter input: ".getline('$')) endfor if exists("g:netrw_port") && g:netrw_port != "" " call Decho("executing: ".s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) else " call Decho("filter input window#".winnr()) " call Decho("executing: ".s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) sil keepj g/Local directory now/d call histdel("/",-1) if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' call netrw#ErrorMsg(s:ERROR,getline(1),14) else bw!|q endif elseif b:netrw_method == 3 " upload with ftp + machine, id, passwd, and fname (ie. no .netrc) let netrw_fname= b:netrw_fname keepj call s:SaveBufVars()|sil keepj new|keepj call s:RestoreBufVars() let tmpbufnr= bufnr("%") setlocal ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port " call Decho("filter input: ".getline('$')) else keepj put ='open '.g:netrw_machine " call Decho("filter input: ".getline('$')) endif if exists("g:netrw_uid") && g:netrw_uid != "" if exists("g:netrw_ftp") && g:netrw_ftp == 1 keepj put =g:netrw_uid " call Decho("filter input: ".getline('$')) if exists("s:netrw_passwd") keepj call setline(line("$")+1,'"'.s:netrw_passwd.'"') endif " call Decho("filter input: ".getline('$')) elseif exists("s:netrw_passwd") keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' " call Decho("filter input: ".getline('$')) endif endif keepj call setline(line("$")+1,'lcd "'.fromdir.'"') " call Decho("filter input: ".getline('$')) if exists("b:netrw_fname") && b:netrw_fname != "" keepj call setline(line("$")+1,'cd "'.b:netrw_fname.'"') " call Decho("filter input: ".getline('$')) endif if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('$')) endif for fname in a:fname keepj call setline(line("$")+1,'put "'.fname.'"') " call Decho("filter input: ".getline('$')) endfor " perform ftp: " -i : turns off interactive prompting from ftp " -n unix : DON'T use <.netrc>, even though it exists " -n win32: quit being obnoxious about password keepj norm! 1Gdd " call Decho("executing: ".s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) sil keepj g/Local directory now/d call histdel("/",-1) if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' let debugkeep= &debug setlocal debug=msg call netrw#ErrorMsg(s:ERROR,getline(1),15) let &debug = debugkeep let mod = 1 else bw!|q endif elseif !exists("b:netrw_method") || b:netrw_method < 0 " call Dfunc("netrw#NetrwUpload : unsupported method") return endif else call netrw#ErrorMsg(s:ERROR,"can't obtain files with protocol from<".a:tgt.">",63) endif endif " call Dret("s:NetrwUpload") endfun " --------------------------------------------------------------------- " s:NetrwPreview: {{{2 fun! s:NetrwPreview(path) range " call Dfunc("NetrwPreview(path<".a:path.">)") keepj call s:NetrwOptionSave("s:") keepj call s:NetrwSafeOptions() if has("quickfix") if !isdirectory(a:path) if g:netrw_preview && !g:netrw_alto let pvhkeep = &pvh let winsz = (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize let &pvh = winwidth(0) - winsz endif exe (g:netrw_alto? "top " : "bot ").(g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path) if exists("pvhkeep") let &pvh= pvhkeep endif elseif !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:WARNING,"sorry, cannot preview a directory such as <".a:path.">",38) endif elseif !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:WARNING,"sorry, to preview your vim needs the quickfix feature compiled in",39) endif keepj call s:NetrwOptionRestore("s:") " call Dret("NetrwPreview") endfun " --------------------------------------------------------------------- " s:NetrwRefresh: {{{2 fun! s:NetrwRefresh(islocal,dirname) " call Dfunc("NetrwRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") hide=".g:netrw_hide." sortdir=".g:netrw_sort_direction) " at the current time (Mar 19, 2007) all calls to NetrwRefresh() call NetrwBrowseChgDir() first. " NetrwBrowseChgDir() may clear the display; hence a NetrwSavePosn() may not work if its placed here. " Also, NetrwBrowseChgDir() now does a NetrwSavePosn() itself. setlocal ma noro " call Decho("setlocal ma noro") " call Decho("clear buffer<".expand("%")."> with :%d") sil! keepj %d if a:islocal keepj call netrw#LocalBrowseCheck(a:dirname) else keepj call s:NetrwBrowse(a:islocal,a:dirname) endif keepj call netrw#NetrwRestorePosn() " restore file marks if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/") exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" else " call Decho("2match none") 2match none endif " redraw! " call Dret("NetrwRefresh") endfun " --------------------------------------------------------------------- " s:NetrwRefreshDir: refreshes a directory by name {{{2 " Called by NetrwMarkFileCopy() " Interfaces to s:NetrwRefresh() and s:LocalBrowseShellCmdRefresh() fun! s:NetrwRefreshDir(islocal,dirname) " call Dfunc("s:NetrwRefreshDir(islocal=".a:islocal." dirname<".a:dirname.">) fastbrowse=".g:netrw_fastbrowse) if g:netrw_fastbrowse == 0 " slowest mode (keep buffers refreshed, local or remote) " call Decho("slowest mode: keep buffers refreshed, local or remote") let tgtwin= bufwinnr(a:dirname) " call Decho("tgtwin= bufwinnr(".a:dirname.")=".tgtwin) if tgtwin > 0 " tgtwin is being displayed, so refresh it let curwin= winnr() " call Decho("refresh tgtwin#".tgtwin." (curwin#".curwin.")") exe tgtwin."wincmd w" keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) exe curwin."wincmd w" elseif bufnr(a:dirname) > 0 let bn= bufnr(a:dirname) " call Decho("bd bufnr(".a:dirname.")=".bn) exe "sil bd ".bn endif elseif g:netrw_fastbrowse <= 1 " call Decho("medium-speed mode: refresh local buffers only") keepj call s:LocalBrowseShellCmdRefresh() endif " call Dret("s:NetrwRefreshDir") endfun " --------------------------------------------------------------------- " s:NetrwSetSort: sets up the sort based on the g:netrw_sort_sequence {{{2 " What this function does is to compute a priority for the patterns " in the g:netrw_sort_sequence. It applies a substitute to any " "files" that satisfy each pattern, putting the priority / in " front. An "*" pattern handles the default priority. fun! s:NetrwSetSort() " call Dfunc("SetSort() bannercnt=".w:netrw_bannercnt) if w:netrw_liststyle == s:LONGLIST let seqlist = substitute(g:netrw_sort_sequence,'\$','\\%(\t\\|\$\\)','ge') else let seqlist = g:netrw_sort_sequence endif " sanity check -- insure that * appears somewhere if seqlist == "" let seqlist= '*' elseif seqlist !~ '\*' let seqlist= seqlist.',*' endif let priority = 1 while seqlist != "" if seqlist =~ ',' let seq = substitute(seqlist,',.*$','','e') let seqlist = substitute(seqlist,'^.\{-},\(.*\)$','\1','e') else let seq = seqlist let seqlist = "" endif if priority < 10 let spriority= "00".priority.g:netrw_sepchr elseif priority < 100 let spriority= "0".priority.g:netrw_sepchr else let spriority= priority.g:netrw_sepchr endif " call Decho("priority=".priority." spriority<".spriority."> seq<".seq."> seqlist<".seqlist.">") " sanity check if w:netrw_bannercnt > line("$") " apparently no files were left after a Hiding pattern was used " call Dret("SetSort : no files left after hiding") return endif if seq == '*' let starpriority= spriority else exe 'sil keepj '.w:netrw_bannercnt.',$g/'.seq.'/s/^/'.spriority.'/' call histdel("/",-1) " sometimes multiple sorting patterns will match the same file or directory. " The following substitute is intended to remove the excess matches. exe 'sil keepj '.w:netrw_bannercnt.',$g/^\d\{3}'.g:netrw_sepchr.'\d\{3}\//s/^\d\{3}'.g:netrw_sepchr.'\(\d\{3}\/\).\@=/\1/e' keepj call histdel("/",-1) endif let priority = priority + 1 endwhile if exists("starpriority") exe 'sil keepj '.w:netrw_bannercnt.',$v/^\d\{3}'.g:netrw_sepchr.'/s/^/'.starpriority.'/' keepj call histdel("/",-1) endif " Following line associated with priority -- items that satisfy a priority " pattern get prefixed by ###/ which permits easy sorting by priority. " Sometimes files can satisfy multiple priority patterns -- only the latest " priority pattern needs to be retained. So, at this point, these excess " priority prefixes need to be removed, but not directories that happen to " be just digits themselves. exe 'sil keepj '.w:netrw_bannercnt.',$s/^\(\d\{3}'.g:netrw_sepchr.'\)\%(\d\{3}'.g:netrw_sepchr.'\)\+\ze./\1/e' keepj call histdel("/",-1) " call Dret("SetSort") endfun " ===================================================================== " s:NetrwSortStyle: change sorting style (name - time - size) and refresh display {{{2 fun! s:NetrwSortStyle(islocal) " call Dfunc("s:NetrwSortStyle(islocal=".a:islocal.") netrw_sort_by<".g:netrw_sort_by.">") keepj call s:NetrwSaveWordPosn() let svpos= netrw#NetrwSavePosn() let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name' keepj norm! 0 keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) keepj call netrw#NetrwRestorePosn(svpos) " call Dret("s:NetrwSortStyle : netrw_sort_by<".g:netrw_sort_by.">") endfun " --------------------------------------------------------------------- " s:NetrwSplit: mode {{{2 " =0 : net and o " =1 : net and t " =2 : net and v " =3 : local and o " =4 : local and t " =5 : local and v fun! s:NetrwSplit(mode) " call Dfunc("s:NetrwSplit(mode=".a:mode.") alto=".g:netrw_alto." altv=".g:netrw_altv) call s:SaveWinVars() if a:mode == 0 " remote and o let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize " call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s") exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord())) unlet s:didsplit elseif a:mode == 1 " remote and t let newdir = s:NetrwBrowseChgDir(0,s:NetrwGetWord()) " call Decho("tabnew") tabnew let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call s:NetrwBrowse(0,newdir) unlet s:didsplit elseif a:mode == 2 " remote and v let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize " call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v") exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v" let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord())) unlet s:didsplit elseif a:mode == 3 " local and o let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize " call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s") exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord())) unlet s:didsplit elseif a:mode == 4 " local and t let cursorword = s:NetrwGetWord() let netrw_curdir= s:NetrwTreeDir() " call Decho("tabnew") tabnew let b:netrw_curdir= netrw_curdir let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,cursorword)) unlet s:didsplit elseif a:mode == 5 " local and v let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize " call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v") exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v" let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord())) unlet s:didsplit else keepj call netrw#ErrorMsg(s:ERROR,"(NetrwSplit) unsupported mode=".a:mode,45) endif " call Dret("s:NetrwSplit") endfun " --------------------------------------------------------------------- " NetrwStatusLine: {{{2 fun! NetrwStatusLine() " vvv NetrwStatusLine() debugging vvv " let g:stlmsg="" " if !exists("w:netrw_explore_bufnr") " let g:stlmsg="!X<explore_bufnr>" " elseif w:netrw_explore_bufnr != bufnr("%") " let g:stlmsg="explore_bufnr!=".bufnr("%") " endif " if !exists("w:netrw_explore_line") " let g:stlmsg=" !X<explore_line>" " elseif w:netrw_explore_line != line(".") " let g:stlmsg=" explore_line!={line(.)<".line(".").">" " endif " if !exists("w:netrw_explore_list") " let g:stlmsg=" !X<explore_list>" " endif " ^^^ NetrwStatusLine() debugging ^^^ if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list") " restore user's status line let &stl = s:netrw_users_stl let &laststatus = s:netrw_users_ls if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif if exists("w:netrw_explore_line") |unlet w:netrw_explore_line |endif return "" else return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen endif endfun " --------------------------------------------------------------------- " s:NetrwTreeDir: determine tree directory given current cursor position {{{2 " (full path directory with trailing slash returned) fun! s:NetrwTreeDir() " call Dfunc("NetrwTreeDir() curline#".line(".")."<".getline('.')."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">") let treedir= b:netrw_curdir " call Decho("set initial treedir<".treedir.">") let s:treecurpos= netrw#NetrwSavePosn() if w:netrw_liststyle == s:TREELIST " call Decho("w:netrrw_liststyle is TREELIST:") " call Decho("line#".line(".")." getline(.)<".getline('.')."> treecurpos<".string(s:treecurpos).">") " extract tree directory if on a line specifying a subdirectory (ie. ends with "/") if getline('.') =~ '/$' let treedir= substitute(getline('.'),'^\%(| \)*\([^|].\{-}\)$','\1','e') else let treedir= "" endif " call Decho("treedir<".treedir.">") " detect user attempting to close treeroot if getline('.') !~ '|' && getline('.') != '..' " call Decho("user attempted to close treeroot") " now force a refresh " call Decho("clear buffer<".expand("%")."> with :%d") sil! keepj %d " call Dret("NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">") return b:netrw_curdir endif " elide all non-depth information let depth = substitute(getline('.'),'^\(\%(| \)*\)[^|].\{-}$','\1','e') " call Decho("depth<".depth."> 1st subst (non-depth info removed)") " elide first depth let depth = substitute(depth,'^| ','','') " call Decho("depth<".depth."> 2nd subst (first depth removed)") " construct treedir by searching backwards at correct depth " call Decho("constructing treedir<".treedir."> depth<".depth.">") while depth != "" && search('^'.depth.'[^|].\{-}/$','bW') let dirname= substitute(getline('.'),'^\(| \)*','','e') let treedir= dirname.treedir let depth = substitute(depth,'^| ','','') " call Decho("constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">") endwhile if w:netrw_treetop =~ '/$' let treedir= w:netrw_treetop.treedir else let treedir= w:netrw_treetop.'/'.treedir endif " call Decho("bufnr(.)=".bufnr("%")." line($)=".line("$")." line(.)=".line(".")) endif let treedir= substitute(treedir,'//$','/','') " call Dret("NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">") return treedir endfun " --------------------------------------------------------------------- " s:NetrwTreeDisplay: recursive tree display {{{2 fun! s:NetrwTreeDisplay(dir,depth) " call Dfunc("NetrwTreeDisplay(dir<".a:dir."> depth<".a:depth.">)") " insure that there are no folds setlocal nofen " install ../ and shortdir if a:depth == "" call setline(line("$")+1,'../') " call Decho("setline#".line("$")." ../ (depth is zero)") endif if a:dir =~ '^\a\+://' if a:dir == w:netrw_treetop let shortdir= a:dir else let shortdir= substitute(a:dir,'^.*/\([^/]\+\)/$','\1/','e') endif call setline(line("$")+1,a:depth.shortdir) else let shortdir= substitute(a:dir,'^.*/','','e') call setline(line("$")+1,a:depth.shortdir.'/') endif " call Decho("setline#".line("$")." shortdir<".a:depth.shortdir.">") " append a / to dir if its missing one let dir= a:dir if dir !~ '/$' let dir= dir.'/' endif " display subtrees (if any) let depth= "| ".a:depth " call Decho("display subtrees with depth<".depth."> and current leaves") for entry in w:netrw_treedict[a:dir] let direntry= substitute(dir.entry,'/$','','e') " call Decho("dir<".dir."> entry<".entry."> direntry<".direntry.">") if entry =~ '/$' && has_key(w:netrw_treedict,direntry) " call Decho("<".direntry."> is a key in treedict - display subtree for it") keepj call s:NetrwTreeDisplay(direntry,depth) elseif entry =~ '/$' && has_key(w:netrw_treedict,direntry.'/') " call Decho("<".direntry."/> is a key in treedict - display subtree for it") keepj call s:NetrwTreeDisplay(direntry.'/',depth) else " call Decho("<".entry."> is not a key in treedict (no subtree)") sil! keepj call setline(line("$")+1,depth.entry) endif endfor " call Dret("NetrwTreeDisplay") endfun " --------------------------------------------------------------------- " s:NetrwTreeListing: displays tree listing from treetop on down, using NetrwTreeDisplay() {{{2 fun! s:NetrwTreeListing(dirname) if w:netrw_liststyle == s:TREELIST " call Dfunc("NetrwTreeListing() bufname<".expand("%").">") " call Decho("curdir<".a:dirname.">") " call Decho("win#".winnr().": w:netrw_treetop ".(exists("w:netrw_treetop")? "exists" : "doesn't exit")." w:netrw_treedict ".(exists("w:netrw_treedict")? "exists" : "doesn't exit")) " update the treetop " call Decho("update the treetop") if !exists("w:netrw_treetop") let w:netrw_treetop= a:dirname " call Decho("w:netrw_treetop<".w:netrw_treetop."> (reusing)") elseif (w:netrw_treetop =~ ('^'.a:dirname) && s:Strlen(a:dirname) < s:Strlen(w:netrw_treetop)) || a:dirname !~ ('^'.w:netrw_treetop) let w:netrw_treetop= a:dirname " call Decho("w:netrw_treetop<".w:netrw_treetop."> (went up)") endif " insure that we have at least an empty treedict if !exists("w:netrw_treedict") let w:netrw_treedict= {} endif " update the directory listing for the current directory " call Decho("updating dictionary with ".a:dirname.":[..directory listing..]") " call Decho("bannercnt=".w:netrw_bannercnt." line($)=".line("$")) exe "sil! keepj ".w:netrw_bannercnt.',$g@^\.\.\=/$@d' let w:netrw_treedict[a:dirname]= getline(w:netrw_bannercnt,line("$")) " call Decho("w:treedict[".a:dirname."]= ".string(w:netrw_treedict[a:dirname])) exe "sil! keepj ".w:netrw_bannercnt.",$d" " if past banner, record word if exists("w:netrw_bannercnt") && line(".") > w:netrw_bannercnt let fname= expand("<cword>") else let fname= "" endif " call Decho("fname<".fname.">") " display from treetop on down keepj call s:NetrwTreeDisplay(w:netrw_treetop,"") " call Dret("NetrwTreeListing : bufname<".expand("%").">") return endif endfun " --------------------------------------------------------------------- " s:NetrwWideListing: {{{2 fun! s:NetrwWideListing() if w:netrw_liststyle == s:WIDELIST " call Dfunc("NetrwWideListing() w:netrw_liststyle=".w:netrw_liststyle.' fo='.&fo.' l:fo='.&l:fo) " look for longest filename (cpf=characters per filename) " cpf: characters per filename " fpl: filenames per line " fpc: filenames per column setlocal ma noro " call Decho("setlocal ma noro") let b:netrw_cpf= 0 if line("$") >= w:netrw_bannercnt exe 'sil keepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' keepj call histdel("/",-1) else " call Dret("NetrwWideListing") return endif let b:netrw_cpf= b:netrw_cpf + 2 " call Decho("b:netrw_cpf=max_filename_length+2=".b:netrw_cpf) " determine qty files per line (fpl) let w:netrw_fpl= winwidth(0)/b:netrw_cpf if w:netrw_fpl <= 0 let w:netrw_fpl= 1 endif " call Decho("fpl= [winwidth=".winwidth(0)."]/[b:netrw_cpf=".b:netrw_cpf.']='.w:netrw_fpl) " make wide display exe 'sil keepj '.w:netrw_bannercnt.',$s/^.*$/\=escape(printf("%-'.b:netrw_cpf.'s",submatch(0)),"\\")/' keepj call histdel("/",-1) let fpc = (line("$") - w:netrw_bannercnt + w:netrw_fpl)/w:netrw_fpl let newcolstart = w:netrw_bannercnt + fpc let newcolend = newcolstart + fpc - 1 " call Decho("bannercnt=".w:netrw_bannercnt." fpl=".w:netrw_fpl." fpc=".fpc." newcol[".newcolstart.",".newcolend."]") sil! let keepregstar = @* while line("$") >= newcolstart if newcolend > line("$") | let newcolend= line("$") | endif let newcolqty= newcolend - newcolstart exe newcolstart if newcolqty == 0 exe "sil! keepj norm! 0\<c-v>$hx".w:netrw_bannercnt."G$p" else exe "sil! keepj norm! 0\<c-v>".newcolqty.'j$hx'.w:netrw_bannercnt.'G$p' endif exe "sil! keepj ".newcolstart.','.newcolend.'d' exe 'sil! keepj '.w:netrw_bannercnt endwhile sil! let @*= keepregstar exe "sil! keepj ".w:netrw_bannercnt.',$s/\s\+$//e' keepj call histdel("/",-1) " call Decho("NetrwWideListing) setl noma nomod ro") setl noma nomod ro " call Decho("(NetrwWideListing) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("NetrwWideListing") return endif endfun " --------------------------------------------------------------------- " s:PerformListing: {{{2 fun! s:PerformListing(islocal) " call Dfunc("s:PerformListing(islocal=".a:islocal.") bufnr(%)=".bufnr("%")."<".bufname("%").">") " set up syntax highlighting {{{3 " call Decho("set up syntax highlighting") if has("syntax") if !exists("g:syntax_on") || !g:syntax_on " call Decho("but g:syntax_on".(exists("g:syntax_on")? "=".g:syntax_on : "<doesn't exist>")) setlocal ft= elseif &ft != "netrw" setlocal ft=netrw endif endif keepj call s:NetrwSafeOptions() setlocal noro ma " call Decho("setlocal noro ma") " if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 " Decho " call Decho("(netrw) Processing your browsing request...") " endif " Decho " call Decho('w:netrw_liststyle='.(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a')) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") " force a refresh for tree listings " call Decho("force refresh for treelisting: clear buffer<".expand("%")."> with :%d") sil! keepj %d endif " save current directory on directory history list keepj call s:NetrwBookHistHandler(3,b:netrw_curdir) " Set up the banner {{{3 if g:netrw_banner " call Decho("set up banner") keepj call setline(1,'" ============================================================================') keepj call setline(2,'" Netrw Directory Listing (netrw '.g:loaded_netrw.')') keepj call setline(3,'" '.b:netrw_curdir) let w:netrw_bannercnt= 3 keepj exe "sil! keepj ".w:netrw_bannercnt else keepj 1 let w:netrw_bannercnt= 1 endif let sortby= g:netrw_sort_by if g:netrw_sort_direction =~ "^r" let sortby= sortby." reversed" endif " Sorted by... {{{3 if g:netrw_banner " call Decho("handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">") if g:netrw_sort_by =~ "^n" " call Decho("directories will be sorted by name") " sorted by name keepj put ='\" Sorted by '.sortby keepj put ='\" Sort sequence: '.g:netrw_sort_sequence let w:netrw_bannercnt= w:netrw_bannercnt + 2 else " call Decho("directories will be sorted by size or time") " sorted by size or date keepj put ='\" Sorted by '.sortby let w:netrw_bannercnt= w:netrw_bannercnt + 1 endif exe "sil! keepj ".w:netrw_bannercnt endif " show copy/move target, if any if g:netrw_banner if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") " call Decho("show copy/move target<".s:netrwmftgt.">") keepj put ='' if s:netrwmftgt_islocal sil! keepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (local)') else sil! keepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (remote)') endif let w:netrw_bannercnt= w:netrw_bannercnt + 1 else " call Decho("s:netrwmftgt does not exist, don't make Copy/Move Tgt") endif exe "sil! keepj ".w:netrw_bannercnt endif " Hiding... -or- Showing... {{{3 if g:netrw_banner " call Decho("handle hiding/showing (g:netrw_hide=".g:netrw_list_hide." g:netrw_list_hide<".g:netrw_list_hide.">)") if g:netrw_list_hide != "" && g:netrw_hide if g:netrw_hide == 1 keepj put ='\" Hiding: '.g:netrw_list_hide else keepj put ='\" Showing: '.g:netrw_list_hide endif let w:netrw_bannercnt= w:netrw_bannercnt + 1 endif exe "keepjumps ".w:netrw_bannercnt keepj put ='\" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec' keepj put ='\" ============================================================================' let w:netrw_bannercnt= w:netrw_bannercnt + 2 endif " bannercnt should index the line just after the banner if g:netrw_banner let w:netrw_bannercnt= w:netrw_bannercnt + 1 exe "sil! keepj ".w:netrw_bannercnt " call Decho("bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$")) endif " get list of files " call Decho("Get list of files - islocal=".a:islocal) if a:islocal keepj call s:LocalListing() else " remote keepj call s:NetrwRemoteListing() endif " call Decho("g:netrw_banner=".g:netrw_banner." w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)") " manipulate the directory listing (hide, sort) {{{3 if !exists("w:netrw_bannercnt") let w:netrw_bannercnt= 0 endif if !g:netrw_banner || line("$") >= w:netrw_bannercnt " call Decho("manipulate directory listing (hide)") " call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") if g:netrw_hide && g:netrw_list_hide != "" keepj call s:NetrwListHide() endif if !g:netrw_banner || line("$") >= w:netrw_bannercnt " call Decho("manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">") if g:netrw_sort_by =~ "^n" " sort by name keepj call s:NetrwSetSort() if !g:netrw_banner || w:netrw_bannercnt < line("$") " call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")") if g:netrw_sort_direction =~ 'n' " normal direction sorting exe 'sil keepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options else " reverse direction sorting exe 'sil keepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options endif endif " remove priority pattern prefix " call Decho("remove priority pattern prefix") exe 'sil! keepj '.w:netrw_bannercnt.',$s/^\d\{3}'.g:netrw_sepchr.'//e' keepj call histdel("/",-1) elseif a:islocal if !g:netrw_banner || w:netrw_bannercnt < line("$") " call Decho("g:netrw_sort_direction=".g:netrw_sort_direction) if g:netrw_sort_direction =~ 'n' " call Decho('exe sil keepjumps '.w:netrw_bannercnt.',$sort') exe 'sil! keepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options else " call Decho('exe sil keepjumps '.w:netrw_bannercnt.',$sort!') exe 'sil! keepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options endif exe 'sil! keepj '.w:netrw_bannercnt.',$s/^\d\{-}\///e' keepj call histdel("/",-1) endif endif elseif g:netrw_sort_direction =~ 'r' " call Decho('reverse the sorted listing') if !g:netrw_banner || w:netrw_bannercnt < line('$') exe 'sil! keepj '.w:netrw_bannercnt.',$g/^/m '.w:netrw_bannercnt call histdel("/",-1) endif endif endif " convert to wide/tree listing {{{3 " call Decho("modify display if wide/tree listing style") keepj call s:NetrwWideListing() keepj call s:NetrwTreeListing(b:netrw_curdir) if exists("w:netrw_bannercnt") && (line("$") > w:netrw_bannercnt || !g:netrw_banner) " place cursor on the top-left corner of the file listing " call Decho("place cursor on top-left corner of file listing") exe 'sil! keepj '.w:netrw_bannercnt sil! keepj norm! 0 endif " record previous current directory let w:netrw_prvdir= b:netrw_curdir " call Decho("record netrw_prvdir<".w:netrw_prvdir.">") " save certain window-oriented variables into buffer-oriented variables {{{3 keepj call s:SetBufWinVars() keepj call s:NetrwOptionRestore("w:") " set display to netrw display settings " call Decho("set display to netrw display settings (noma nomod etc)") exe "setl ".g:netrw_bufsettings if exists("s:treecurpos") keepj call netrw#NetrwRestorePosn(s:treecurpos) unlet s:treecurpos endif " call Dret("s:PerformListing : curpos<".string(getpos(".")).">") endfun " --------------------------------------------------------------------- " s:SetupNetrwStatusLine: {{{2 fun! s:SetupNetrwStatusLine(statline) " call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)") if !exists("s:netrw_setup_statline") let s:netrw_setup_statline= 1 " call Decho("do first-time status line setup") if !exists("s:netrw_users_stl") let s:netrw_users_stl= &stl endif if !exists("s:netrw_users_ls") let s:netrw_users_ls= &laststatus endif " set up User9 highlighting as needed let keepa= @a redir @a try hi User9 catch /^Vim\%((\a\+)\)\=:E411/ if &bg == "dark" hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue else hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue endif endtry redir END let @a= keepa endif " set up status line (may use User9 highlighting) " insure that windows have a statusline " make sure statusline is displayed let &stl=a:statline setlocal laststatus=2 " call Decho("stl=".&stl) redraw " call Dret("SetupNetrwStatusLine : stl=".&stl) endfun " --------------------------------------------------------------------- " Remote Directory Browsing Support: {{{1 " =========================================== " --------------------------------------------------------------------- " s:NetrwRemoteListing: {{{2 fun! s:NetrwRemoteListing() " call Dfunc("s:NetrwRemoteListing() b:netrw_curdir<".b:netrw_curdir.">)") call s:RemotePathAnalysis(b:netrw_curdir) " sanity check: if exists("b:netrw_method") && b:netrw_method =~ '[235]' " call Decho("b:netrw_method=".b:netrw_method) if !executable("ftp") if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ftp",18) endif call s:NetrwOptionRestore("w:") " call Dret("s:NetrwRemoteListing") return endif elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == '' if !exists("g:netrw_quiet") if g:netrw_list_cmd == "" keepj call netrw#ErrorMsg(s:ERROR,g:netrw_ssh_cmd." is not executable on your system",47) else keepj call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ".g:netrw_list_cmd,19) endif endif keepj call s:NetrwOptionRestore("w:") " call Dret("s:NetrwRemoteListing") return endif " (remote handling sanity check) if exists("b:netrw_method") " call Decho("setting w:netrw_method<".b:netrw_method.">") let w:netrw_method= b:netrw_method endif if s:method == "ftp" " use ftp to get remote file listing {{{3 " call Decho("use ftp to get remote file listing") let s:method = "ftp" let listcmd = g:netrw_ftp_list_cmd if g:netrw_sort_by =~ '^t' let listcmd= g:netrw_ftp_timelist_cmd elseif g:netrw_sort_by =~ '^s' let listcmd= g:netrw_ftp_sizelist_cmd endif " call Decho("listcmd<".listcmd."> (using g:netrw_ftp_list_cmd)") call s:NetrwRemoteFtpCmd(s:path,listcmd) " exe "sil! keepalt keepj ".w:netrw_bannercnt.',$g/^./call Decho("raw listing: ".getline("."))' if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST " shorten the listing " call Decho("generate short listing") exe "sil! keepalt keepj ".w:netrw_bannercnt " cleanup if g:netrw_ftp_browse_reject != "" exe "sil! keepalt keepj g/".g:netrw_ftp_browse_reject."/keepj d" keepj call histdel("/",-1) endif sil! keepj %s/\r$//e keepj call histdel("/",-1) " if there's no ../ listed, then put ./ and ../ in let line1= line(".") exe "sil! keepj ".w:netrw_bannercnt let line2= search('^\.\.\/\%(\s\|$\)','cnW') if line2 == 0 " call Decho("netrw is putting ./ and ../ into listing") sil! keepj put='../' sil! keepj put='./' endif exe "sil! keepj ".line1 sil! keepj norm! 0 " call Decho("line1=".line1." line2=".line2." line(.)=".line(".")) if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup " call Decho("M$ ftp cleanup") exe 'sil! keepj '.w:netrw_bannercnt.',$s/^\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(<DIR>\|\d\+\)\s\+//' keepj call histdel("/",-1) else " normal ftp cleanup " call Decho("normal ftp cleanup") exe 'sil! keepj '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e' exe "sil! keepj ".w:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#e' exe "sil! keepj ".w:netrw_bannercnt.',$g/ -> /s# -> .*$#/#e' keepj call histdel("/",-1) keepj call histdel("/",-1) keepj call histdel("/",-1) endif endif else " use ssh to get remote file listing {{{3 " call Decho("use ssh to get remote file listing: s:path<".s:path.">") let listcmd= s:MakeSshCmd(g:netrw_list_cmd) " call Decho("listcmd<".listcmd."> (using g:netrw_list_cmd)") if g:netrw_scp_cmd =~ '^pscp' " call Decho("1: exe sil r! ".shellescape(listcmd.s:path, 1)) exe "sil! keepj r! ".listcmd.shellescape(s:path, 1) " remove rubbish and adjust listing format of 'pscp' to 'ssh ls -FLa' like sil! keepj g/^Listing directory/keepj d sil! keepj g/^d[-rwx][-rwx][-rwx]/keepj s+$+/+e sil! keepj g/^l[-rwx][-rwx][-rwx]/keepj s+$+@+e keepj call histdel("/",-1) keepj call histdel("/",-1) keepj call histdel("/",-1) if g:netrw_liststyle != s:LONGLIST sil! keepj g/^[dlsp-][-rwx][-rwx][-rwx]/keepj s/^.*\s\(\S\+\)$/\1/e keepj call histdel("/",-1) endif else if s:path == "" " call Decho("2: exe sil r! ".listcmd) exe "sil! keepj keepalt r! ".listcmd else " call Decho("3: exe sil r! ".listcmd.' '.shellescape(fnameescape(s:path),1)) exe "sil! keepj keepalt r! ".listcmd.' '.shellescape(fnameescape(s:path),1) " call Decho("listcmd<".listcmd."> path<".s:path.">") endif endif " cleanup if g:netrw_ftp_browse_reject != "" " call Decho("(cleanup) exe sil! g/".g:netrw_ssh_browse_reject."/keepjumps d") exe "sil! g/".g:netrw_ssh_browse_reject."/keepj d" keepj call histdel("/",-1) endif endif if w:netrw_liststyle == s:LONGLIST " do a long listing; these substitutions need to be done prior to sorting {{{3 " call Decho("fix long listing:") if s:method == "ftp" " cleanup exe "sil! keepj ".w:netrw_bannercnt while getline('.') =~ g:netrw_ftp_browse_reject sil! keepj d endwhile " if there's no ../ listed, then put ./ and ../ in let line1= line(".") sil! keepj 1 sil! keepj call search('^\.\.\/\%(\s\|$\)','W') let line2= line(".") if line2 == 0 exe 'sil! keepj '.w:netrw_bannercnt."put='./'" if b:netrw_curdir != '/' exe 'sil! keepj '.w:netrw_bannercnt."put='../'" endif endif exe "sil! keepj ".line1 sil! keepj norm! 0 endif if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup " call Decho("M$ ftp site listing cleanup") exe 'sil! keepj '.w:netrw_bannercnt.',$s/^\(\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(<DIR>\|\d\+\)\s\+\)\(\w.*\)$/\2\t\1/' elseif exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " call Decho("normal ftp site listing cleanup: bannercnt=".w:netrw_bannercnt." line($)=".line("$")) exe 'sil keepj '.w:netrw_bannercnt.',$s/ -> .*$//e' exe 'sil keepj '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2\t\1/e' exe 'sil keepj '.w:netrw_bannercnt keepj call histdel("/",-1) keepj call histdel("/",-1) keepj call histdel("/",-1) endif endif " if exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " Decho " exe "keepj ".w:netrw_bannercnt.',$g/^./call Decho("listing: ".getline("."))' " endif " Decho " call Dret("s:NetrwRemoteListing") endfun " --------------------------------------------------------------------- " s:NetrwRemoteRm: remove/delete a remote file or directory {{{2 fun! s:NetrwRemoteRm(usrhost,path) range " call Dfunc("s:NetrwRemoteRm(usrhost<".a:usrhost."> path<".a:path.">) virtcol=".virtcol(".")) " call Decho("firstline=".a:firstline." lastline=".a:lastline) let svpos= netrw#NetrwSavePosn() let all= 0 if exists("s:netrwmarkfilelist_{bufnr('%')}") " remove all marked files " call Decho("remove all marked files with bufnr#".bufnr("%")) for fname in s:netrwmarkfilelist_{bufnr("%")} let ok= s:NetrwRemoteRmFile(a:path,fname,all) if ok =~ 'q\%[uit]' break elseif ok =~ 'a\%[ll]' let all= 1 endif endfor call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) else " remove files specified by range " call Decho("remove files specified by range") " preparation for removing multiple files/directories let ctr= a:firstline " remove multiple files and directories while ctr <= a:lastline exe "keepj ".ctr let ok= s:NetrwRemoteRmFile(a:path,s:NetrwGetWord(),all) if ok =~ 'q\%[uit]' break elseif ok =~ 'a\%[ll]' let all= 1 endif let ctr= ctr + 1 endwhile endif " refresh the (remote) directory listing " call Decho("refresh remote directory listing") keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) keepj call netrw#NetrwRestorePosn(svpos) " call Dret("s:NetrwRemoteRm") endfun " --------------------------------------------------------------------- " s:NetrwRemoteRmFile: {{{2 fun! s:NetrwRemoteRmFile(path,rmfile,all) " call Dfunc("s:NetrwRemoteRmFile(path<".a:path."> rmfile<".a:rmfile.">) all=".a:all) let all= a:all let ok = "" if a:rmfile !~ '^"' && (a:rmfile =~ '@$' || a:rmfile !~ '[\/]$') " attempt to remove file " call Decho("attempt to remove file (all=".all.")") if !all echohl Statement " call Decho("case all=0:") call inputsave() let ok= input("Confirm deletion of file<".a:rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") call inputrestore() echohl NONE if ok == "" let ok="no" endif let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') if ok =~ 'a\%[ll]' let all= 1 endif endif if all || ok =~ 'y\%[es]' || ok == "" " call Decho("case all=".all." or ok<".ok.">".(exists("w:netrw_method")? ': netrw_method='.w:netrw_method : "")) if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) " call Decho("case ftp:") let path= a:path if path =~ '^\a\+://' let path= substitute(path,'^\a\+://[^/]\+/','','') endif sil! keepj .,$d call s:NetrwRemoteFtpCmd(path,"delete ".'"'.a:rmfile.'"') else " call Decho("case ssh: g:netrw_rm_cmd<".g:netrw_rm_cmd.">") let netrw_rm_cmd= s:MakeSshCmd(g:netrw_rm_cmd) " call Decho("netrw_rm_cmd<".netrw_rm_cmd.">") if !exists("b:netrw_curdir") keepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53) let ok="q" else let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','') " call Decho("netrw_rm_cmd<".netrw_rm_cmd.">") " call Decho("remotedir<".remotedir.">") " call Decho("rmfile<".a:rmfile.">") if remotedir != "" let netrw_rm_cmd= netrw_rm_cmd." ".shellescape(fnameescape(remotedir.a:rmfile)) else let netrw_rm_cmd= netrw_rm_cmd." ".shellescape(fnameescape(a:rmfile)) endif " call Decho("call system(".netrw_rm_cmd.")") let ret= system(netrw_rm_cmd) if ret != 0 keepj call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60) endif " call Decho("returned=".ret." errcode=".v:shell_error) endif endif elseif ok =~ 'q\%[uit]' " call Decho("ok==".ok) break endif else " attempt to remove directory " call Decho("attempt to remove directory") if !all call inputsave() let ok= input("Confirm deletion of directory<".a:rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") call inputrestore() if ok == "" let ok="no" endif let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') if ok =~ 'a\%[ll]' let all= 1 endif endif if all || ok =~ 'y\%[es]' || ok == "" if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) keepj call s:NetrwRemoteFtpCmd(a:path,"rmdir ".a:rmfile) else let rmfile = substitute(a:path.a:rmfile,'/$','','') let netrw_rmdir_cmd = s:MakeSshCmd(netrw#WinPath(g:netrw_rmdir_cmd)).' '.shellescape(netrw#WinPath(rmfile)) " call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")") let ret= system(netrw_rmdir_cmd) " call Decho("returned=".ret." errcode=".v:shell_error) if v:shell_error != 0 " call Decho("v:shell_error not 0") let netrw_rmf_cmd= s:MakeSshCmd(netrw#WinPath(g:netrw_rmf_cmd)).' '.shellescape(netrw#WinPath(substitute(rmfile,'[\/]$','','e'))) " call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")") let ret= system(netrw_rmf_cmd) " call Decho("returned=".ret." errcode=".v:shell_error) if v:shell_error != 0 && !exists("g:netrw_quiet") keepj call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",22) endif endif endif elseif ok =~ 'q\%[uit]' break endif endif " call Dret("s:NetrwRemoteRmFile ".ok) return ok endfun " --------------------------------------------------------------------- " s:NetrwRemoteFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2 " This function assumes that a long listing will be received. Size, time, " and reverse sorts will be requested of the server but not otherwise " enforced here. fun! s:NetrwRemoteFtpCmd(path,listcmd) " call Dfunc("NetrwRemoteFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) netrw_method=".w:netrw_method) " call Decho("line($)=".line("$")." bannercnt=".w:netrw_bannercnt) " because WinXX ftp uses unix style input let ffkeep= &ff setlocal ma ff=unix noro " call Decho("setlocal ma ff=unix noro") " clear off any older non-banner lines " note that w:netrw_bannercnt indexes the line after the banner " call Decho('exe sil! keepjumps '.w:netrw_bannercnt.",$d (clear off old non-banner lines)") exe "sil! keepjumps ".w:netrw_bannercnt.",$d" "......................................... if w:netrw_method == 2 || w:netrw_method == 5 " ftp + <.netrc>: Method #2 if a:path != "" keepj put ='cd \"'.a:path.'\"' endif if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('.')) endif keepj call setline(line("$")+1,a:listcmd) " exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' if exists("g:netrw_port") && g:netrw_port != "" " call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) exe s:netrw_silentxfer." keepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) else " call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) exe s:netrw_silentxfer." keepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) endif "......................................... elseif w:netrw_method == 3 " ftp + machine,id,passwd,filename: Method #3 setlocal ff=unix if exists("g:netrw_port") && g:netrw_port != "" keepj put ='open '.g:netrw_machine.' '.g:netrw_port else keepj put ='open '.g:netrw_machine endif " handle userid and password let host= substitute(g:netrw_machine,'\..*$','','') " call Decho("host<".host.">") if exists("s:netrw_hup") && exists("s:netrw_hup[host]") call NetUserPass("ftp:".host) endif if exists("g:netrw_uid") && g:netrw_uid != "" if exists("g:netrw_ftp") && g:netrw_ftp == 1 keepj put =g:netrw_uid if exists("s:netrw_passwd") && s:netrw_passwd != "" keepj put ='\"'.s:netrw_passwd.'\"' endif elseif exists("s:netrw_passwd") keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' endif endif if a:path != "" keepj put ='cd \"'.a:path.'\"' endif if exists("g:netrw_ftpextracmd") keepj put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('.')) endif keepj call setline(line("$")+1,a:listcmd) " perform ftp: " -i : turns off interactive prompting from ftp " -n unix : DON'T use <.netrc>, even though it exists " -n win32: quit being obnoxious about password " exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' " call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options) exe s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options "......................................... else keepj call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",23) endif " cleanup for Windows if has("win32") || has("win95") || has("win64") || has("win16") sil! keepj %s/\r$//e keepj call histdel("/",-1) endif if a:listcmd == "dir" " infer directory/link based on the file permission string sil! keepj g/d\%([-r][-w][-x]\)\{3}/keepj s@$@/@ sil! keepj g/l\%([-r][-w][-x]\)\{3}/keepj s/$/@/ keepj call histdel("/",-1) keepj call histdel("/",-1) if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST exe "sil! keepj ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e' keepj call histdel("/",-1) endif endif " ftp's listing doesn't seem to include ./ or ../ if !search('^\.\/$\|\s\.\/$','wn') exe 'keepj '.w:netrw_bannercnt keepj put ='./' endif if !search('^\.\.\/$\|\s\.\.\/$','wn') exe 'keepj '.w:netrw_bannercnt keepj put ='../' endif " restore settings let &ff= ffkeep " call Dret("NetrwRemoteFtpCmd") endfun " --------------------------------------------------------------------- " s:NetrwRemoteRename: rename a remote file or directory {{{2 fun! s:NetrwRemoteRename(usrhost,path) range " call Dfunc("NetrwRemoteRename(usrhost<".a:usrhost."> path<".a:path.">)") " preparation for removing multiple files/directories let svpos = netrw#NetrwSavePosn() let ctr = a:firstline let rename_cmd = s:MakeSshCmd(g:netrw_rename_cmd) " rename files given by the markfilelist if exists("s:netrwmarkfilelist_{bufnr('%')}") for oldname in s:netrwmarkfilelist_{bufnr("%")} " call Decho("oldname<".oldname.">") if exists("subfrom") let newname= substitute(oldname,subfrom,subto,'') " call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">") else call inputsave() let newname= input("Moving ".oldname." to : ",oldname) call inputrestore() if newname =~ '^s/' let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','') let subto = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','') let newname = substitute(oldname,subfrom,subto,'') " call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">") endif endif if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) keepj call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname) else let oldname= shellescape(a:path.oldname) let newname= shellescape(a:path.newname) " call Decho("system(netrw#WinPath(".rename_cmd.") ".oldname.' '.newname.")") let ret = system(netrw#WinPath(rename_cmd).' '.oldname.' '.newname) endif endfor call s:NetrwUnMarkFile(1) else " attempt to rename files/directories while ctr <= a:lastline exe "keepj ".ctr let oldname= s:NetrwGetWord() " call Decho("oldname<".oldname.">") call inputsave() let newname= input("Moving ".oldname." to : ",oldname) call inputrestore() if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname) else let oldname= shellescape(a:path.oldname) let newname= shellescape(a:path.newname) " call Decho("system(netrw#WinPath(".rename_cmd.") ".oldname.' '.newname.")") let ret = system(netrw#WinPath(rename_cmd).' '.oldname.' '.newname) endif let ctr= ctr + 1 endwhile endif " refresh the directory keepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./')) keepj call netrw#NetrwRestorePosn(svpos) " call Dret("NetrwRemoteRename") endfun " --------------------------------------------------------------------- " Local Directory Browsing Support: {{{1 " ========================================== " --------------------------------------------------------------------- " netrw#LocalBrowseCheck: {{{2 fun! netrw#LocalBrowseCheck(dirname) " unfortunate interaction -- split window debugging can't be " used here, must use D-echoRemOn or D-echoTabOn -- the BufEnter " event triggers another call to LocalBrowseCheck() when attempts " to write to the DBG buffer are made. " The &ft == "netrw" test was installed because the BufEnter event " would hit when re-entering netrw windows, creating unexpected " refreshes (and would do so in the middle of NetrwSaveOptions(), too) " call Decho("netrw#LocalBrowseCheck: isdir<".a:dirname.">=".isdirectory(a:dirname).((exists("s:treeforceredraw")? " treeforceredraw" : ""))) " call Dredir("LocalBrowseCheck","ls!")|redraw!|sleep 3 if isdirectory(a:dirname) " call Decho(" ft<".&ft."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$")) if &ft != "netrw" || (exists("b:netrw_curdir") && b:netrw_curdir != a:dirname) sil! keepj call s:NetrwBrowse(1,a:dirname) elseif &ft == "netrw" && line("$") == 1 sil! keepj call s:NetrwBrowse(1,a:dirname) elseif exists("s:treeforceredraw") unlet s:treeforceredraw sil! keepj call s:NetrwBrowse(1,a:dirname) endif endif " not a directory, ignore it endfun " --------------------------------------------------------------------- " s:LocalListing: does the job of "ls" for local directories {{{2 fun! s:LocalListing() " call Dfunc("s:LocalListing()") " call Decho("(LocalListing) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Decho("(LocalListing) tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) " if exists("b:netrw_curdir") |call Decho('b:netrw_curdir<'.b:netrw_curdir.">") |else|call Decho("b:netrw_curdir doesn't exist") |endif " if exists("g:netrw_sort_by")|call Decho('g:netrw_sort_by<'.g:netrw_sort_by.">")|else|call Decho("g:netrw_sort_by doesn't exist")|endif " get the list of files contained in the current directory let dirname = b:netrw_curdir let dirnamelen = s:Strlen(b:netrw_curdir) let filelist = glob(s:ComposePath(fnameescape(dirname),"*")) " call Decho("(LocalListing) glob(dirname<".dirname."/*>)=".filelist) if filelist != "" let filelist= filelist."\n" endif let filelist= filelist.glob(s:ComposePath(fnameescape(dirname),".*")) " call Decho("(LocalListing) glob(dirname<".dirname."/.*>)=".filelist) " Coding choice: either elide ./ if present " or include ./ if not present if filelist =~ '[\\/]\.[\\/]\=\(\n\|$\)' " elide /path/. from glob() entries if present " call Decho("(LocalListing) elide /path/. from glob entries if present") let filelist = substitute(filelist,'\n','\t','g') let filelist = substitute(filelist,'^[^\t]\+[/\\]\.\t','','') let filelist = substitute(filelist,'[^\t]\+[/\\]\.$','','') let filelist = substitute(filelist,'\t\zs[^\t]\+[/\\]\.\t','','') let filelist = substitute(filelist,'\t','\n','g') endif " call Decho("(LocalListing) filelist<".filelist.">") if filelist !~ '[\\/]\.\.[\\/]\=\(\n\|$\)' " include ../ in the glob() entry if its missing " call Decho("(LocalListing) forcibly tacking on ..") let filelist= filelist."\n".s:ComposePath(b:netrw_curdir,"../") " call Decho("(LocalListing) filelist<".filelist.">") endif if b:netrw_curdir == '/' " remove .. from filelist when current directory is root directory " call Decho("(LocalListing) remove .. from filelist") let filelist= substitute(filelist,'/\.\.\n','','') endif " remove multiple contiguous newlines let filelist= substitute(filelist,'\n\{2,}','\n','ge') if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) " change all \s to /s " call Decho('(LocalListing) change all \s to /s') let filelist= substitute(filelist,'\','/','g') else " escape all \s to \\ " call Decho('(LocalListing) escape all \s to \\') let filelist= substitute(filelist,'\','\\','g') endif " call Decho("(LocalListing) (before while) dirname<".dirname.">") " call Decho("(LocalListing) (before while) dirnamelen<".dirnamelen.">") " call Decho("(LocalListing) (before while) filelist<".filelist.">") while filelist != "" if filelist =~ '\n' let filename = substitute(filelist,'\n.*$','','e') let filelist = substitute(filelist,'^.\{-}\n\(.*\)$','\1','e') else let filename = filelist let filelist = "" endif " call Decho(" ") " call Decho("(LocalListing) (while) filelist<".filelist.">") " call Decho("(LocalListing) (while) filename<".filename.">") if getftype(filename) == "link" " indicate a symbolic link " call Decho("(LocalListing) indicate <".filename."> is a symbolic link with trailing @") let pfile= filename."@" elseif getftype(filename) == "socket" " indicate a socket " call Decho("(LocalListing) indicate <".filename."> is a socket with trailing =") let pfile= filename."=" elseif getftype(filename) == "fifo" " indicate a fifo " call Decho("(LocalListing) indicate <".filename."> is a fifo with trailing |") let pfile= filename."|" elseif isdirectory(filename) " indicate a directory " call Decho("(LocalListing) indicate <".filename."> is a directory with trailing /") let pfile= filename."/" elseif exists("b:netrw_curdir") && b:netrw_curdir !~ '^.*://' && !isdirectory(filename) if (has("win32") || has("win95") || has("win64") || has("win16")) if filename =~ '\.[eE][xX][eE]$' || filename =~ '\.[cC][oO][mM]$' || filename =~ '\.[bB][aA][tT]$' " indicate an executable " call Decho("(LocalListing) indicate <".filename."> is executable with trailing *") let pfile= filename."*" else " normal file let pfile= filename endif elseif executable(filename) " indicate an executable " call Decho("(LocalListing) indicate <".filename."> is executable with trailing *") let pfile= filename."*" else " normal file let pfile= filename endif else " normal file let pfile= filename endif " call Decho("(LocalListing) pfile<".pfile."> (after *@/ appending)") if pfile =~ '//$' let pfile= substitute(pfile,'//$','/','e') " call Decho("(LocalListing) change // to /: pfile<".pfile.">") endif let pfile= strpart(pfile,dirnamelen) let pfile= substitute(pfile,'^[/\\]','','e') " call Decho("(LocalListing) filename<".filename.">") " call Decho("(LocalListing) pfile <".pfile.">") if w:netrw_liststyle == s:LONGLIST let sz = getfsize(filename) let fsz = strpart(" ",1,15-strlen(sz)).sz let pfile= pfile."\t".fsz." ".strftime(g:netrw_timefmt,getftime(filename)) " call Decho("(LocalListing) sz=".sz." fsz=".fsz) endif if g:netrw_sort_by =~ "^t" " sort by time (handles time up to 1 quintillion seconds, US) " call Decho("getftime(".filename.")=".getftime(filename)) let t = getftime(filename) let ft = strpart("000000000000000000",1,18-strlen(t)).t " call Decho("(LocalListing) exe keepjumps put ='".ft.'/'.filename."'") let ftpfile= ft.'/'.pfile sil! keepj put=ftpfile elseif g:netrw_sort_by =~ "^s" " sort by size (handles file sizes up to 1 quintillion bytes, US) " call Decho("(LocalListing) getfsize(".filename.")=".getfsize(filename)) let sz = getfsize(filename) let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz " call Decho("(LocalListing) exe keepj put ='".fsz.'/'.filename."'") let fszpfile= fsz.'/'.pfile sil! keepj put =fszpfile else " sort by name " call Decho("(LocalListing) exe keepjumps put ='".pfile."'") sil! keepj put=pfile endif endwhile " cleanup any windows mess at end-of-line sil! keepj g/^$/d sil! keepj %s/\r$//e call histdel("/",-1) exe "setl ts=".g:netrw_maxfilenamelen " call Decho("(LocalListing) setl ts=".g:netrw_maxfilenamelen) " call Dret("s:LocalListing") endfun " --------------------------------------------------------------------- " s:LocalBrowseShellCmdRefresh: this function is called after a user has {{{2 " performed any shell command. The idea is to cause all local-browsing " buffers to be refreshed after a user has executed some shell command, " on the chance that s/he removed/created a file/directory with it. fun! s:LocalBrowseShellCmdRefresh() " call Dfunc("LocalBrowseShellCmdRefresh() browselist=".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "empty")." ".tabpagenr("$")." tabs") " determine which buffers currently reside in a tab if !exists("s:netrw_browselist") " call Dret("LocalBrowseShellCmdRefresh : browselist is empty") return endif if !exists("w:netrw_bannercnt") " call Dret("LocalBrowseShellCmdRefresh : don't refresh when focus not on netrw window") return endif if exists("s:locbrowseshellcmd") if s:locbrowseshellcmd let s:locbrowseshellcmd= 0 " call Dret("LocalBrowseShellCmdRefresh : NetrwBrowse itself caused the refresh") return endif let s:locbrowseshellcmd= 0 endif let itab = 1 let buftablist = [] while itab <= tabpagenr("$") let buftablist = buftablist + tabpagebuflist() let itab = itab + 1 tabn endwhile " call Decho("buftablist".string(buftablist)) " call Decho("s:netrw_browselist<".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "").">") " GO through all buffers on netrw_browselist (ie. just local-netrw buffers): " | refresh any netrw window " | wipe out any non-displaying netrw buffer let curwin = winnr() let ibl = 0 for ibuf in s:netrw_browselist " call Decho("bufwinnr(".ibuf.") index(buftablist,".ibuf.")=".index(buftablist,ibuf)) if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 " wipe out any non-displaying netrw buffer " call Decho("wiping buf#".ibuf,"<".bufname(ibuf).">") exe "sil! bd ".fnameescape(ibuf) call remove(s:netrw_browselist,ibl) " call Decho("browselist=".string(s:netrw_browselist)) continue elseif index(tabpagebuflist(),ibuf) != -1 " refresh any netrw buffer " call Decho("refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf)) exe bufwinnr(ibuf)."wincmd w" keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) endif let ibl= ibl + 1 endfor exe curwin."wincmd w" " call Dret("LocalBrowseShellCmdRefresh") endfun " --------------------------------------------------------------------- " s:NetrwLocalRm: {{{2 fun! s:NetrwLocalRm(path) range " call Dfunc("s:NetrwLocalRm(path<".a:path.">)") " call Decho("firstline=".a:firstline." lastline=".a:lastline) " preparation for removing multiple files/directories let ret = 0 let all = 0 let svpos = netrw#NetrwSavePosn() if exists("s:netrwmarkfilelist_{bufnr('%')}") " remove all marked files " call Decho("remove all marked files") for fname in s:netrwmarkfilelist_{bufnr("%")} let ok= s:NetrwLocalRmFile(a:path,fname,all) if ok =~ 'q\%[uit]' || ok == "no" break elseif ok =~ 'a\%[ll]' let all= 1 endif endfor call s:NetrwUnMarkFile(1) else " remove (multiple) files and directories " call Decho("remove files in range [".a:firstline.",".a:lastline."]") let ctr = a:firstline while ctr <= a:lastline exe "keepj ".ctr " sanity checks if line(".") < w:netrw_bannercnt let ctr= ctr + 1 continue endif let curword= s:NetrwGetWord() if curword == "./" || curword == "../" let ctr= ctr + 1 continue endif let ok= s:NetrwLocalRmFile(a:path,curword,all) if ok =~ 'q\%[uit]' || ok == "no" break elseif ok =~ 'a\%[ll]' let all= 1 endif let ctr= ctr + 1 endwhile endif " refresh the directory " call Decho("bufname<".bufname("%").">") if bufname("%") != "NetrwMessage" keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) keepj call netrw#NetrwRestorePosn(svpos) endif " call Dret("s:NetrwLocalRm") endfun " --------------------------------------------------------------------- " s:NetrwLocalRmFile: remove file fname given the path {{{2 " Give confirmation prompt unless all==1 fun! s:NetrwLocalRmFile(path,fname,all) " call Dfunc("s:NetrwLocalRmFile(path<".a:path."> fname<".a:fname."> all=".a:all) let all= a:all let ok = "" keepj norm! 0 let rmfile= s:ComposePath(a:path,a:fname) " call Decho("rmfile<".rmfile.">") if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$') " attempt to remove file " call Decho("attempt to remove file<".rmfile.">") if !all echohl Statement call inputsave() let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") call inputrestore() echohl NONE if ok == "" let ok="no" endif " call Decho("response: ok<".ok.">") let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') " call Decho("response: ok<".ok."> (after sub)") if ok =~ 'a\%[ll]' let all= 1 endif endif if all || ok =~ 'y\%[es]' || ok == "" let ret= s:NetrwDelete(rmfile) " call Decho("errcode=".v:shell_error." ret=".ret) endif else " attempt to remove directory if !all echohl Statement call inputsave() let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") call inputrestore() let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') if ok == "" let ok="no" endif if ok =~ 'a\%[ll]' let all= 1 endif endif let rmfile= substitute(rmfile,'[\/]$','','e') if all || ok =~ 'y\%[es]' || ok == "" " call Decho("1st attempt: system(netrw#WinPath(".g:netrw_localrmdir.') '.shellescape(rmfile).')') call system(netrw#WinPath(g:netrw_localrmdir).' '.shellescape(rmfile)) " call Decho("v:shell_error=".v:shell_error) if v:shell_error != 0 " call Decho("2nd attempt to remove directory<".rmfile.">") let errcode= s:NetrwDelete(rmfile) " call Decho("errcode=".errcode) if errcode != 0 if has("unix") " call Decho("3rd attempt to remove directory<".rmfile.">") call system("rm ".shellescape(rmfile)) if v:shell_error != 0 && !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",34) let ok="no" endif elseif !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",35) let ok="no" endif endif endif endif endif " call Dret("s:NetrwLocalRmFile ".ok) return ok endfun " --------------------------------------------------------------------- " s:NetrwLocalRename: rename a remote file or directory {{{2 fun! s:NetrwLocalRename(path) range " call Dfunc("NetrwLocalRename(path<".a:path.">)") " preparation for removing multiple files/directories let ctr = a:firstline let svpos= netrw#NetrwSavePosn() " rename files given by the markfilelist if exists("s:netrwmarkfilelist_{bufnr('%')}") for oldname in s:netrwmarkfilelist_{bufnr("%")} " call Decho("oldname<".oldname.">") if exists("subfrom") let newname= substitute(oldname,subfrom,subto,'') " call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">") else call inputsave() let newname= input("Moving ".oldname." to : ",oldname) call inputrestore() if newname =~ '^s/' let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','') let subto = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','') " call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">") let newname = substitute(oldname,subfrom,subto,'') endif endif call rename(oldname,newname) endfor call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir) else " attempt to rename files/directories while ctr <= a:lastline exe "keepj ".ctr " sanity checks if line(".") < w:netrw_bannercnt let ctr= ctr + 1 continue endif let curword= s:NetrwGetWord() if curword == "./" || curword == "../" let ctr= ctr + 1 continue endif keepj norm! 0 let oldname= s:ComposePath(a:path,curword) " call Decho("oldname<".oldname.">") call inputsave() let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e')) call inputrestore() call rename(oldname,newname) " call Decho("renaming <".oldname."> to <".newname.">") let ctr= ctr + 1 endwhile endif " refresh the directory " call Decho("refresh the directory listing") keepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) keepj call netrw#NetrwRestorePosn(svpos) " call Dret("NetrwLocalRename") endfun " --------------------------------------------------------------------- " s:LocalFastBrowser: handles setting up/taking down fast browsing for the local browser {{{2 " " g:netrw_ Directory Is " fastbrowse Local Remote " slow 0 D D D=Deleting a buffer implies it will not be re-used (slow) " med 1 D H H=Hiding a buffer implies it may be re-used (fast) " fast 2 H H " " Deleting a buffer means that it will be re-loaded when examined, hence "slow". " Hiding a buffer means that it will be re-used when examined, hence "fast". " (re-using a buffer may not be as accurate) fun! s:LocalFastBrowser() " call Dfunc("LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse) " initialize browselist, a list of buffer numbers that the local browser has used if !exists("s:netrw_browselist") " call Decho("initialize s:netrw_browselist") let s:netrw_browselist= [] endif " append current buffer to fastbrowse list if empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1] " call Decho("appendng current buffer to browselist") call add(s:netrw_browselist,bufnr("%")) " call Decho("browselist=".string(s:netrw_browselist)) endif " enable autocmd events to handle refreshing/removing local browser buffers " If local browse buffer is currently showing: refresh it " If local browse buffer is currently hidden : wipe it if !exists("s:netrw_browser_shellcmd") && g:netrw_fastbrowse <= 1 " call Decho("setting up local-browser shell command refresh") let s:netrw_browser_shellcmd= 1 augroup AuNetrwShellCmd au! if (has("win32") || has("win95") || has("win64") || has("win16")) " call Decho("autocmd: ShellCmdPost * call s:LocalBrowseShellCmdRefresh()") au ShellCmdPost * call s:LocalBrowseShellCmdRefresh() else au ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh() " call Decho("autocmd: ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh()") endif augroup END endif " user must have changed fastbrowse to its fast setting, so remove " the associated autocmd events if g:netrw_fastbrowse > 1 && exists("s:netrw_browser_shellcmd") " call Decho("remove AuNetrwShellCmd autcmd group") unlet s:netrw_browser_shellcmd augroup AuNetrwShellCmd au! augroup END augroup! AuNetrwShellCmd endif " call Dret("LocalFastBrowser : browselist<".string(s:netrw_browselist).">") endfun " --------------------------------------------------------------------- " netrw#FileUrlRead: handles reading file://* files {{{2 " Should accept: file://localhost/etc/fstab " file:///etc/fstab " file:///c:/WINDOWS/clock.avi " file:///c|/WINDOWS/clock.avi " file://localhost/c:/WINDOWS/clock.avi " file://localhost/c|/WINDOWS/clock.avi " file://c:/foo.txt " file:///c:/foo.txt " and %XX (where X is [0-9a-fA-F] is converted into a character with the given hexadecimal value fun! netrw#FileUrlRead(fname) " call Dfunc("netrw#FileUrlRead(fname<".a:fname.">)") let fname = a:fname if fname =~ '^file://localhost/' " call Decho('converting file://localhost/ -to- file:///') let fname= substitute(fname,'^file://localhost/','file:///','') " call Decho("fname<".fname.">") endif if (has("win32") || has("win95") || has("win64") || has("win16")) if fname =~ '^file:///\=\a[|:]/' " call Decho('converting file:///\a|/ -to- file://\a:/') let fname = substitute(fname,'^file:///\=\(\a\)[|:]/','file://\1:/','') " call Decho("fname<".fname.">") endif endif let fname2396 = netrw#RFC2396(fname) let fname2396e= fnameescape(fname2396) let plainfname= substitute(fname2396,'file://\(.*\)','\1',"") if (has("win32") || has("win95") || has("win64") || has("win16")) " call Decho("windows exception for plainfname") if plainfname =~ '^/\+\a:' " call Decho('removing leading "/"s') let plainfname= substitute(plainfname,'^/\+\(\a:\)','\1','') endif endif " call Decho("fname2396<".fname2396.">") " call Decho("plainfname<".plainfname.">") exe "sil doau BufReadPre ".fname2396e exe 'keepj r '.plainfname exe 'file! '.plainfname keepj 1d " call Decho("(FileUrlRead) setl nomod") setl nomod " call Decho("(FileUrlRead) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("netrw#FileUrlRead") exe "sil doau BufReadPost ".fname2396e endfun " --------------------------------------------------------------------- " Support Functions: {{{1 " --------------------------------------------------------------------- " netrw#NetrwRestorePosn: restores the cursor and file position as saved by NetrwSavePosn() {{{2 fun! netrw#NetrwRestorePosn(...) " call Dfunc("netrw#NetrwRestorePosn() a:0=".a:0." winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : -1)." line=".(exists("w:netrw_line")? w:netrw_line : -1)." col=".(exists("w:netrw_col")? w:netrw_col : -1)." hline=".(exists("w:netrw_hline")? w:netrw_hline : -1)) let eikeep= &ei set ei=all if expand("%") == "NetrwMessage" exe s:winBeforeErr."wincmd w" endif if a:0 > 0 exe "keepj ".a:1 endif " restore window if exists("w:netrw_winnr") " call Decho("restore window: exe sil! ".w:netrw_winnr."wincmd w") exe "sil! ".w:netrw_winnr."wincmd w" endif if v:shell_error == 0 " as suggested by Bram M: redraw on no error " allows protocol error messages to remain visible " redraw! endif " restore top-of-screen line if exists("w:netrw_hline") " call Decho("restore topofscreen: exe keepj norm! ".w:netrw_hline."G0z") exe "keepj norm! ".w:netrw_hline."G0z\<CR>" endif " restore position if exists("w:netrw_line") && exists("w:netrw_col") " call Decho("restore posn: exe keepj norm! ".w:netrw_line."G0".w:netrw_col."|") exe "keepj norm! ".w:netrw_line."G0".w:netrw_col."\<bar>" endif let &ei= eikeep " call Dret("netrw#NetrwRestorePosn") endfun " --------------------------------------------------------------------- " netrw#NetrwSavePosn: saves position of cursor on screen {{{2 fun! netrw#NetrwSavePosn() " call Dfunc("netrw#NetrwSavePosn()") " Save current line and column let w:netrw_winnr= winnr() let w:netrw_line = line(".") let w:netrw_col = virtcol(".") " call Decho("currently, win#".w:netrw_winnr." line#".w:netrw_line." col#".w:netrw_col) " Save top-of-screen line keepj norm! H0 let w:netrw_hline= line(".") " set up string holding position parameters let ret = "let w:netrw_winnr=".w:netrw_winnr."|let w:netrw_line=".w:netrw_line."|let w:netrw_col=".w:netrw_col."|let w:netrw_hline=".w:netrw_hline keepj call netrw#NetrwRestorePosn() " call Dret("netrw#NetrwSavePosn : winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline) return ret endfun " ------------------------------------------------------------------------ " netrw#RFC2396: converts %xx into characters {{{2 fun! netrw#RFC2396(fname) " call Dfunc("netrw#RFC2396(fname<".a:fname.">)") let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t") " call Dret("netrw#RFC2396 ".fname) return fname endfun " --------------------------------------------------------------------- " s:ComposePath: Appends a new part to a path taking different systems into consideration {{{2 fun! s:ComposePath(base,subdir) " call Dfunc("s:ComposePath(base<".a:base."> subdir<".a:subdir.">)") if has("amiga") " call Decho("amiga") let ec = a:base[s:Strlen(a:base)-1] if ec != '/' && ec != ':' let ret = a:base . "/" . a:subdir else let ret = a:base . a:subdir endif elseif a:subdir =~ '^\a:[/\\][^/\\]' && (has("win32") || has("win95") || has("win64") || has("win16")) " call Decho("windows") let ret= a:subdir elseif a:base =~ '^\a:[/\\][^/\\]' && (has("win32") || has("win95") || has("win64") || has("win16")) " call Decho("windows") if a:base =~ '[/\\]$' let ret= a:base.a:subdir else let ret= a:base."/".a:subdir endif elseif a:base =~ '^\a\+://' " call Decho("remote linux/macos") let urlbase = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\1','') let curpath = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\2','') if a:subdir == '../' if curpath =~ '[^/]/[^/]\+/$' let curpath= substitute(curpath,'[^/]\+/$','','') else let curpath="" endif let ret= urlbase.curpath else let ret= urlbase.curpath.a:subdir endif " call Decho("urlbase<".urlbase.">") " call Decho("curpath<".curpath.">") " call Decho("ret<".ret.">") else " call Decho("local linux/macos") let ret = substitute(a:base."/".a:subdir,"//","/","g") if a:base =~ '^//' " keeping initial '//' for the benefit of network share listing support let ret= '/'.ret endif let ret= simplify(ret) endif " call Dret("s:ComposePath ".ret) return ret endfun " --------------------------------------------------------------------- " s:FileReadable: o/s independent filereadable {{{2 fun! s:FileReadable(fname) " call Dfunc("s:FileReadable(fname<".a:fname.">)") if g:netrw_cygwin let ret= filereadable(substitute(a:fname,'/cygdrive/\(.\)','\1:/','')) else let ret= filereadable(a:fname) endif " call Dret("s:FileReadable ".ret) return ret endfun " --------------------------------------------------------------------- " s:GetTempfile: gets a tempname that'll work for various o/s's {{{2 " Places correct suffix on end of temporary filename, " using the suffix provided with fname fun! s:GetTempfile(fname) " call Dfunc("s:GetTempfile(fname<".a:fname.">)") if !exists("b:netrw_tmpfile") " get a brand new temporary filename let tmpfile= tempname() " call Decho("tmpfile<".tmpfile."> : from tempname()") let tmpfile= substitute(tmpfile,'\','/','ge') " call Decho("tmpfile<".tmpfile."> : chgd any \\ -> /") " sanity check -- does the temporary file's directory exist? if !isdirectory(substitute(tmpfile,'[^/]\+$','','e')) " call Decho("(GetTempfile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") keepj call netrw#ErrorMsg(s:ERROR,"your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!",2) " call Dret("s:GetTempfile getcwd<".getcwd().">") return "" endif " let netrw#NetSource() know about the tmpfile let s:netrw_tmpfile= tmpfile " used by netrw#NetSource() and netrw#NetrwBrowseX() " call Decho("tmpfile<".tmpfile."> s:netrw_tmpfile<".s:netrw_tmpfile.">") " o/s dependencies if g:netrw_cygwin != 0 let tmpfile = substitute(tmpfile,'^\(\a\):','/cygdrive/\1','e') elseif has("win32") || has("win95") || has("win64") || has("win16") if !exists("+shellslash") || !&ssl let tmpfile = substitute(tmpfile,'/','\','g') endif else let tmpfile = tmpfile endif let b:netrw_tmpfile= tmpfile " call Decho("o/s dependent fixed tempname<".tmpfile.">") else " re-use temporary filename let tmpfile= b:netrw_tmpfile " call Decho("tmpfile<".tmpfile."> re-using") endif " use fname's suffix for the temporary file if a:fname != "" if a:fname =~ '\.[^./]\+$' " call Decho("using fname<".a:fname.">'s suffix") if a:fname =~ '\.tar\.gz$' || a:fname =~ '\.tar\.bz2$' || a:fname =~ '\.tar\.xz$' let suffix = ".tar".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') elseif a:fname =~ '.txz$' let suffix = ".txz".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') else let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') endif " call Decho("suffix<".suffix.">") let tmpfile= substitute(tmpfile,'\.tmp$','','e') " call Decho("chgd tmpfile<".tmpfile."> (removed any .tmp suffix)") let tmpfile .= suffix " call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix) netrw_fname<".b:netrw_fname.">") let s:netrw_tmpfile= tmpfile " supports netrw#NetSource() endif endif " call Decho("(GetTempFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)") " call Dret("s:GetTempfile <".tmpfile.">") return tmpfile endfun " --------------------------------------------------------------------- " s:MakeSshCmd: transforms input command using USEPORT HOSTNAME into {{{2 " a correct command for use with a system() call fun! s:MakeSshCmd(sshcmd) " call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">) user<".s:user."> machine<".s:machine.">") let sshcmd = substitute(a:sshcmd,'\<HOSTNAME\>',s:user.s:machine,'') if exists("g:netrw_port") && g:netrw_port != "" let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.g:netrw_port,'') elseif exists("s:port") && s:port != "" let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.s:port,'') else let sshcmd= substitute(sshcmd,"USEPORT ",'','') endif " call Dret("s:MakeSshCmd <".sshcmd.">") return sshcmd endfun " --------------------------------------------------------------------- " s:NetrwBMShow: {{{2 fun! s:NetrwBMShow() " call Dfunc("s:NetrwBMShow()") redir => bmshowraw menu redir END let bmshowlist = split(bmshowraw,'\n') if bmshowlist != [] let bmshowfuncs= filter(bmshowlist,'v:val =~ "<SNR>\\d\\+_BMShow()"') if bmshowfuncs != [] let bmshowfunc = substitute(bmshowfuncs[0],'^.*:\(call.*BMShow()\).*$','\1','') if bmshowfunc =~ '^call.*BMShow()' exe "sil! keepj ".bmshowfunc endif endif endif " call Dret("s:NetrwBMShow : bmshowfunc<".(exists("bmshowfunc")? bmshowfunc : 'n/a').">") endfun " --------------------------------------------------------------------- " s:NetrwCursor: responsible for setting cursorline/cursorcolumn based upon g:netrw_cursor {{{2 fun! s:NetrwCursor() if !exists("w:netrw_liststyle") let w:netrw_liststyle= g:netrw_liststyle endif " call Dfunc("s:NetrwCursor() ft<".&ft."> liststyle=".w:netrw_liststyle." g:netrw_cursor=".g:netrw_cursor." s:netrw_usercuc=".s:netrw_usercuc." s:netrw_usercul=".s:netrw_usercul) if &ft != "netrw" " if the current window isn't a netrw directory listing window, then use user cursorline/column " settings. Affects when netrw is used to read/write a file using scp/ftp/etc. " call Decho("case ft!=netrw: use user cul,cuc") let &l:cursorline = s:netrw_usercul let &l:cursorcolumn = s:netrw_usercuc elseif g:netrw_cursor == 4 " all styles: cursorline, cursorcolumn " call Decho("case g:netrw_cursor==4: setl cul cuc") setl cursorline setl cursorcolumn elseif g:netrw_cursor == 3 " thin-long-tree: cursorline, user's cursorcolumn " wide : cursorline, cursorcolumn if w:netrw_liststyle == s:WIDELIST " call Decho("case g:netrw_cursor==3 and wide: setlocal cul cuc") setl cursorline setl cursorcolumn else " call Decho("case g:netrw_cursor==3 and not wide: setlocal cul (use user's cuc)") setl cursorline let &l:cursorcolumn = s:netrw_usercuc endif elseif g:netrw_cursor == 2 " thin-long-tree: cursorline, user's cursorcolumn " wide : cursorline, user's cursorcolumn " call Decho("case g:netrw_cursor==2: setlocal cuc (use user's cul)") let &l:cursorcolumn = s:netrw_usercuc setl cursorline elseif g:netrw_cursor == 1 " thin-long-tree: user's cursorline, user's cursorcolumn " wide : cursorline, user's cursorcolumn let &l:cursorcolumn = s:netrw_usercuc if w:netrw_liststyle == s:WIDELIST " call Decho("case g:netrw_cursor==2 and wide: setlocal cul (use user's cuc)") set cursorline else " call Decho("case g:netrw_cursor==2 and not wide: (use user's cul,cuc)") let &l:cursorline = s:netrw_usercul endif else " all styles: user's cursorline, user's cursorcolumn " call Decho("default: (use user's cul,cuc)") let &l:cursorline = s:netrw_usercul let &l:cursorcolumn = s:netrw_usercuc endif " call Dret("s:NetrwCursor : l:cursorline=".&l:cursorline." l:cursorcolumn=".&l:cursorcolumn) endfun " --------------------------------------------------------------------- " s:RestoreCursorline: restores cursorline/cursorcolumn to original user settings {{{2 fun! s:RestoreCursorline() " call Dfunc("s:RestoreCursorline() currently, cul=".&l:cursorline." cuc=".&l:cursorcolumn." win#".winnr()." buf#".bufnr("%")) if exists("s:netrw_usercul") let &l:cursorline = s:netrw_usercul endif if exists("s:netrw_usercuc") let &l:cursorcolumn = s:netrw_usercuc endif " call Dret("s:RestoreCursorline : restored cul=".&l:cursorline." cuc=".&l:cursorcolumn) endfun " --------------------------------------------------------------------- " s:NetrwDelete: Deletes a file. {{{2 " Uses Steve Hall's idea to insure that Windows paths stay " acceptable. No effect on Unix paths. " Examples of use: let result= s:NetrwDelete(path) fun! s:NetrwDelete(path) " call Dfunc("s:NetrwDelete(path<".a:path.">)") let path = netrw#WinPath(a:path) if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) if exists("+shellslash") let sskeep= &shellslash setlocal noshellslash let result = delete(path) let &shellslash = sskeep else " call Decho("exe let result= ".a:cmd."('".path."')") let result= delete(path) endif else " call Decho("let result= delete(".path.")") let result= delete(path) endif if result < 0 keepj call netrw#ErrorMsg(s:WARNING,"delete(".path.") failed!",71) endif " call Dret("s:NetrwDelete ".result) return result endfun " --------------------------------------------------------------------- " s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2 fun! s:NetrwEnew(...) " call Dfunc("s:NetrwEnew() a:0=".a:0." bufnr($)=".bufnr("$")) " call Decho("curdir<".((a:0>0)? a:1 : "")."> buf#".bufnr("%")."<".bufname("%").">") " grab a function-local-variable copy of buffer variables " call Decho("make function-local copy of netrw variables") if exists("b:netrw_bannercnt") |let netrw_bannercnt = b:netrw_bannercnt |endif if exists("b:netrw_browser_active") |let netrw_browser_active = b:netrw_browser_active |endif if exists("b:netrw_cpf") |let netrw_cpf = b:netrw_cpf |endif if exists("b:netrw_curdir") |let netrw_curdir = b:netrw_curdir |endif if exists("b:netrw_explore_bufnr") |let netrw_explore_bufnr = b:netrw_explore_bufnr |endif if exists("b:netrw_explore_indx") |let netrw_explore_indx = b:netrw_explore_indx |endif if exists("b:netrw_explore_line") |let netrw_explore_line = b:netrw_explore_line |endif if exists("b:netrw_explore_list") |let netrw_explore_list = b:netrw_explore_list |endif if exists("b:netrw_explore_listlen")|let netrw_explore_listlen = b:netrw_explore_listlen|endif if exists("b:netrw_explore_mtchcnt")|let netrw_explore_mtchcnt = b:netrw_explore_mtchcnt|endif if exists("b:netrw_fname") |let netrw_fname = b:netrw_fname |endif if exists("b:netrw_lastfile") |let netrw_lastfile = b:netrw_lastfile |endif if exists("b:netrw_liststyle") |let netrw_liststyle = b:netrw_liststyle |endif if exists("b:netrw_method") |let netrw_method = b:netrw_method |endif if exists("b:netrw_option") |let netrw_option = b:netrw_option |endif if exists("b:netrw_prvdir") |let netrw_prvdir = b:netrw_prvdir |endif keepj call s:NetrwOptionRestore("w:") " call Decho("generate a buffer with keepjumps keepalt enew!") let netrw_keepdiff= &l:diff " COMBAK: Benzinger: using tree mode, vim -o Foo/ file shows Foo/ Foo/ instead. Place return here, problem goes away (beeps result, but who knows) " call Dredir("Benzinger 1:","ls!") keepj keepalt enew! " call Dredir("Benzinger 2:","ls!") " COMBAK: Benzinger: using tree mode, vim -o Foo/ file shows Foo/ Foo/ instead. Place return here, problem remains. let &l:diff= netrw_keepdiff " call Decho("bufnr($)=".bufnr("$")) keepj call s:NetrwOptionSave("w:") " copy function-local-variables to buffer variable equivalents " call Decho("copy function-local variables back to buffer netrw variables") if exists("netrw_bannercnt") |let b:netrw_bannercnt = netrw_bannercnt |endif if exists("netrw_browser_active") |let b:netrw_browser_active = netrw_browser_active |endif if exists("netrw_cpf") |let b:netrw_cpf = netrw_cpf |endif if exists("netrw_curdir") |let b:netrw_curdir = netrw_curdir |endif if exists("netrw_explore_bufnr") |let b:netrw_explore_bufnr = netrw_explore_bufnr |endif if exists("netrw_explore_indx") |let b:netrw_explore_indx = netrw_explore_indx |endif if exists("netrw_explore_line") |let b:netrw_explore_line = netrw_explore_line |endif if exists("netrw_explore_list") |let b:netrw_explore_list = netrw_explore_list |endif if exists("netrw_explore_listlen")|let b:netrw_explore_listlen = netrw_explore_listlen|endif if exists("netrw_explore_mtchcnt")|let b:netrw_explore_mtchcnt = netrw_explore_mtchcnt|endif if exists("netrw_fname") |let b:netrw_fname = netrw_fname |endif if exists("netrw_lastfile") |let b:netrw_lastfile = netrw_lastfile |endif if exists("netrw_liststyle") |let b:netrw_liststyle = netrw_liststyle |endif if exists("netrw_method") |let b:netrw_method = netrw_method |endif if exists("netrw_option") |let b:netrw_option = netrw_option |endif if exists("netrw_prvdir") |let b:netrw_prvdir = netrw_prvdir |endif if a:0 > 0 let b:netrw_curdir= a:1 if b:netrw_curdir =~ '/$' if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST file NetrwTreeListing set bt=nowrite noswf nno <silent> <buffer> [ :sil call <SID>TreeListMove('[')<cr> nno <silent> <buffer> ] :sil call <SID>TreeListMove(']')<cr> else exe "sil! keepalt file ".fnameescape(b:netrw_curdir) endif endif endif " call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#").">") endfun " --------------------------------------------------------------------- " s:NetrwInsureWinVars: insure that a netrw buffer has its w: variables in spite of a wincmd v or s {{{2 fun! s:NetrwInsureWinVars() " call Dfunc("s:NetrwInsureWinVars()") if !exists("w:netrw_liststyle") let curbuf = bufnr("%") let curwin = winnr() let iwin = 1 while iwin <= winnr("$") exe iwin."wincmd w" if winnr() != curwin && bufnr("%") == curbuf && exists("w:netrw_liststyle") " looks like ctrl-w_s or ctrl-w_v was used to split a netrw buffer let winvars= w: break endif let iwin= iwin + 1 endwhile exe curbuf."wincmd w" if exists("winvars") " call Decho("copying w#".iwin." window variables to w#".curwin) for k in keys(winvars) let w:{k}= winvars[k] endfor endif endif " call Dret("s:NetrwInsureWinVars") endfun " ------------------------------------------------------------------------ " s:NetrwSaveWordPosn: used to keep cursor on same word after refresh, {{{2 " changed sorting, etc. Also see s:NetrwRestoreWordPosn(). fun! s:NetrwSaveWordPosn() " call Dfunc("NetrwSaveWordPosn()") let s:netrw_saveword= '^'.fnameescape(getline('.')).'$' " call Dret("NetrwSaveWordPosn : saveword<".s:netrw_saveword.">") endfun " --------------------------------------------------------------------- " s:NetrwRestoreWordPosn: used to keep cursor on same word after refresh, {{{2 " changed sorting, etc. Also see s:NetrwSaveWordPosn(). fun! s:NetrwRestoreWordPosn() " call Dfunc("NetrwRestoreWordPosn()") sil! call search(s:netrw_saveword,'w') " call Dret("NetrwRestoreWordPosn") endfun " --------------------------------------------------------------------- " s:RestoreBufVars: {{{2 fun! s:RestoreBufVars() " call Dfunc("s:RestoreBufVars()") if exists("s:netrw_curdir") |let b:netrw_curdir = s:netrw_curdir |endif if exists("s:netrw_lastfile") |let b:netrw_lastfile = s:netrw_lastfile |endif if exists("s:netrw_method") |let b:netrw_method = s:netrw_method |endif if exists("s:netrw_fname") |let b:netrw_fname = s:netrw_fname |endif if exists("s:netrw_machine") |let b:netrw_machine = s:netrw_machine |endif if exists("s:netrw_browser_active")|let b:netrw_browser_active = s:netrw_browser_active|endif " call Dret("s:RestoreBufVars") endfun " --------------------------------------------------------------------- " s:RemotePathAnalysis: {{{2 fun! s:RemotePathAnalysis(dirname) " call Dfunc("s:RemotePathAnalysis(a:dirname<".a:dirname.">)") let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/:#]\+\)\%([:#]\(\d\+\)\)\=/\(.*\)$' let s:method = substitute(a:dirname,dirpat,'\1','') let s:user = substitute(a:dirname,dirpat,'\2','') let s:machine = substitute(a:dirname,dirpat,'\3','') let s:port = substitute(a:dirname,dirpat,'\4','') let s:path = substitute(a:dirname,dirpat,'\5','') let s:fname = substitute(a:dirname,'^.*/\ze.','','') " call Decho("set up s:method <".s:method .">") " call Decho("set up s:user <".s:user .">") " call Decho("set up s:machine<".s:machine.">") " call Decho("set up s:port <".s:port.">") " call Decho("set up s:path <".s:path .">") " call Decho("set up s:fname <".s:fname .">") " call Dret("s:RemotePathAnalysis") endfun " --------------------------------------------------------------------- " s:RemoteSystem: runs a command on a remote host using ssh {{{2 " Returns status " Runs system() on " [cd REMOTEDIRPATH;] a:cmd " Note that it doesn't do shellescape(a:cmd)! fun! s:RemoteSystem(cmd) " call Dfunc("s:RemoteSystem(cmd<".a:cmd.">)") if !executable(g:netrw_ssh_cmd) keepj call netrw#ErrorMsg(s:ERROR,"g:netrw_ssh_cmd<".g:netrw_ssh_cmd."> is not executable!",52) elseif !exists("b:netrw_curdir") keepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53) else let cmd = s:MakeSshCmd(g:netrw_ssh_cmd." USEPORT HOSTNAME") let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','') if remotedir != "" let cmd= cmd.' cd '.shellescape(remotedir).";" else let cmd= cmd.' ' endif let cmd= cmd.a:cmd " call Decho("call system(".cmd.")") let ret= system(cmd) endif " call Dret("s:RemoteSystem ".ret) return ret endfun " --------------------------------------------------------------------- " s:RestoreWinVars: (used by Explore() and NetrwSplit()) {{{2 fun! s:RestoreWinVars() " call Dfunc("s:RestoreWinVars()") if exists("s:bannercnt") |let w:netrw_bannercnt = s:bannercnt |unlet s:bannercnt |endif if exists("s:col") |let w:netrw_col = s:col |unlet s:col |endif if exists("s:curdir") |let w:netrw_curdir = s:curdir |unlet s:curdir |endif if exists("s:explore_bufnr") |let w:netrw_explore_bufnr = s:explore_bufnr |unlet s:explore_bufnr |endif if exists("s:explore_indx") |let w:netrw_explore_indx = s:explore_indx |unlet s:explore_indx |endif if exists("s:explore_line") |let w:netrw_explore_line = s:explore_line |unlet s:explore_line |endif if exists("s:explore_listlen")|let w:netrw_explore_listlen = s:explore_listlen|unlet s:explore_listlen|endif if exists("s:explore_list") |let w:netrw_explore_list = s:explore_list |unlet s:explore_list |endif if exists("s:explore_mtchcnt")|let w:netrw_explore_mtchcnt = s:explore_mtchcnt|unlet s:explore_mtchcnt|endif if exists("s:fpl") |let w:netrw_fpl = s:fpl |unlet s:fpl |endif if exists("s:hline") |let w:netrw_hline = s:hline |unlet s:hline |endif if exists("s:line") |let w:netrw_line = s:line |unlet s:line |endif if exists("s:liststyle") |let w:netrw_liststyle = s:liststyle |unlet s:liststyle |endif if exists("s:method") |let w:netrw_method = s:method |unlet s:method |endif if exists("s:prvdir") |let w:netrw_prvdir = s:prvdir |unlet s:prvdir |endif if exists("s:treedict") |let w:netrw_treedict = s:treedict |unlet s:treedict |endif if exists("s:treetop") |let w:netrw_treetop = s:treetop |unlet s:treetop |endif if exists("s:winnr") |let w:netrw_winnr = s:winnr |unlet s:winnr |endif " call Dret("s:RestoreWinVars") endfun " --------------------------------------------------------------------- " s:Rexplore: implements returning from a buffer to a netrw directory {{{2 " " s:SetRexDir() sets up <2-leftmouse> maps (if g:netrw_retmap " is true) and a command, :Rexplore, which call this function. " " s:nbcd_curpos_{bufnr('%')} is set up by s:NetrwBrowseChgDir() fun! s:NetrwRexplore(islocal,dirname) " call Dfunc("s:NetrwRexplore() w:netrw_rexlocal=".w:netrw_rexlocal." w:netrw_rexdir<".w:netrw_rexdir.">") if !exists("w:netrw_rexlocal") " " call Dret("s:NetrwRexplore() w:netrw_rexlocal doesn't exist") return endif if w:netrw_rexlocal keepj call netrw#LocalBrowseCheck(w:netrw_rexdir) else keepj call s:NetrwBrowse(0,w:netrw_rexdir) endif if exists("s:initbeval") set beval endif if exists("s:rexposn_".bufnr("%")) " call Decho("(NetrwRexplore) restore posn, then unlet s:rexposn_".bufnr('%')) keepj call netrw#NetrwRestorePosn(s:rexposn_{bufnr('%')}) unlet s:rexposn_{bufnr('%')} else " call Decho("(NetrwRexplore) s:rexposn_".bufnr('%')." doesn't exist") endif if exists("s:explore_match") exe "2match netrwMarkFile /".s:explore_match."/" endif " call Dret("s:NetrwRexplore") endfun " --------------------------------------------------------------------- " s:SaveBufVars: {{{2 fun! s:SaveBufVars() " call Dfunc("s:SaveBufVars() buf#".bufnr("%")) if exists("b:netrw_curdir") |let s:netrw_curdir = b:netrw_curdir |endif if exists("b:netrw_lastfile") |let s:netrw_lastfile = b:netrw_lastfile |endif if exists("b:netrw_method") |let s:netrw_method = b:netrw_method |endif if exists("b:netrw_fname") |let s:netrw_fname = b:netrw_fname |endif if exists("b:netrw_machine") |let s:netrw_machine = b:netrw_machine |endif if exists("b:netrw_browser_active")|let s:netrw_browser_active = b:netrw_browser_active|endif " call Dret("s:SaveBufVars") endfun " --------------------------------------------------------------------- " s:SaveWinVars: (used by Explore() and NetrwSplit()) {{{2 fun! s:SaveWinVars() " call Dfunc("s:SaveWinVars() win#".winnr()) if exists("w:netrw_bannercnt") |let s:bannercnt = w:netrw_bannercnt |endif if exists("w:netrw_col") |let s:col = w:netrw_col |endif if exists("w:netrw_curdir") |let s:curdir = w:netrw_curdir |endif if exists("w:netrw_explore_bufnr") |let s:explore_bufnr = w:netrw_explore_bufnr |endif if exists("w:netrw_explore_indx") |let s:explore_indx = w:netrw_explore_indx |endif if exists("w:netrw_explore_line") |let s:explore_line = w:netrw_explore_line |endif if exists("w:netrw_explore_listlen")|let s:explore_listlen = w:netrw_explore_listlen|endif if exists("w:netrw_explore_list") |let s:explore_list = w:netrw_explore_list |endif if exists("w:netrw_explore_mtchcnt")|let s:explore_mtchcnt = w:netrw_explore_mtchcnt|endif if exists("w:netrw_fpl") |let s:fpl = w:netrw_fpl |endif if exists("w:netrw_hline") |let s:hline = w:netrw_hline |endif if exists("w:netrw_line") |let s:line = w:netrw_line |endif if exists("w:netrw_liststyle") |let s:liststyle = w:netrw_liststyle |endif if exists("w:netrw_method") |let s:method = w:netrw_method |endif if exists("w:netrw_prvdir") |let s:prvdir = w:netrw_prvdir |endif if exists("w:netrw_treedict") |let s:treedict = w:netrw_treedict |endif if exists("w:netrw_treetop") |let s:treetop = w:netrw_treetop |endif if exists("w:netrw_winnr") |let s:winnr = w:netrw_winnr |endif " call Dret("s:SaveWinVars") endfun " --------------------------------------------------------------------- " s:SetBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck()) {{{2 " To allow separate windows to have their own activities, such as " Explore **/pattern, several variables have been made window-oriented. " However, when the user splits a browser window (ex: ctrl-w s), these " variables are not inherited by the new window. SetBufWinVars() and " UseBufWinVars() get around that. fun! s:SetBufWinVars() " call Dfunc("s:SetBufWinVars() win#".winnr()) if exists("w:netrw_liststyle") |let b:netrw_liststyle = w:netrw_liststyle |endif if exists("w:netrw_bannercnt") |let b:netrw_bannercnt = w:netrw_bannercnt |endif if exists("w:netrw_method") |let b:netrw_method = w:netrw_method |endif if exists("w:netrw_prvdir") |let b:netrw_prvdir = w:netrw_prvdir |endif if exists("w:netrw_explore_indx") |let b:netrw_explore_indx = w:netrw_explore_indx |endif if exists("w:netrw_explore_listlen")|let b:netrw_explore_listlen= w:netrw_explore_listlen|endif if exists("w:netrw_explore_mtchcnt")|let b:netrw_explore_mtchcnt= w:netrw_explore_mtchcnt|endif if exists("w:netrw_explore_bufnr") |let b:netrw_explore_bufnr = w:netrw_explore_bufnr |endif if exists("w:netrw_explore_line") |let b:netrw_explore_line = w:netrw_explore_line |endif if exists("w:netrw_explore_list") |let b:netrw_explore_list = w:netrw_explore_list |endif " call Dret("s:SetBufWinVars") endfun " --------------------------------------------------------------------- " s:SetRexDir: set directory for :Rexplore {{{2 fun! s:SetRexDir(islocal,dirname) " call Dfunc("s:SetRexDir(islocal=".a:islocal." dirname<".a:dirname.">)") let w:netrw_rexdir = a:dirname let w:netrw_rexlocal = a:islocal " call Dret("s:SetRexDir") endfun " --------------------------------------------------------------------- " s:Strlen: this function returns the length of a string, even if its {{{2 " using two-byte etc characters. " Solution from Nicolai Weibull, vim docs (:help strlen()), Tony Mechelynck, " and a bit from me. " if g:netrw_xstrlen is zero (default), then the builtin strlen() function is used. fun! s:Strlen(x) " call Dfunc("s:Strlen(x<".a:x.">") if g:netrw_xstrlen == 1 " number of codepoints (Latin a + combining circumflex is two codepoints) " (comment from TM, solution from NW) let ret= strlen(substitute(a:x,'.','c','g')) elseif g:netrw_xstrlen == 2 " number of spacing codepoints (Latin a + combining circumflex is one spacing " codepoint; a hard tab is one; wide and narrow CJK are one each; etc.) " (comment from TM, solution from TM) let ret=strlen(substitute(a:x, '.\Z', 'x', 'g')) elseif g:netrw_xstrlen == 3 " virtual length (counting, for instance, tabs as anything between 1 and " 'tabstop', wide CJK as 2 rather than 1, Arabic alif as zero when immediately " preceded by lam, one otherwise, etc.) " (comment from TM, solution from me) let modkeep= &mod exe "keepj norm! o\<esc>" call setline(line("."),a:x) let ret= virtcol("$") - 1 keepj d let &mod= modkeep else " at least give a decent default let ret= strlen(a:x) endif " call Dret("s:Strlen ".ret) return ret endfun " --------------------------------------------------------------------- " s:TreeListMove: {{{2 fun! s:TreeListMove(dir) " call Dfunc("s:TreeListMove(dir<".a:dir.">)") let curline = getline('.') let prvline = (line(".") > 1)? getline(line(".")-1) : '' let nxtline = (line(".") < line("$"))? getline(line(".")+1) : '' let curindent= substitute(curline,'^\([| ]*\).\{-}$','\1','') let indentm1 = substitute(curindent,'^| ','','') " call Decho("prvline <".prvline."> #".line(".")-1) " call Decho("curline <".curline."> #".line(".")) " call Decho("nxtline <".nxtline."> #".line(".")+1) " call Decho("curindent<".curindent.">") " call Decho("indentm1 <".indentm1.">") if curline !~ '/$' " call Decho('regfile') if a:dir == '[' && prvline != '' keepj norm! 0 let nl = search('^'.indentm1.'[^|]','bWe') " search backwards from regular file " call Decho("regfile srch back: ".nl) elseif a:dir == ']' && nxtline != '' keepj norm! $ let nl = search('^'.indentm1.'[^|]','We') " search forwards from regular file " call Decho("regfile srch fwd: ".nl) endif elseif a:dir == '[' && prvline != '' keepj norm! 0 let curline= line(".") let nl = search('^'.curindent.'[^|]','bWe') " search backwards From directory, same indentation " call Decho("dir srch back ind: ".nl) if nl != 0 if line(".") == curline-1 let nl= search('^'.indentm1.'[^|]','bWe') " search backwards from directory, indentation - 1 " call Decho("dir srch back ind-1: ".nl) endif endif elseif a:dir == ']' && nxtline != '' keepj norm! $ let curline = line(".") let nl = search('^'.curindent.'[^|]','We') " search forwards from directory, same indentation " call Decho("dir srch fwd ind: ".nl) if nl != 0 if line(".") == curline+1 let nl= search('^'.indentm1.'[^|]','We') " search forwards from directory, indentation - 1 " call Decho("dir srch fwd ind-1: ".nl) endif endif endif " call Dret("s:TreeListMove") endfun " --------------------------------------------------------------------- " s:UpdateBuffersMenu: does emenu Buffers.Refresh (but due to locale, the menu item may not be called that) {{{2 " The Buffers.Refresh menu calls s:BMShow(); unfortunately, that means that that function " can't be called except via emenu. But due to locale, that menu line may not be called " Buffers.Refresh; hence, s:NetrwBMShow() utilizes a "cheat" to call that function anyway. fun! s:UpdateBuffersMenu() " call Dfunc("s:UpdateBuffersMenu()") if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu try sil emenu Buffers.Refresh\ menu catch /^Vim\%((\a\+)\)\=:E/ let v:errmsg= "" sil keepj call s:NetrwBMShow() endtry endif " call Dret("s:UpdateBuffersMenu") endfun " --------------------------------------------------------------------- " s:UseBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck() {{{2 " Matching function to s:SetBufWinVars() fun! s:UseBufWinVars() " call Dfunc("s:UseBufWinVars()") if exists("b:netrw_liststyle") && !exists("w:netrw_liststyle") |let w:netrw_liststyle = b:netrw_liststyle |endif if exists("b:netrw_bannercnt") && !exists("w:netrw_bannercnt") |let w:netrw_bannercnt = b:netrw_bannercnt |endif if exists("b:netrw_method") && !exists("w:netrw_method") |let w:netrw_method = b:netrw_method |endif if exists("b:netrw_prvdir") && !exists("w:netrw_prvdir") |let w:netrw_prvdir = b:netrw_prvdir |endif if exists("b:netrw_explore_indx") && !exists("w:netrw_explore_indx") |let w:netrw_explore_indx = b:netrw_explore_indx |endif if exists("b:netrw_explore_listlen") && !exists("w:netrw_explore_listlen")|let w:netrw_explore_listlen = b:netrw_explore_listlen|endif if exists("b:netrw_explore_mtchcnt") && !exists("w:netrw_explore_mtchcnt")|let w:netrw_explore_mtchcnt = b:netrw_explore_mtchcnt|endif if exists("b:netrw_explore_bufnr") && !exists("w:netrw_explore_bufnr") |let w:netrw_explore_bufnr = b:netrw_explore_bufnr |endif if exists("b:netrw_explore_line") && !exists("w:netrw_explore_line") |let w:netrw_explore_line = b:netrw_explore_line |endif if exists("b:netrw_explore_list") && !exists("w:netrw_explore_list") |let w:netrw_explore_list = b:netrw_explore_list |endif " call Dret("s:UseBufWinVars") endfun " --------------------------------------------------------------------- " netrw#WinPath: tries to insure that the path is windows-acceptable, whether cygwin is used or not {{{2 fun! netrw#WinPath(path) " call Dfunc("netrw#WinPath(path<".a:path.">)") if (!g:netrw_cygwin || &shell !~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$') && (has("win32") || has("win95") || has("win64") || has("win16")) " remove cygdrive prefix, if present let path = substitute(a:path,'/cygdrive/\(.\)','\1:','') " remove trailing slash (Win95) let path = substitute(path, '\(\\\|/\)$', '', 'g') " remove escaped spaces let path = substitute(path, '\ ', ' ', 'g') " convert slashes to backslashes let path = substitute(path, '/', '\', 'g') else let path= a:path endif " call Dret("netrw#WinPath <".path.">") return path endfun " --------------------------------------------------------------------- " Settings Restoration: {{{2 let &cpo= s:keepcpo unlet s:keepcpo " ------------------------------------------------------------------------ " Modelines: {{{1 " vim:ts=8 fdm=marker
zyz2011-vim
runtime/autoload/netrw.vim
Vim Script
gpl2
373,848
" Vim completion script " Language: Java Script " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) " Last Change: 2006 Apr 30 function! javascriptcomplete#CompleteJS(findstart, base) if a:findstart " locate the start of the word let line = getline('.') let start = col('.') - 1 let curline = line('.') let compl_begin = col('.') - 2 " Bit risky but JS is rather limited language and local chars shouldn't " fint way into names while start >= 0 && line[start - 1] =~ '\k' let start -= 1 endwhile let b:compl_context = getline('.')[0:compl_begin] return start else " Initialize base return lists let res = [] let res2 = [] " a:base is very short - we need context " Shortcontext is context without a:base, useful for checking if we are " looking for objects and for what objects we are looking for let context = b:compl_context let shortcontext = substitute(context, a:base.'$', '', '') unlet! b:compl_context if exists("b:jsrange") let file = getline(b:jsrange[0],b:jsrange[1]) unlet! b:jsrange if len(b:js_extfiles) > 0 let file = b:js_extfiles + file endif else let file = getline(1, '$') endif " Completion of properties, methods, etc. {{{ if shortcontext =~ '\.$' " Complete methods and properties for objects " DOM separate let doms = ['style.'] " Arrays let arrayprop = ['constructor', 'index', 'input', 'length', 'prototype'] let arraymeth = ['concat', 'join', 'pop', 'push', 'reverse', 'shift', \ 'splice', 'sort', 'toSource', 'toString', 'unshift', 'valueOf', \ 'watch', 'unwatch'] call map(arraymeth, 'v:val."("') let arrays = arrayprop + arraymeth " Boolean - complete subset of array values " properties - constructor, prototype " methods - toSource, toString, valueOf " Date " properties - constructor, prototype let datemeth = ['getDate', 'getDay', 'getFullYear', 'getHours', 'getMilliseconds', \ 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'getTimezoneOffset', \ 'getUTCDate', 'getUTCDay', 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds', \ 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds', \ 'getYear', 'parse', 'parse', \ 'setDate', 'setDay', 'setFullYear', 'setHours', 'setMilliseconds', \ 'setMinutes', 'setMonth', 'setSeconds', \ 'setUTCDate', 'setUTCDay', 'setUTCFullYear', 'setUTCHours', 'setUTCMilliseconds', \ 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setYear', 'setTime', \ 'toGMTString', 'toLocaleString', 'toLocaleDateString', 'toLocaleTimeString', \ 'toSource', 'toString', 'toUTCString', 'UTC', 'valueOf', 'watch', 'unwatch'] call map(datemeth, 'v:val."("') let dates = datemeth " Function let funcprop = ['arguments', 'arguments.callee', 'arguments.caller', 'arguments.length', \ 'arity', 'constructor', 'length', 'prototype'] let funcmeth = ['apply', 'call', 'toSource', 'toString', 'valueOf'] call map(funcmeth, 'v:val."("') let funcs = funcprop + funcmeth " Math let mathprop = ['E', 'LN2', 'LN10', 'LOG2E', 'LOG10E', 'PI', 'SQRT1_2', 'SQRT'] let mathmeth = ['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor', \ 'log', 'max', 'min', 'pow', 'random', 'round', 'sin', 'sqrt', 'tan', \ 'watch', 'unwatch'] call map(mathmeth, 'v:val."("') let maths = mathprop + mathmeth " Number let numbprop = ['MAX_VALUE', 'MIN_VALUE', 'NaN', 'NEGATIVE_INFINITY', 'POSITIVE_INFINITY', \ 'constructor', 'prototype'] let numbmeth = ['toExponential', 'toFixed', 'toPrecision', 'toSource', 'toString', 'valueOf', \ 'watch', 'unwatch'] call map(numbmeth, 'v:val."("') let numbs = numbprop + numbmeth " Object let objeprop = ['constructor', 'prototype'] let objemeth = ['eval', 'toSource', 'toString', 'unwatch', 'watch', 'valueOf'] call map(objemeth, 'v:val."("') let objes = objeprop + objemeth " RegExp let regeprop = ['constructor', 'global', 'ignoreCase', 'lastIndex', 'multiline', 'source', 'prototype'] let regemeth = ['exec', 'test', 'toSource', 'toString', 'watch', 'unwatch'] call map(regemeth, 'v:val."("') let reges = regeprop + regemeth " String let striprop = ['constructor', 'length', 'prototype'] let strimeth = ['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'concat', \ 'fixed', 'fontcolor', 'fontsize', 'fromCharCode', 'indexOf', 'italics', \ 'lastIndexOf', 'link', 'match', 'replace', 'search', 'slice', 'small', \ 'split', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLowerCase', \ 'toSource', 'toString', 'toUpperCase', 'watch', 'unwatch'] call map(strimeth, 'v:val."("') let stris = striprop + strimeth " User created properties let user_props1 = filter(copy(file), 'v:val =~ "this\\.\\k"') let juser_props1 = join(user_props1, ' ') let user_props1 = split(juser_props1, '\zethis\.') unlet! juser_props1 call map(user_props1, 'matchstr(v:val, "this\\.\\zs\\k\\+\\ze")') let user_props2 = filter(copy(file), 'v:val =~ "\\.prototype\\.\\k"') let juser_props2 = join(user_props2, ' ') let user_props2 = split(juser_props2, '\zeprototype\.') unlet! juser_props2 call map(user_props2, 'matchstr(v:val, "prototype\\.\\zs\\k\\+\\ze")') let user_props = user_props1 + user_props2 " HTML DOM properties " Anchors - anchor. let anchprop = ['accessKey', 'charset', 'coords', 'href', 'hreflang', 'id', 'innerHTML', \ 'name', 'rel', 'rev', 'shape', 'tabIndex', 'target', 'type', 'onBlur', 'onFocus'] let anchmeth = ['blur', 'focus'] call map(anchmeth, 'v:val."("') let anths = anchprop + anchmeth " Area - area. let areaprop = ['accessKey', 'alt', 'coords', 'hash', 'host', 'hostname', 'href', 'id', \ 'noHref', 'pathname', 'port', 'protocol', 'search', 'shape', 'tabIndex', 'target'] let areameth = ['onClick', 'onDblClick', 'onMouseOut', 'onMouseOver'] call map(areameth, 'v:val."("') let areas = areaprop + areameth " Base - base. let baseprop = ['href', 'id', 'target'] let bases = baseprop " Body - body. let bodyprop = ['aLink', 'background', 'gbColor', 'id', 'link', 'scrollLeft', 'scrollTop', \ 'text', 'vLink'] let bodys = bodyprop " Document - document. let docuprop = ['anchors', 'applets', 'childNodes', 'embeds', 'forms', 'images', 'links', 'stylesheets', \ 'body', 'cookie', 'documentElement', 'domain', 'lastModified', 'referrer', 'title', 'URL'] let documeth = ['close', 'createAttribute', 'createElement', 'createTextNode', 'focus', 'getElementById', \ 'getElementsByName', 'getElementsByTagName', 'open', 'write', 'writeln', \ 'onClick', 'onDblClick', 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp', \ 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onResize'] call map(documeth, 'v:val."("') let docuxprop = ['attributes', 'childNodes', 'doctype', 'documentElement', 'firstChild', \ 'implementation', 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', \ 'nodeValue', 'ownerDocument', 'parentNode', 'previousSibling'] let docuxmeth = ['createAttribute', 'createCDATASection', \ 'createComment', 'createDocument', 'createDocumentFragment', \ 'createElement', 'createEntityReference', 'createProcessingInstruction', \ 'createTextNode'] call map(docuxmeth, 'v:val."("') let docus = docuprop + docuxprop + documeth + docuxmeth " Form - form. let formprop = ['elements', 'acceptCharset', 'action', 'encoding', 'enctype', 'id', 'length', \ 'method', 'name', 'tabIndex', 'target'] let formmeth = ['reset', 'submit', 'onReset', 'onSubmit'] call map(formmeth, 'v:val."("') let forms = formprop + formmeth " Frame - frame. let framprop = ['contentDocument', 'frameBorder', 'id', 'longDesc', 'marginHeight', 'marginWidth', \ 'name', 'noResize', 'scrolling', 'src'] let frammeth = ['blur', 'focus'] call map(frammeth, 'v:val."("') let frams = framprop + frammeth " Frameset - frameset. let fsetprop = ['cols', 'id', 'rows'] let fsetmeth = ['blur', 'focus'] call map(fsetmeth, 'v:val."("') let fsets = fsetprop + fsetmeth " History - history. let histprop = ['length'] let histmeth = ['back', 'forward', 'go'] call map(histmeth, 'v:val."("') let hists = histprop + histmeth " Iframe - iframe. let ifraprop = ['align', 'frameBorder', 'height', 'id', 'longDesc', 'marginHeight', 'marginWidth', \ 'name', 'scrolling', 'src', 'width'] let ifras = ifraprop " Image - image. let imagprop = ['align', 'alt', 'border', 'complete', 'height', 'hspace', 'id', 'isMap', 'longDesc', \ 'lowSrc', 'name', 'src', 'useMap', 'vspace', 'width'] let imagmeth = ['onAbort', 'onError', 'onLoad'] call map(imagmeth, 'v:val."("') let imags = histprop + imagmeth " Button - accessible only by other properties let buttprop = ['accessKey', 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value'] let buttmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp'] call map(buttmeth, 'v:val."("') let butts = buttprop + buttmeth " Checkbox - accessible only by other properties let checprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked', \ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value'] let checmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp'] call map(checmeth, 'v:val."("') let checs = checprop + checmeth " File upload - accessible only by other properties let fileprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue', \ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value'] let filemeth = ['blur', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp'] call map(filemeth, 'v:val."("') let files = fileprop + filemeth " Hidden - accessible only by other properties let hiddprop = ['defaultValue', 'form', 'id', 'name', 'type', 'value'] let hidds = hiddprop " Password - accessible only by other properties let passprop = ['accept', 'accessKey', 'defaultValue', \ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly', 'size', 'tabIndex', \ 'type', 'value'] let passmeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus', 'onKeyDown', \ 'onKeyPress', 'onKeyUp'] call map(passmeth, 'v:val."("') let passs = passprop + passmeth " Radio - accessible only by other properties let radiprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked', \ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value'] let radimeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus'] call map(radimeth, 'v:val."("') let radis = radiprop + radimeth " Reset - accessible only by other properties let reseprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue', \ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value'] let resemeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus'] call map(resemeth, 'v:val."("') let reses = reseprop + resemeth " Submit - accessible only by other properties let submprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue', \ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value'] let submmeth = ['blur', 'click', 'focus', 'select', 'onClick', 'onSelectStart'] call map(submmeth, 'v:val."("') let subms = submprop + submmeth " Text - accessible only by other properties let textprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue', \ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly', \ 'size', 'tabIndex', 'type', 'value'] let textmeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus', 'onKeyDown', \ 'onKeyPress', 'onKeyUp', 'onSelect'] call map(textmeth, 'v:val."("') let texts = textprop + textmeth " Link - link. let linkprop = ['charset', 'disabled', 'href', 'hreflang', 'id', 'media', \ 'rel', 'rev', 'target', 'type'] let linkmeth = ['onLoad'] call map(linkmeth, 'v:val."("') let links = linkprop + linkmeth " Location - location. let locaprop = ['href', 'hash', 'host', 'hostname', 'pathname', 'port', 'protocol', \ 'search'] let locameth = ['assign', 'reload', 'replace'] call map(locameth, 'v:val."("') let locas = locaprop + locameth " Meta - meta. let metaprop = ['charset', 'content', 'disabled', 'httpEquiv', 'name', 'scheme'] let metas = metaprop " Navigator - navigator. let naviprop = ['plugins', 'appCodeName', 'appName', 'appVersion', 'cookieEnabled', \ 'platform', 'userAgent'] let navimeth = ['javaEnabled', 'taintEnabled'] call map(navimeth, 'v:val."("') let navis = naviprop + navimeth " Object - object. let objeprop = ['align', 'archive', 'border', 'code', 'codeBase', 'codeType', 'data', \ 'declare', 'form', 'height', 'hspace', 'id', 'name', 'standby', 'tabIndex', \ 'type', 'useMap', 'vspace', 'width'] let objes = objeprop " Option - accessible only by other properties let optiprop = ['defaultSelected', \ 'disabled', 'form', 'id', 'index', 'label', 'selected', 'text', 'value'] let optis = optiprop " Screen - screen. let screprop = ['availHeight', 'availWidth', 'colorDepth', 'height', 'width'] let scres = screprop " Select - accessible only by other properties let seleprop = ['options', 'disabled', 'form', 'id', 'length', 'multiple', 'name', \ 'selectedIndex', 'size', 'tabIndex', 'type', 'value'] let selemeth = ['blur', 'focus', 'remove', 'onBlur', 'onChange', 'onFocus'] call map(selemeth, 'v:val."("') let seles = seleprop + selemeth " Style - style. let stylprop = ['background', 'backgroundAttachment', 'backgroundColor', 'backgroundImage', \ 'backgroundPosition', 'backgroundRepeat', \ 'border', 'borderBottom', 'borderLeft', 'borderRight', 'borderTop', \ 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', \ 'borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle', \ 'borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth', \ 'borderColor', 'borderStyle', 'borderWidth', 'margin', 'marginBottom', \ 'marginLeft', 'marginRight', 'marginTop', 'outline', 'outlineStyle', 'outlineWidth', \ 'outlineColor', 'outlineStyle', 'outlineWidth', 'padding', 'paddingBottom', \ 'paddingLeft', 'paddingRight', 'paddingTop', \ 'clear', 'clip', 'clipBottom', 'clipLeft', 'clipRight', 'clipTop', 'content', \ 'counterIncrement', 'counterReset', 'cssFloat', 'cursor', 'direction', \ 'display', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight', \ 'minWidth', 'overflow', 'overflowX', 'overflowY', 'verticalAlign', 'visibility', \ 'width', \ 'listStyle', 'listStyleImage', 'listStylePosition', 'listStyleType', \ 'cssText', 'bottom', 'height', 'left', 'position', 'right', 'top', 'width', 'zindex', \ 'orphans', 'widows', 'page', 'pageBreakAfter', 'pageBreakBefore', 'pageBreakInside', \ 'borderCollapse', 'borderSpacing', 'captionSide', 'emptyCells', 'tableLayout', \ 'color', 'font', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch', \ 'fontStyle', 'fontVariant', 'fontWeight', 'letterSpacing', 'lineHeight', 'quotes', \ 'textAlign', 'textIndent', 'textShadow', 'textTransform', 'textUnderlinePosition', \ 'unicodeBidi', 'whiteSpace', 'wordSpacing'] let styls = stylprop " Table - table. let tablprop = ['rows', 'tBodies', 'align', 'bgColor', 'border', 'caption', 'cellPadding', \ 'cellSpacing', 'frame', 'height', 'rules', 'summary', 'tFoot', 'tHead', 'width'] let tablmeth = ['createCaption', 'createTFoot', 'createTHead', 'deleteCaption', 'deleteRow', \ 'deleteTFoot', 'deleteTHead', 'insertRow'] call map(tablmeth, 'v:val."("') let tabls = tablprop + tablmeth " Table data - TableData. let tdatprop = ['abbr', 'align', 'axis', 'bgColor', 'cellIndex', 'ch', 'chOff', \ 'colSpan', 'headers', 'noWrap', 'rowSpan', 'scope', 'vAlign', 'width'] let tdats = tdatprop " Table row - TableRow. let trowprop = ['cells', 'align', 'bgColor', 'ch', 'chOff', 'rowIndex', 'sectionRowIndex', \ 'vAlign'] let trowmeth = ['deleteCell', 'insertCell'] call map(trowmeth, 'v:val."("') let trows = trowprop + trowmeth " Textarea - accessible only by other properties let tareprop = ['accessKey', 'cols', 'defaultValue', \ 'disabled', 'form', 'id', 'name', 'readOnly', 'rows', \ 'tabIndex', 'type', 'value', 'selectionStart', 'selectionEnd'] let taremeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus'] call map(taremeth, 'v:val."("') let tares = tareprop + taremeth " Window - window. let windprop = ['frames', 'closed', 'defaultStatus', 'encodeURI', 'event', 'history', \ 'length', 'location', 'name', 'onload', 'opener', 'parent', 'screen', 'self', \ 'status', 'top', 'XMLHttpRequest', 'ActiveXObject'] let windmeth = ['alert', 'blur', 'clearInterval', 'clearTimeout', 'close', 'confirm', 'focus', \ 'moveBy', 'moveTo', 'open', 'print', 'prompt', 'scrollBy', 'scrollTo', 'setInterval', \ 'setTimeout'] call map(windmeth, 'v:val."("') let winds = windprop + windmeth " XMLHttpRequest - access by new xxx() let xmlhprop = ['onreadystatechange', 'readyState', 'responseText', 'responseXML', \ 'status', 'statusText', 'parseError'] let xmlhmeth = ['abort', 'getAllResponseHeaders', 'getResponseHeaders', 'open', \ 'send', 'setRequestHeader'] call map(xmlhmeth, 'v:val."("') let xmlhs = xmlhprop + xmlhmeth " XML DOM " Attributes - element.attributes[x]. let xdomattrprop = ['name', 'specified', 'value'] " Element - anyelement. let xdomelemprop = ['attributes', 'childNodes', 'firstChild', 'lastChild', \ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue', \ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling', 'tagName'] let xdomelemmeth = ['appendChild', 'cloneNode', 'getAttribute', 'getAttributeNode', \ 'getElementsByTagName', 'hasChildNodes', 'insertBefore', 'normalize', \ 'removeAttribute', 'removeAttributeNode', 'removeChild', 'replaceChild', \ 'setAttribute', 'setAttributeNode'] call map(xdomelemmeth, 'v:val."("') let xdomelems = xdomelemprop + xdomelemmeth " Node - anynode. let xdomnodeprop = ['attributes', 'childNodes', 'firstChild', 'lastChild', \ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue', \ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling'] let xdomnodemeth = ['appendChild', 'cloneNode', \ 'hasChildNodes', 'insertBefore', 'removeChild', 'replaceChild'] call map(xdomnodemeth, 'v:val."("') let xdomnodes = xdomnodeprop + xdomnodemeth " NodeList let xdomnliss = ['length', 'item('] " Error - parseError. let xdomerror = ['errorCode', 'reason', 'line', 'linepos', 'srcText', 'url', 'filepos'] " Find object type declaration to reduce number of suggestions. {{{ " 1. Get object name " 2. Find object declaration line " 3. General declaration follows "= new Type" syntax, additional else " for regexp "= /re/" " 4. Make correction for Microsoft.XMLHTTP ActiveXObject " 5. Repeat for external files let object = matchstr(shortcontext, '\zs\k\+\ze\(\[.\{-}\]\)\?\.$') if len(object) > 0 let decl_line = search(object.'.\{-}=\s*new\s*', 'bn') if decl_line > 0 let object_type = matchstr(getline(decl_line), object.'.\{-}=\s*new\s*\zs\k\+\ze') if object_type == 'ActiveXObject' && matchstr(getline(decl_line), object.'.\{-}=\s*new\s*ActiveXObject\s*(.Microsoft\.XMLHTTP.)') != '' let object_type = 'XMLHttpRequest' endif else let decl_line = search('var\s*'.object.'\s*=\s*\/', 'bn') if decl_line > 0 let object_type = 'RegExp' endif endif " We didn't find var declaration in current file but we may have " something in external files. if decl_line == 0 && exists("b:js_extfiles") let dext_line = filter(copy(b:js_extfiles), 'v:val =~ "'.object.'.\\{-}=\\s*new\\s*"') if len(dext_line) > 0 let object_type = matchstr(dext_line[-1], object.'.\{-}=\s*new\s*\zs\k\+\ze') if object_type == 'ActiveXObject' && matchstr(dext_line[-1], object.'.\{-}=\s*new\s*ActiveXObject\s*(.Microsoft\.XMLHTTP.)') != '' let object_type = 'XMLHttpRequest' endif else let dext_line = filter(copy(b:js_extfiles), 'v:val =~ "var\s*'.object.'\\s*=\\s*\\/"') if len(dext_line) > 0 let object_type = 'RegExp' endif endif endif endif " }}} if !exists('object_type') let object_type = '' endif if object_type == 'Date' let values = dates elseif object_type == 'Image' let values = imags elseif object_type == 'Array' let values = arrays elseif object_type == 'Boolean' " TODO: a bit more than real boolean let values = arrays elseif object_type == 'XMLHttpRequest' let values = xmlhs elseif object_type == 'String' let values = stris elseif object_type == 'RegExp' let values = reges elseif object_type == 'Math' let values = maths endif if !exists('values') " List of properties if shortcontext =~ 'Math\.$' let values = maths elseif shortcontext =~ 'anchors\(\[.\{-}\]\)\?\.$' let values = anths elseif shortcontext =~ 'area\.$' let values = areas elseif shortcontext =~ 'base\.$' let values = bases elseif shortcontext =~ 'body\.$' let values = bodys elseif shortcontext =~ 'document\.$' let values = docus elseif shortcontext =~ 'forms\(\[.\{-}\]\)\?\.$' let values = forms elseif shortcontext =~ 'frameset\.$' let values = fsets elseif shortcontext =~ 'history\.$' let values = hists elseif shortcontext =~ 'iframe\.$' let values = ifras elseif shortcontext =~ 'images\(\[.\{-}\]\)\?\.$' let values = imags elseif shortcontext =~ 'links\(\[.\{-}\]\)\?\.$' let values = links elseif shortcontext =~ 'location\.$' let values = locas elseif shortcontext =~ 'meta\.$' let values = metas elseif shortcontext =~ 'navigator\.$' let values = navis elseif shortcontext =~ 'object\.$' let values = objes elseif shortcontext =~ 'screen\.$' let values = scres elseif shortcontext =~ 'style\.$' let values = styls elseif shortcontext =~ 'table\.$' let values = tabls elseif shortcontext =~ 'TableData\.$' let values = tdats elseif shortcontext =~ 'TableRow\.$' let values = trows elseif shortcontext =~ 'window\.$' let values = winds elseif shortcontext =~ 'parseError\.$' let values = xdomerror elseif shortcontext =~ 'attributes\[\d\+\]\.$' let values = xdomattrprop else let values = user_props + arrays + dates + funcs + maths + numbs + objes + reges + stris let values += doms + anths + areas + bases + bodys + docus + forms + frams + fsets + hists let values += ifras + imags + links + locas + metas + navis + objes + scres let values += tabls + trows + tares + winds let values += xdomnodes + xdomnliss + xdomelems endif endif for m in values if m =~? '^'.a:base call add(res, m) elseif m =~? a:base call add(res2, m) endif endfor unlet! values return res + res2 endif " }}} " Get variables data. let variables = filter(copy(file), 'v:val =~ "var\\s"') call map(variables, 'matchstr(v:val, ".\\{-}var\\s\\+\\zs.*\\ze")') call map(variables, 'substitute(v:val, ";\\|$", ",", "g")') let vars = [] " This loop (and next one) is necessary to get variable names from " constructs like: var var1, var2, var3 = "something"; for i in range(len(variables)) let comma_separated = split(variables[i], ',\s*') call map(comma_separated, 'matchstr(v:val, "\\k\\+")') let vars += comma_separated endfor let variables = sort(vars) unlet! vars " Add "no var" variables. let undeclared_variables = filter(copy(file), 'v:val =~ "^\\s*\\k\\+\\s*="') let u_vars = [] for i in range(len(undeclared_variables)) let split_equal = split(undeclared_variables[i], '\s*=') call map(split_equal, 'matchstr(v:val, "\\k\\+$")') let u_vars += split_equal endfor let variables += sort(u_vars) unlet! u_vars " Get functions let functions = filter(copy(file), 'v:val =~ "^\\s*function\\s"') let arguments = copy(functions) call map(functions, 'matchstr(v:val, "^\\s*function\\s\\+\\zs\\k\\+")') call map(functions, 'v:val."("') let functions = sort(functions) " Create table to keep arguments for additional 'menu' info let b:js_menuinfo = {} for i in arguments let g:ia = i let f_elements = matchlist(i, 'function\s\+\(\k\+\)\s*(\(.\{-}\))') if len(f_elements) == 3 let b:js_menuinfo[f_elements[1].'('] = f_elements[2] endif endfor " Get functions arguments call map(arguments, 'matchstr(v:val, "function.\\{-}(\\zs.\\{-}\\ze)")') let jargs = join(arguments, ',') let jargs = substitute(jargs, '\s', '', 'g') let arguments = split(jargs, ',') let arguments = sort(arguments) " Built-in functions let builtin = ['alert(', 'confirm('] " Top-level HTML DOM objects let htmldom = ['document', 'anchor', 'area', 'base', 'body', 'document', 'event', 'form', 'frame', 'frameset', 'history', 'iframe', 'image', 'input', 'link', 'location', 'meta', 'navigator', 'object', 'option', 'screen', 'select', 'table', 'tableData', 'tableHeader', 'tableRow', 'textarea', 'window'] call map(htmldom, 'v:val."."') " Top-level properties let properties = ['decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', \ 'eval', 'Infinity', 'isFinite', 'isNaN', 'NaN', 'Number', 'parseFloat', \ 'parseInt', 'String', 'undefined', 'escape', 'unescape'] " Keywords let keywords = ["Array", "Boolean", "Date", "Function", "Math", "Number", "Object", "RegExp", "String", "XMLHttpRequest", "ActiveXObject", "abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double ", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in ", "instanceof", "int", "interface", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super ", "switch", "synchronized", "this", "throw", "throws", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with"] let values = variables + functions + htmldom + arguments + builtin + properties + keywords for m in values if m =~? '^'.a:base call add(res, m) elseif m =~? a:base call add(res2, m) endif endfor let menu = res + res2 let final_menu = [] for i in range(len(menu)) let item = menu[i] if item =~ '($' let kind = 'f' if has_key(b:js_menuinfo, item) let m_info = b:js_menuinfo[item] else let m_info = '' endif else let kind = 'v' let m_info = '' endif let final_menu += [{'word':item, 'menu':m_info, 'kind':kind}] endfor let g:fm = final_menu return final_menu endfunction " vim:set foldmethod=marker:
zyz2011-vim
runtime/autoload/javascriptcomplete.vim
Vim Script
gpl2
27,028
" Vim OMNI completion script for SQL " Language: SQL " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> " Version: 12.0 " Last Change: 2012 Feb 08 " Usage: For detailed help " ":help sql.txt" " or ":help ft-sql-omni" " or read $VIMRUNTIME/doc/sql.txt " History " Version 12.0 " - Partial column name completion did not work when a table " name or table alias was provided (Jonas Enberg). " - Improved the handling of column completion. First we match any " columns from a previous completion. If not matches are found, we " consider the partial name to be a table or table alias for the " query and attempt to match on it. " " Version 11.0 " Added g:omni_sql_default_compl_type variable " - You can specify which type of completion to default to " when pressing <C-X><C-O>. The entire list of available " choices can be found in the calls to sqlcomplete#Map in: " ftplugin/sql.vim " " Version 10.0 " Updated PreCacheSyntax() " - Now returns a List of the syntax items it finds. " This allows other plugins / scripts to use this list for their own " purposes. In this case XPTemplate can use them for a Choose list. " - Verifies the parameters are the correct type and displays a " warning if not. " - Verifies the parameters are the correct type and displays a " warning if not. " Updated SQLCWarningMsg() " - Prepends warning message with SQLComplete so you know who issued " the warning. " Updated SQLCErrorMsg() " - Prepends error message with SQLComplete so you know who issued " the error. " " Version 9.0 " This change removes some of the support for tables with spaces in their " names in order to simplify the regexes used to pull out query table " aliases for more robust table name and column name code completion. " Full support for "table names with spaces" can be added in again " after 7.3. " " Version 8.0 " Incorrectly re-executed the g:ftplugin_sql_omni_key_right and g:ftplugin_sql_omni_key_left " when drilling in and out of a column list for a table. " " 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. if exists('&omnifunc') " Do not set the option if already set since this " results in an E117 warning. if &omnifunc == "" setlocal omnifunc=sqlcomplete#Complete endif endif if exists('g:loaded_sql_completion') finish endif let g:loaded_sql_completion = 120 " Maintains filename of dictionary let s:sql_file_table = "" let s:sql_file_procedure = "" let s:sql_file_view = "" " Define various arrays to be used for caching let s:tbl_name = [] let s:tbl_alias = [] let s:tbl_cols = [] let s:syn_list = [] let s:syn_value = [] " Used in conjunction with the syntaxcomplete plugin let s:save_inc = "" let s:save_exc = "" if exists('g:omni_syntax_group_include_sql') let s:save_inc = g:omni_syntax_group_include_sql endif if exists('g:omni_syntax_group_exclude_sql') let s:save_exc = g:omni_syntax_group_exclude_sql endif " Used with the column list let s:save_prev_table = "" " Default the option to verify table alias if !exists('g:omni_sql_use_tbl_alias') let g:omni_sql_use_tbl_alias = 'a' endif " Default syntax items to precache if !exists('g:omni_sql_precache_syntax_groups') let g:omni_sql_precache_syntax_groups = [ \ 'syntax', \ 'sqlKeyword', \ 'sqlFunction', \ 'sqlOption', \ 'sqlType', \ 'sqlStatement' \ ] endif " Set ignorecase to the ftplugin standard if !exists('g:omni_sql_ignorecase') let g:omni_sql_ignorecase = &ignorecase endif " During table completion, should the table list also " include the owner name if !exists('g:omni_sql_include_owner') let g:omni_sql_include_owner = 0 if exists('g:loaded_dbext') if g:loaded_dbext >= 300 " New to dbext 3.00, by default the table lists include the owner " name of the table. This is used when determining how much of " whatever has been typed should be replaced as part of the " code replacement. let g:omni_sql_include_owner = 1 endif endif endif " Default type of completion used when <C-X><C-O> is pressed if !exists('g:omni_sql_default_compl_type') let g:omni_sql_default_compl_type = 'table' endif " This function is used for the 'omnifunc' option. function! sqlcomplete#Complete(findstart, base) " Default to table name completion let compl_type = 'table' " Allow maps to specify what type of object completion they want if exists('b:sql_compl_type') let compl_type = b:sql_compl_type endif " First pass through this function determines how much of the line should " be replaced by whatever is chosen from the completion list if a:findstart " Locate the start of the item, including "." let line = getline('.') let start = col('.') - 1 let lastword = -1 let begindot = 0 " Check if the first character is a ".", for column completion if line[start - 1] == '.' let begindot = 1 endif while start > 0 " 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. if lastword != -1 && compl_type == 'column' break endif " If column completion was specified stop at the "." if " a . was specified, otherwise, replace all the way up " to the owner name (if included). if lastword == -1 && compl_type == 'column' && begindot == 1 let lastword = start endif " If omni_sql_include_owner = 0, do not include the table " name as part of the substitution, so break here if lastword == -1 && \ compl_type =~ 'table\|view\|procedure\column_csv' && \ g:omni_sql_include_owner == 0 let lastword = start break endif let start -= 1 else break endif endwhile " Return the column of the last word, which is going to be changed. " Remember the text that comes before it in s:prepended. if lastword == -1 let s:prepended = '' return start endif let s:prepended = strpart(line, start, lastword - start) return lastword endif " Second pass through this function will determine what data to put inside " of the completion list " s:prepended is set by the first pass let base = s:prepended . a:base " Default the completion list to an empty list let compl_list = [] " Default to table name completion let compl_type = g:omni_sql_default_compl_type " Allow maps to specify what type of object completion they want if exists('b:sql_compl_type') let compl_type = b:sql_compl_type unlet b:sql_compl_type endif if compl_type == 'tableReset' let compl_type = 'table' let base = '' endif if compl_type == 'table' || \ compl_type == 'procedure' || \ compl_type == 'view' " This type of completion relies upon the dbext.vim plugin if s:SQLCCheck4dbext() == -1 return [] endif " Allow the user to override the dbext plugin to specify whether " the owner/creator should be included in the list if g:loaded_dbext >= 300 let saveSetting = DB_listOption('dict_show_owner') exec 'DBSetOption dict_show_owner='.(g:omni_sql_include_owner==1?'1':'0') endif let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '') " 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}) let compl_list = readfile(s:sql_file_{compl_type}) endif endif if g:loaded_dbext > 300 exec 'DBSetOption dict_show_owner='.saveSetting endif elseif compl_type =~? 'column' " This type of completion relies upon the dbext.vim plugin if s:SQLCCheck4dbext() == -1 return [] endif if base == "" " The last time we displayed a column list we stored " the table name. If the user selects a column list " without a table name of alias present, assume they want " the previous column list displayed. let base = s:save_prev_table endif let owner = '' let column = '' if base =~ '\.' " Check if the owner/creator has been specified let owner = matchstr( base, '^\zs.*\ze\..*\..*' ) let table = matchstr( base, '^\(.*\.\)\?\zs.*\ze\..*' ) let column = matchstr( base, '.*\.\zs.*' ) " It is pretty well impossible to determine if the user " has entered: " owner.table " table.column_prefix " So there are a couple of things we can do to mitigate " this issue. " 1. Check if the dbext plugin has the option turned " on to even allow owners " 2. Based on 1, if the user is showing a table list " and the DrillIntoTable (using <Right>) then " this will be owner.table. In this case, we can " check to see the table.column exists in the " cached table list. If it does, then we have " determined the user has actually chosen " owner.table, not table.column_prefix. let found = -1 if g:omni_sql_include_owner == 1 && owner == '' if filereadable(s:sql_file_table) let tbl_list = readfile(s:sql_file_table) let found = index( tbl_list, ((table != '')?(table.'.'):'').column) endif endif " If the table.column was found in the table list, we can safely assume " the owner was not provided and shift the items appropriately. " OR " If the user has indicated not to use table owners at all and " the base ends in a '.' we know they are not providing a column " name, so we can shift the items appropriately. " if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$') " let owner = table " let table = column " let column = '' " endif else " If no "." was provided and the user asked for " column level completion, first attempt the match " on any previous column lists. If the user asked " for a list of columns comma separated, continue as usual. if compl_type == 'column' && s:save_prev_table != '' " The last time we displayed a column list we stored " the table name. If the user selects a column list " without a table name of alias present, assume they want " the previous column list displayed. let table = s:save_prev_table let list_type = '' let compl_list = s:SQLCGetColumns(table, list_type) if ! empty(compl_list) " If no column prefix has been provided and the table " name was provided, append it to each of the items " returned. let compl_list = filter(deepcopy(compl_list), 'v:val=~"^'.base.'"' ) " If not empty, we have a match on columns " return the list if ! empty(compl_list) return compl_list endif endif endif " Since no columns were found to match the base supplied " assume the user is trying to complete the column list " for a table (and or an alias to a table). let table = base endif " Get anything after the . and consider this the table name " If an owner has been specified, then we must consider the " base to be a partial column name " let base = matchstr( base, '^\(.*\.\)\?\zs.*' ) if table != "" let s:save_prev_table = base let list_type = '' if compl_type == 'column_csv' " Return one array element, with a comma separated " list of values instead of multiple array entries " for each column in the table. let list_type = 'csv' endif let compl_list = s:SQLCGetColumns(table, list_type) if column != '' " If no column prefix has been provided and the table " name was provided, append it to each of the items " returned. let compl_list = map(compl_list, 'table.".".v:val') if owner != '' " If an owner has been provided append it to each of the " items returned. let compl_list = map(compl_list, 'owner.".".v:val') endif else let base = '' endif if compl_type == 'column_csv' " Join the column array into 1 single element array " but make the columns column separated let compl_list = [join(compl_list, ', ')] endif endif elseif compl_type == 'resetCache' " Reset all cached items let s:tbl_name = [] let s:tbl_alias = [] let s:tbl_cols = [] let s:syn_list = [] let s:syn_value = [] let msg = "All SQL cached items have been removed." call s:SQLCWarningMsg(msg) " Leave time for the user to read the error message :sleep 2 else let compl_list = s:SQLCGetSyntaxList(compl_type) endif if base != '' " Filter the list based on the first few characters the user entered. " Check if the text matches at the beginning " \\(^.base.'\\) " or " Match to a owner.table or alias.column type match " ^\\(\\w\\+\\.\\)\\?'.base.'\\) " or " Handle names with spaces "my table name" " "\\(^'.base.'\\|^\\(\\w\\+\\.\\)\\?'.base.'\\)"' " 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 if exists('b:sql_compl_savefunc') && b:sql_compl_savefunc != "" let &omnifunc = b:sql_compl_savefunc endif return compl_list endfunc function! sqlcomplete#PreCacheSyntax(...) let syn_group_arr = [] let syn_items = [] if a:0 > 0 if type(a:1) != 3 call s:SQLCWarningMsg("Parameter is not a list. Example:['syntaxGroup1', 'syntaxGroup2']") return '' endif let syn_group_arr = a:1 else let syn_group_arr = g:omni_sql_precache_syntax_groups endif " For each group specified in the list, precache all " the sytnax items. if !empty(syn_group_arr) for group_name in syn_group_arr let syn_items = extend( syn_items, s:SQLCGetSyntaxList(group_name) ) endfor endif return syn_items endfunction function! sqlcomplete#ResetCacheSyntax(...) let syn_group_arr = [] if a:0 > 0 if type(a:1) != 3 call s:SQLCWarningMsg("Parameter is not a list. Example:['syntaxGroup1', 'syntaxGroup2']") return '' endif let syn_group_arr = a:1 else let syn_group_arr = g:omni_sql_precache_syntax_groups endif " For each group specified in the list, precache all " the sytnax items. if !empty(syn_group_arr) for group_name in syn_group_arr let list_idx = index(s:syn_list, group_name, 0, &ignorecase) if list_idx > -1 " Remove from list of groups call remove( s:syn_list, list_idx ) " Remove from list of keywords call remove( s:syn_value, list_idx ) endif endfor endif endfunction function! sqlcomplete#Map(type) " Tell the SQL plugin what you want to complete let b:sql_compl_type=a:type " Record previous omnifunc, if the SQL completion " is being used in conjunction with other filetype " completion plugins if &omnifunc != "" && &omnifunc != 'sqlcomplete#Complete' " Record the previous omnifunc, the plugin " will automatically set this back so that it " does not interfere with other ftplugins settings let b:sql_compl_savefunc=&omnifunc endif " Set the OMNI func for the SQL completion plugin let &omnifunc='sqlcomplete#Complete' endfunction function! sqlcomplete#DrillIntoTable() " If the omni popup window is visible if pumvisible() call sqlcomplete#Map('column') " C-Y, makes the currently highlighted entry active " and trigger the omni popup to be redisplayed call feedkeys("\<C-Y>\<C-X>\<C-O>", 'n') else " If the popup is not visible, simple perform the normal " key behaviour. " Must use exec since they key must be preceeded by "\" " or feedkeys will simply push each character of the string " rather than the "key press". exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_right.'", "n")' endif return "" endfunction function! sqlcomplete#DrillOutOfColumns() " If the omni popup window is visible if pumvisible() call sqlcomplete#Map('tableReset') " Trigger the omni popup to be redisplayed call feedkeys("\<C-X>\<C-O>") else " If the popup is not visible, simple perform the normal " key behaviour. " Must use exec since they key must be preceeded by "\" " or feedkeys will simply push each character of the string " rather than the "key press". exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_left.'", "n")' endif return "" endfunction function! s:SQLCWarningMsg(msg) echohl WarningMsg echomsg 'SQLComplete:'.a:msg echohl None endfunction function! s:SQLCErrorMsg(msg) echohl ErrorMsg echomsg 'SQLComplete:'.a:msg echohl None endfunction function! s:SQLCGetSyntaxList(syn_group) let syn_group = a:syn_group let compl_list = [] " Check if we have already cached the syntax list let list_idx = index(s:syn_list, syn_group, 0, &ignorecase) if list_idx > -1 " Return previously cached value let compl_list = s:syn_value[list_idx] else " Request the syntax list items from the " syntax completion plugin if syn_group == 'syntax' " Handle this special case. This allows the user " to indicate they want all the syntax items available, " so do not specify a specific include list. let g:omni_syntax_group_include_sql = '' else " The user has specified a specific syntax group let g:omni_syntax_group_include_sql = syn_group endif let g:omni_syntax_group_exclude_sql = '' let syn_value = syntaxcomplete#OmniSyntaxList() let g:omni_syntax_group_include_sql = s:save_inc let g:omni_syntax_group_exclude_sql = s:save_exc " Cache these values for later use let s:syn_list = add( s:syn_list, syn_group ) let s:syn_value = add( s:syn_value, syn_value ) let compl_list = syn_value endif return compl_list endfunction function! s:SQLCCheck4dbext() if !exists('g:loaded_dbext') let msg = "The dbext plugin must be loaded for dynamic SQL completion" call s:SQLCErrorMsg(msg) " Leave time for the user to read the error message :sleep 2 return -1 elseif g:loaded_dbext < 600 let msg = "The dbext plugin must be at least version 5.30 " . \ " for dynamic SQL completion" call s:SQLCErrorMsg(msg) " Leave time for the user to read the error message :sleep 2 return -1 endif return 1 endfunction function! s:SQLCAddAlias(table_name, table_alias, cols) " Strip off the owner if included let table_name = matchstr(a:table_name, '\%(.\{-}\.\)\?\zs\(.*\)' ) let table_alias = a:table_alias let cols = a:cols if g:omni_sql_use_tbl_alias != 'n' if table_alias == '' if 'da' =~? g:omni_sql_use_tbl_alias if table_name =~ '_' " Treat _ as separators since people often use these " for word separators let save_keyword = &iskeyword setlocal iskeyword-=_ " Get the first letter of each word " [[:alpha:]] is used instead of \w " to catch extended accented characters " let table_alias = substitute( \ table_name, \ '\<[[:alpha:]]\+\>_\?', \ '\=strpart(submatch(0), 0, 1)', \ 'g' \ ) " Restore original value let &iskeyword = save_keyword elseif table_name =~ '\u\U' let table_alias = substitute( \ table_name, '\(\u\)\U*', '\1', 'g') else let table_alias = strpart(table_name, 0, 1) endif endif endif if table_alias != '' " Following a word character, make sure there is a . and no spaces let table_alias = substitute(table_alias, '\w\zs\.\?\s*$', '.', '') if 'a' =~? g:omni_sql_use_tbl_alias && a:table_alias == '' let table_alias = inputdialog("Enter table alias:", table_alias) endif endif if table_alias != '' let cols = substitute(cols, '\<\w', table_alias.'&', 'g') endif endif return cols endfunction function! s:SQLCGetObjectOwner(object) " The owner regex matches a word at the start of the string which is " followed by a dot, but doesn't include the dot in the result. " ^ - from beginning of line " \("\|\[\)\? - ignore any quotes " \zs - start the match now " .\{-} - get owner name " \ze - end the match " \("\|\[\)\? - ignore any quotes " \. - must by followed by a . " let owner = matchstr( a:object, '^\s*\zs.*\ze\.' ) let owner = matchstr( a:object, '^\("\|\[\)\?\zs\.\{-}\ze\("\|\]\)\?\.' ) return owner endfunction function! s:SQLCGetColumns(table_name, list_type) " Check if the table name was provided as part of the column name let table_name = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?') let table_cols = [] let table_alias = '' let move_to_top = 1 let table_name = substitute(table_name, '\s*\(.\{-}\)\s*$', '\1', 'g') " If the table name was given as: " where c. let table_name = substitute(table_name, '^\c\(WHERE\|AND\|OR\)\s\+', '', '') if g:loaded_dbext >= 300 let saveSettingAlias = DB_listOption('use_tbl_alias') exec 'DBSetOption use_tbl_alias=n' endif let table_name_stripped = substitute(table_name, '["\[\]]*', '', 'g') " Check if we have already cached the column list for this table " by its name let list_idx = index(s:tbl_name, table_name_stripped, 0, &ignorecase) if list_idx > -1 let table_cols = split(s:tbl_cols[list_idx], '\n') else " Check if we have already cached the column list for this table " by its alias, assuming the table_name provided was actually " the alias for the table instead " select * " from area a " where a. let list_idx = index(s:tbl_alias, table_name_stripped, 0, &ignorecase) if list_idx > -1 let table_alias = table_name_stripped let table_name = s:tbl_name[list_idx] let table_cols = split(s:tbl_cols[list_idx], '\n') endif endif " If we have not found a cached copy of the table " And the table ends in a "." or we are looking for a column list " if list_idx == -1 && (a:table_name =~ '\.' || b:sql_compl_type =~ 'column') " if list_idx == -1 && (a:table_name =~ '\.' || a:list_type =~ 'csv') if list_idx == -1 let saveY = @y let saveSearch = @/ let saveWScan = &wrapscan let curline = line(".") let curcol = col(".") " Do not let searchs wrap setlocal nowrapscan " If . was entered, look at the word just before the . " We are looking for something like this: " select * " from customer c " where c. " So when . is pressed, we need to find 'c' " " Search backwards to the beginning of the statement " and do NOT wrap " exec 'silent! normal! v?\<\(select\|update\|delete\|;\)\>'."\n".'"yy' exec 'silent! normal! ?\<\c\(select\|update\|delete\|;\)\>'."\n" " Start characterwise visual mode " Advance right one character " Search foward until one of the following: " 1. Another select/update/delete statement " 2. A ; at the end of a line (the delimiter) " 3. The end of the file (incase no delimiter) " Yank the visually selected text into the "y register. exec 'silent! normal! vl/\c\(\<select\>\|\<update\>\|\<delete\>\|;\s*$\|\%$\)'."\n".'"yy' let query = @y let query = substitute(query, "\n", ' ', 'g') let found = 0 " if query =~? '^\c\(select\)' if query =~? '^\(select\|update\|delete\)' let found = 1 " \(\(\<\w\+\>\)\.\)\? - " '\c\(from\|join\|,\).\{-}' - Starting at the from clause (case insensitive) " '\zs\(\(\<\w\+\>\)\.\)\?' - Get the owner name (optional) " '\<\w\+\>\ze' - Get the table name " '\s\+\<'.table_name.'\>' - Followed by the alias " '\s*\.\@!.*' - Cannot be followed by a . " '\(\<where\>\|$\)' - Must be followed by a WHERE clause " '.*' - Exclude the rest of the line in the match " let table_name_new = matchstr(@y, " \ '\c\(from\|join\|,\).\{-}'. " \ '\zs\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'. " \ '\("\|\[\)\?.\{-}\("\|\]\)\?\ze'. " \ '\s\+\%(as\s\+\)\?\<'. " \ matchstr(table_name, '.\{-}\ze\.\?$'). " \ '\>'. " \ '\s*\.\@!.*'. " \ '\(\<where\>\|$\)'. " \ '.*' " \ ) " " " ''\c\(\<from\>\|\<join\>\|,\)\s*' - Starting at the from clause (case insensitive) " '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?' - Get the owner name (optional) " '\("\|\[\)\?\w\+\("\|\]\)\?\ze' - Get the table name " '\s\+\%(as\s\+\)\?\<'.matchstr(table_name, '.\{-}\ze\.\?$').'\>' - Followed by the alias " '\s*\.\@!.*' - Cannot be followed by a . " '\(\<where\>\|$\)' - Must be followed by a WHERE clause " '.*' - Exclude the rest of the line in the match let table_name_new = matchstr(@y, \ '\c\(\<from\>\|\<join\>\|,\)\s*'. \ '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?'. \ '\("\|\[\)\?\w\+\("\|\]\)\?\ze'. \ '\s\+\%(as\s\+\)\?\<'. \ matchstr(table_name, '.\{-}\ze\.\?$'). \ '\>'. \ '\s*\.\@!.*'. \ '\(\<where\>\|$\)'. \ '.*' \ ) if table_name_new != '' let table_alias = table_name let table_name = matchstr( table_name_new, '^\(.*\.\)\?\zs.*\ze' ) let list_idx = index(s:tbl_name, table_name, 0, &ignorecase) if list_idx > -1 let table_cols = split(s:tbl_cols[list_idx]) let s:tbl_name[list_idx] = table_name let s:tbl_alias[list_idx] = table_alias else let list_idx = index(s:tbl_alias, table_name, 0, &ignorecase) if list_idx > -1 let table_cols = split(s:tbl_cols[list_idx]) let s:tbl_name[list_idx] = table_name let s:tbl_alias[list_idx] = table_alias endif endif endif else " Simply assume it is a table name provided with a . on the end let found = 1 endif let @y = saveY let @/ = saveSearch let &wrapscan = saveWScan " Return to previous location call cursor(curline, curcol) if found == 0 if g:loaded_dbext > 300 exec 'DBSetOption use_tbl_alias='.saveSettingAlias endif " Not a SQL statement, do not display a list return [] endif endif if empty(table_cols) " Specify silent mode, no messages to the user (tbl, 1) " Specify do not comma separate (tbl, 1, 1) let table_cols_str = DB_getListColumn(table_name, 1, 1) if table_cols_str != "" let s:tbl_name = add( s:tbl_name, table_name ) let s:tbl_alias = add( s:tbl_alias, table_alias ) let s:tbl_cols = add( s:tbl_cols, table_cols_str ) let table_cols = split(table_cols_str, '\n') endif endif if g:loaded_dbext > 300 exec 'DBSetOption use_tbl_alias='.saveSettingAlias endif " If the user has asked for a comma separate list of column " values, ask the user if they want to prepend each column " with a tablename alias. if a:list_type == 'csv' && !empty(table_cols) let cols = join(table_cols, ', ') let cols = s:SQLCAddAlias(table_name, table_alias, cols) let table_cols = [cols] endif return table_cols endfunction
zyz2011-vim
runtime/autoload/sqlcomplete.vim
Vim Script
gpl2
33,257
" Vim completion script " Language: HTML and XHTML " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) " Last Change: 2011 Apr 28 function! htmlcomplete#CompleteTags(findstart, base) if a:findstart " locate the start of the word let line = getline('.') let start = col('.') - 1 let curline = line('.') let compl_begin = col('.') - 2 while start >= 0 && line[start - 1] =~ '\(\k\|[!:.-]\)' let start -= 1 endwhile " Handling of entities {{{ if start >= 0 && line[start - 1] =~ '&' let b:entitiescompl = 1 let b:compl_context = '' return start endif " }}} " Handling of <style> tag {{{ let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW") let styleend = searchpair('<style\>', '', '<\/style\>', "nW") if stylestart != 0 && styleend != 0 if stylestart <= curline && styleend >= curline let start = col('.') - 1 let b:csscompl = 1 while start >= 0 && line[start - 1] =~ '\(\k\|-\)' let start -= 1 endwhile endif endif " }}} " Handling of <script> tag {{{ let scriptstart = searchpair('<script\>', '', '<\/script\>', "bnW") let scriptend = searchpair('<script\>', '', '<\/script\>', "nW") if scriptstart != 0 && scriptend != 0 if scriptstart <= curline && scriptend >= curline let start = col('.') - 1 let b:jscompl = 1 let b:jsrange = [scriptstart, scriptend] while start >= 0 && line[start - 1] =~ '\k' let start -= 1 endwhile " We are inside of <script> tag. But we should also get contents " of all linked external files and (secondary, less probably) other <script> tags " This logic could possible be done in separate function - may be " reused in events scripting (also with option could be reused for " CSS let b:js_extfiles = [] let l = line('.') let c = col('.') call cursor(1,1) while search('<\@<=script\>', 'W') && line('.') <= l if synIDattr(synID(line('.'),col('.')-1,0),"name") !~? 'comment' let sname = matchstr(getline('.'), '<script[^>]*src\s*=\s*\([''"]\)\zs.\{-}\ze\1') if filereadable(sname) let b:js_extfiles += readfile(sname) endif endif endwhile call cursor(1,1) let js_scripttags = [] while search('<script\>', 'W') && line('.') < l if matchstr(getline('.'), '<script[^>]*src') == '' let js_scripttag = getline(line('.'), search('</script>', 'W')) let js_scripttags += js_scripttag endif endwhile let b:js_extfiles += js_scripttags call cursor(l,c) unlet! l c endif endif " }}} if !exists("b:csscompl") && !exists("b:jscompl") let b:compl_context = getline('.')[0:(compl_begin)] if b:compl_context !~ '<[^>]*$' " Look like we may have broken tag. Check previous lines. let i = 1 while 1 let context_line = getline(curline-i) if context_line =~ '<[^>]*$' " Yep, this is this line let context_lines = getline(curline-i, curline-1) + [b:compl_context] let b:compl_context = join(context_lines, ' ') break elseif context_line =~ '>[^<]*$' || i == curline " We are in normal tag line, no need for completion at all " OR reached first line without tag at all let b:compl_context = '' break endif let i += 1 endwhile " Make sure we don't have counter unlet! i endif let b:compl_context = matchstr(b:compl_context, '.*\zs<.*') " Return proper start for on-events. Without that beginning of " completion will be badly reported if b:compl_context =~? 'on[a-z]*\s*=\s*\(''[^'']*\|"[^"]*\)$' let start = col('.') - 1 while start >= 0 && line[start - 1] =~ '\k' let start -= 1 endwhile endif " If b:compl_context begins with <? we are inside of PHP code. It " wasn't closed so PHP completion passed it to HTML if &filetype =~? 'php' && b:compl_context =~ '^<?' let b:phpcompl = 1 let start = col('.') - 1 while start >= 0 && line[start - 1] =~ '[a-zA-Z_0-9\x7f-\xff$]' let start -= 1 endwhile endif else let b:compl_context = getline('.')[0:compl_begin] endif return start else " Initialize base return lists let res = [] let res2 = [] " a:base is very short - we need context let context = b:compl_context " Check if we should do CSS completion inside of <style> tag " or JS completion inside of <script> tag or PHP completion in case of <? " tag AND &ft==php if exists("b:csscompl") unlet! b:csscompl let context = b:compl_context unlet! b:compl_context return csscomplete#CompleteCSS(0, context) elseif exists("b:jscompl") unlet! b:jscompl return javascriptcomplete#CompleteJS(0, a:base) elseif exists("b:phpcompl") unlet! b:phpcompl let context = b:compl_context return phpcomplete#CompletePHP(0, a:base) else if len(b:compl_context) == 0 && !exists("b:entitiescompl") return [] endif let context = matchstr(b:compl_context, '.\zs.*') endif unlet! b:compl_context " Entities completion {{{ if exists("b:entitiescompl") unlet! b:entitiescompl if !exists("b:html_doctype") call htmlcomplete#CheckDoctype() endif if !exists("b:html_omni") "runtime! autoload/xml/xhtml10s.vim call htmlcomplete#LoadData() endif let entities = b:html_omni['vimxmlentities'] if len(a:base) == 1 for m in entities if m =~ '^'.a:base call add(res, m.';') endif endfor return res else for m in entities if m =~? '^'.a:base call add(res, m.';') elseif m =~? a:base call add(res2, m.';') endif endfor return res + res2 endif endif " }}} if context =~ '>' " Generally if context contains > it means we are outside of tag and " should abandon action - with one exception: <style> span { bo if context =~ 'style[^>]\{-}>[^<]\{-}$' return csscomplete#CompleteCSS(0, context) elseif context =~ 'script[^>]\{-}>[^<]\{-}$' let b:jsrange = [line('.'), search('<\/script\>', 'nW')] return javascriptcomplete#CompleteJS(0, context) else return [] endif endif " If context contains > it means we are already outside of tag and we " should abandon action " If context contains white space it is attribute. " It can be also value of attribute. " We have to get first word to offer proper completions if context == '' let tag = '' else let tag = split(context)[0] " Detect if tag is uppercase to return in proper case, " we need to make it lowercase for processing if tag =~ '^[A-Z]*$' let uppercase_tag = 1 let tag = tolower(tag) else let uppercase_tag = 0 endif endif " Get last word, it should be attr name let attr = matchstr(context, '.*\s\zs.*') " Possible situations where any prediction would be difficult: " 1. Events attributes if context =~ '\s' " Sort out style, class, and on* cases if context =~? "\\(on[a-z]*\\|id\\|style\\|class\\)\\s*=\\s*[\"']" " Id, class completion {{{ if context =~? "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$" if context =~? "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$" let search_for = "class" elseif context =~? "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$" let search_for = "id" endif " Handle class name completion " 1. Find lines of <link stylesheet> " 1a. Check file for @import " 2. Extract filename(s?) of stylesheet, call cursor(1,1) let head = getline(search('<head\>'), search('<\/head>')) let headjoined = join(copy(head), ' ') if headjoined =~ '<style' " Remove possibly confusing CSS operators let stylehead = substitute(headjoined, '+>\*[,', ' ', 'g') if search_for == 'class' let styleheadlines = split(stylehead) let headclasslines = filter(copy(styleheadlines), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'") else let stylesheet = split(headjoined, '[{}]') " Get all lines which fit id syntax let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'") " Filter out possible color definitions call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'") " Filter out complex border definitions call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'") let templines = join(classlines, ' ') let headclasslines = split(templines) call filter(headclasslines, "v:val =~ '#[a-zA-Z0-9_-]\\+'") endif let internal = 1 else let internal = 0 endif let styletable = [] let secimportfiles = [] let filestable = filter(copy(head), "v:val =~ '\\(@import\\|link.*stylesheet\\)'") for line in filestable if line =~ "@import" let styletable += [matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")] elseif line =~ "<link" let styletable += [matchstr(line, "href\\s*=\\s*[\"']\\zs\\f\\+\\ze")] endif endfor for file in styletable if filereadable(file) let stylesheet = readfile(file) let secimport = filter(copy(stylesheet), "v:val =~ '@import'") if len(secimport) > 0 for line in secimport let secfile = matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze") let secfile = fnamemodify(file, ":p:h").'/'.secfile let secimportfiles += [secfile] endfor endif endif endfor let cssfiles = styletable + secimportfiles let classes = [] for file in cssfiles let classlines = [] if filereadable(file) let stylesheet = readfile(file) let stylefile = join(stylesheet, ' ') let stylefile = substitute(stylefile, '+>\*[,', ' ', 'g') if search_for == 'class' let stylesheet = split(stylefile) let classlines = filter(copy(stylesheet), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'") else let stylesheet = split(stylefile, '[{}]') " Get all lines which fit id syntax let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'") " Filter out possible color definitions call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'") " Filter out complex border definitions call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'") let templines = join(classlines, ' ') let stylelines = split(templines) let classlines = filter(stylelines, "v:val =~ '#[a-zA-Z0-9_-]\\+'") endif endif " We gathered classes definitions from all external files let classes += classlines endfor if internal == 1 let classes += headclasslines endif if search_for == 'class' let elements = {} for element in classes if element =~ '^\.' let class = matchstr(element, '^\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze') let class = substitute(class, ':.*', '', '') if has_key(elements, 'common') let elements['common'] .= ' '.class else let elements['common'] = class endif else let class = matchstr(element, '[a-zA-Z1-6]*\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze') let tagname = tolower(matchstr(element, '[a-zA-Z1-6]*\ze.')) if tagname != '' if has_key(elements, tagname) let elements[tagname] .= ' '.class else let elements[tagname] = class endif endif endif endfor if has_key(elements, tag) && has_key(elements, 'common') let values = split(elements[tag]." ".elements['common']) elseif has_key(elements, tag) && !has_key(elements, 'common') let values = split(elements[tag]) elseif !has_key(elements, tag) && has_key(elements, 'common') let values = split(elements['common']) else return [] endif elseif search_for == 'id' " Find used IDs " 1. Catch whole file let filelines = getline(1, line('$')) " 2. Find lines with possible id let used_id_lines = filter(filelines, 'v:val =~ "id\\s*=\\s*[\"''][a-zA-Z0-9_-]\\+"') " 3a. Join all filtered lines let id_string = join(used_id_lines, ' ') " 3b. And split them to be sure each id is in separate item let id_list = split(id_string, 'id\s*=\s*') " 4. Extract id values let used_id = map(id_list, 'matchstr(v:val, "[\"'']\\zs[a-zA-Z0-9_-]\\+\\ze")') let joined_used_id = ','.join(used_id, ',').',' let allvalues = map(classes, 'matchstr(v:val, ".*#\\zs[a-zA-Z0-9_-]\\+")') let values = [] for element in classes if joined_used_id !~ ','.element.',' let values += [element] endif endfor endif " We need special version of sbase let classbase = matchstr(context, ".*[\"']") let classquote = matchstr(classbase, '.$') let entered_class = matchstr(attr, ".*=\\s*[\"']\\zs.*") for m in sort(values) if m =~? '^'.entered_class call add(res, m . classquote) elseif m =~? entered_class call add(res2, m . classquote) endif endfor return res + res2 elseif context =~? "style\\s*=\\s*[\"'][^\"']*$" return csscomplete#CompleteCSS(0, context) endif " }}} " Complete on-events {{{ if context =~? 'on[a-z]*\s*=\s*\(''[^'']*\|"[^"]*\)$' " We have to: " 1. Find external files let b:js_extfiles = [] let l = line('.') let c = col('.') call cursor(1,1) while search('<\@<=script\>', 'W') && line('.') <= l if synIDattr(synID(line('.'),col('.')-1,0),"name") !~? 'comment' let sname = matchstr(getline('.'), '<script[^>]*src\s*=\s*\([''"]\)\zs.\{-}\ze\1') if filereadable(sname) let b:js_extfiles += readfile(sname) endif endif endwhile " 2. Find at least one <script> tag call cursor(1,1) let js_scripttags = [] while search('<script\>', 'W') && line('.') < l if matchstr(getline('.'), '<script[^>]*src') == '' let js_scripttag = getline(line('.'), search('</script>', 'W')) let js_scripttags += js_scripttag endif endwhile let b:js_extfiles += js_scripttags " 3. Proper call for javascriptcomplete#CompleteJS call cursor(l,c) let js_context = matchstr(a:base, '\k\+$') let js_shortcontext = substitute(a:base, js_context.'$', '', '') let b:compl_context = context let b:jsrange = [l, l] unlet! l c return javascriptcomplete#CompleteJS(0, js_context) endif " }}} let stripbase = matchstr(context, ".*\\(on[a-zA-Z]*\\|style\\|class\\)\\s*=\\s*[\"']\\zs.*") " Now we have context stripped from all chars up to style/class. " It may fail with some strange style value combinations. if stripbase !~ "[\"']" return [] endif endif " Value of attribute completion {{{ " If attr contains =\s*[\"'] we catched value of attribute if attr =~ "=\s*[\"']" || attr =~ "=\s*$" " Let do attribute specific completion let attrname = matchstr(attr, '.*\ze\s*=') let entered_value = matchstr(attr, ".*=\\s*[\"']\\?\\zs.*") let values = [] " Load data {{{ if !exists("b:html_doctype") call htmlcomplete#CheckDoctype() endif if !exists("b:html_omni") "runtime! autoload/xml/xhtml10s.vim call htmlcomplete#LoadData() endif " }}} if attrname == 'href' " Now we are looking for local anchors defined by name or id if entered_value =~ '^#' let file = join(getline(1, line('$')), ' ') " Split it be sure there will be one id/name element in " item, it will be also first word [a-zA-Z0-9_-] in element let oneelement = split(file, "\\(meta \\)\\@<!\\(name\\|id\\)\\s*=\\s*[\"']") for i in oneelement let values += ['#'.matchstr(i, "^[a-zA-Z][a-zA-Z0-9%_-]*")] endfor endif else if has_key(b:html_omni, tag) && has_key(b:html_omni[tag][1], attrname) let values = b:html_omni[tag][1][attrname] else return [] endif endif if len(values) == 0 return [] endif " We need special version of sbase let attrbase = matchstr(context, ".*[\"']") let attrquote = matchstr(attrbase, '.$') if attrquote !~ "['\"]" let attrquoteopen = '"' let attrquote = '"' else let attrquoteopen = '' endif for m in values " This if is needed to not offer all completions as-is " alphabetically but sort them. Those beginning with entered " part will be as first choices if m =~ '^'.entered_value call add(res, attrquoteopen . m . attrquote) elseif m =~ entered_value call add(res2, attrquoteopen . m . attrquote) endif endfor return res + res2 endif " }}} " Attribute completion {{{ " Shorten context to not include last word let sbase = matchstr(context, '.*\ze\s.*') " Load data {{{ if !exists("b:html_doctype") call htmlcomplete#CheckDoctype() endif if !exists("b:html_omni") call htmlcomplete#LoadData() endif " }}} if has_key(b:html_omni, tag) let attrs = keys(b:html_omni[tag][1]) else return [] endif for m in sort(attrs) if m =~ '^'.attr call add(res, m) elseif m =~ attr call add(res2, m) endif endfor let menu = res + res2 if has_key(b:html_omni, 'vimxmlattrinfo') let final_menu = [] for i in range(len(menu)) let item = menu[i] if has_key(b:html_omni['vimxmlattrinfo'], item) let m_menu = b:html_omni['vimxmlattrinfo'][item][0] let m_info = b:html_omni['vimxmlattrinfo'][item][1] else let m_menu = '' let m_info = '' endif if len(b:html_omni[tag][1][item]) > 0 && b:html_omni[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$' let item = item let m_menu = 'Bool' else let item .= '="' endif let final_menu += [{'word':item, 'menu':m_menu, 'info':m_info}] endfor else let final_menu = [] for i in range(len(menu)) let item = menu[i] if len(b:html_omni[tag][1][item]) > 0 && b:html_omni[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$' let item = item else let item .= '="' endif let final_menu += [item] endfor return final_menu endif return final_menu endif " }}} " Close tag {{{ let b:unaryTagsStack = "base meta link hr br param img area input col" if context =~ '^\/' if context =~ '^\/.' return [] else let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack") return [opentag.">"] endif endif " }}} " Load data {{{ if !exists("b:html_doctype") call htmlcomplete#CheckDoctype() endif if !exists("b:html_omni") "runtime! autoload/xml/xhtml10s.vim call htmlcomplete#LoadData() endif " }}} " Tag completion {{{ " Deal with tag completion. let opentag = tolower(xmlcomplete#GetLastOpenTag("b:unaryTagsStack")) " MM: TODO: GLOT works always the same but with some weird situation it " behaves as intended in HTML but screws in PHP if opentag == '' || &filetype == 'php' && !has_key(b:html_omni, opentag) " Hack for sometimes failing GetLastOpenTag. " As far as I tested fail isn't GLOT fault but problem " of invalid document - not properly closed tags and other mish-mash. " Also when document is empty. Return list of *all* tags. let tags = keys(b:html_omni) call filter(tags, 'v:val !~ "^vimxml"') else if has_key(b:html_omni, opentag) let tags = b:html_omni[opentag][0] else return [] endif endif " }}} if exists("uppercase_tag") && uppercase_tag == 1 let context = tolower(context) endif " Handle XML keywords: DOCTYPE if opentag == '' let tags += [ \ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">', \ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">', \ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">', \ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">', \ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', \ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">', \ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">', \ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', \ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', \ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">', \ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml">' \ ] endif for m in sort(tags) if m =~ '^'.context call add(res, m) elseif m =~ context call add(res2, m) endif endfor let menu = res + res2 if has_key(b:html_omni, 'vimxmltaginfo') let final_menu = [] for i in range(len(menu)) let item = menu[i] if has_key(b:html_omni['vimxmltaginfo'], item) let m_menu = b:html_omni['vimxmltaginfo'][item][0] let m_info = b:html_omni['vimxmltaginfo'][item][1] else let m_menu = '' let m_info = '' endif if &filetype == 'html' && exists("uppercase_tag") && uppercase_tag == 1 && item !~ 'DOCTYPE' let item = toupper(item) endif if item =~ 'DOCTYPE' let abbr = 'DOCTYPE '.matchstr(item, 'DTD \zsX\?HTML .\{-}\ze\/\/') else let abbr = item endif let final_menu += [{'abbr':abbr, 'word':item, 'menu':m_menu, 'info':m_info}] endfor else let final_menu = menu endif return final_menu " }}} endif endfunction function! htmlcomplete#LoadData() " {{{ if !exists("b:html_omni_flavor") if &filetype == 'html' let b:html_omni_flavor = 'html401t' else let b:html_omni_flavor = 'xhtml10s' endif endif " With that if we still have bloated memory but create new buffer " variables only by linking to existing g:variable, not sourcing whole " file. if exists('g:xmldata_'.b:html_omni_flavor) exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor else exe 'runtime! autoload/xml/'.b:html_omni_flavor.'.vim' exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor endif endfunction " }}} function! htmlcomplete#CheckDoctype() " {{{ if exists('b:html_omni_flavor') let old_flavor = b:html_omni_flavor else let old_flavor = '' endif let i = 1 while i < 10 && i < line("$") let line = getline(i) if line =~ '<!DOCTYPE.*\<DTD HTML 3\.2' let b:html_omni_flavor = 'html32' let b:html_doctype = 1 break elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0 Transitional' let b:html_omni_flavor = 'html40t' let b:html_doctype = 1 break elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0 Frameset' let b:html_omni_flavor = 'html40f' let b:html_doctype = 1 break elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0' let b:html_omni_flavor = 'html40s' let b:html_doctype = 1 break elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01 Transitional' let b:html_omni_flavor = 'html401t' let b:html_doctype = 1 break elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01 Frameset' let b:html_omni_flavor = 'html401f' let b:html_doctype = 1 break elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01' let b:html_omni_flavor = 'html401s' let b:html_doctype = 1 break elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Transitional' let b:html_omni_flavor = 'xhtml10t' let b:html_doctype = 1 break elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Frameset' let b:html_omni_flavor = 'xhtml10f' let b:html_doctype = 1 break elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Strict' let b:html_omni_flavor = 'xhtml10s' let b:html_doctype = 1 break elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.1' let b:html_omni_flavor = 'xhtml11' let b:html_doctype = 1 break endif let i += 1 endwhile if !exists("b:html_doctype") return else " Tie g:xmldata with b:html_omni this way we need to sourca data file only " once, not every time per buffer. if old_flavor == b:html_omni_flavor return else if exists('g:xmldata_'.b:html_omni_flavor) exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor else exe 'runtime! autoload/xml/'.b:html_omni_flavor.'.vim' exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor endif return endif endif endfunction " }}} " vim:set foldmethod=marker:
zyz2011-vim
runtime/autoload/htmlcomplete.vim
Vim Script
gpl2
24,280
"------------------------------------------------------------------------------ " Description: Vim Ada/Dec Ada compiler file " Language: Ada (Dec Ada) " $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: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 " $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 " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces " Help Page: compiler-decada "------------------------------------------------------------------------------ if version < 700 finish endif function decada#Unit_Name () dict " {{{1 " Convert filename into acs unit: " 1: remove the file extenstion. " 2: replace all double '_' or '-' with an dot (which denotes a separate) " 3: remove a trailing '_' (wich denotes a specification) return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '') endfunction decada#Unit_Name " }}}1 function decada#Make () dict " {{{1 let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '') let &errorformat = g:self.Error_Format let &makeprg = l:make_prg wall make copen set wrap wincmd W endfunction decada#Build " }}}1 function decada#Set_Session (...) dict " {{{1 if a:0 > 0 call ada#Switch_Session (a:1) elseif argc() == 0 && strlen (v:servername) > 0 call ada#Switch_Session ( \ expand('~')[0:-2] . ".vimfiles.session]decada_" . \ v:servername . ".vim") endif return endfunction decada#Set_Session " }}}1 function decada#New () " }}}1 let Retval = { \ 'Make' : function ('decada#Make'), \ 'Unit_Name' : function ('decada#Unit_Name'), \ 'Set_Session' : function ('decada#Set_Session'), \ 'Project_Dir' : '', \ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<', \ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' . \ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'} return Retval endfunction decada#New " }}}1 finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker
zyz2011-vim
runtime/autoload/decada.vim
Vim Script
gpl2
2,998
" Vim completion script " Language: Ruby " Maintainer: Mark Guzman <segfault@hasno.info> " Last Change: 2009 Sep 28 " URL: http://vim-ruby.rubyforge.org " Anon CVS: See above site " Release Coordinator: Doug Kearns <dougkearns@gmail.com> " Maintainer Version: 0.8.1 " ---------------------------------------------------------------------------- " " Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com) " ---------------------------------------------------------------------------- " {{{ requirement checks if !has('ruby') s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" ) s:ErrMsg( "Error: falling back to syntax completion" ) " lets fall back to syntax completion setlocal omnifunc=syntaxcomplete#Complete finish endif if version < 700 s:ErrMsg( "Error: Required vim >= 7.0" ) finish endif " }}} requirement checks " {{{ configuration failsafe initialization if !exists("g:rubycomplete_rails") let g:rubycomplete_rails = 0 endif if !exists("g:rubycomplete_classes_in_global") let g:rubycomplete_classes_in_global = 0 endif if !exists("g:rubycomplete_buffer_loading") let g:rubycomplete_buffer_loading = 0 endif if !exists("g:rubycomplete_include_object") let g:rubycomplete_include_object = 0 endif if !exists("g:rubycomplete_include_objectspace") let g:rubycomplete_include_objectspace = 0 endif " }}} configuration failsafe initialization " {{{ vim-side support functions let s:rubycomplete_debug = 0 function! s:ErrMsg(msg) echohl ErrorMsg echo a:msg echohl None endfunction function! s:dprint(msg) if s:rubycomplete_debug == 1 echom a:msg endif endfunction function! s:GetBufferRubyModule(name, ...) if a:0 == 1 let [snum,enum] = s:GetBufferRubyEntity(a:name, "module", a:1) else let [snum,enum] = s:GetBufferRubyEntity(a:name, "module") endif return snum . '..' . enum endfunction function! s:GetBufferRubyClass(name, ...) if a:0 >= 1 let [snum,enum] = s:GetBufferRubyEntity(a:name, "class", a:1) else let [snum,enum] = s:GetBufferRubyEntity(a:name, "class") endif return snum . '..' . enum endfunction function! s:GetBufferRubySingletonMethods(name) endfunction function! s:GetBufferRubyEntity( name, type, ... ) let lastpos = getpos(".") let lastline = lastpos if (a:0 >= 1) let lastline = [ 0, a:1, 0, 0 ] call cursor( a:1, 0 ) endif let stopline = 1 let crex = '^\s*\<' . a:type . '\>\s*\<' . a:name . '\>\s*\(<\s*.*\s*\)\?' let [lnum,lcol] = searchpos( crex, 'w' ) "let [lnum,lcol] = searchpairpos( crex . '\zs', '', '\(end\|}\)', 'w' ) if lnum == 0 && lcol == 0 call cursor(lastpos[1], lastpos[2]) return [0,0] endif let curpos = getpos(".") let [enum,ecol] = searchpairpos( crex, '', '\(end\|}\)', 'wr' ) call cursor(lastpos[1], lastpos[2]) if lnum > enum return [0,0] endif " we found a the class def return [lnum,enum] endfunction function! s:IsInClassDef() return s:IsPosInClassDef( line('.') ) endfunction function! s:IsPosInClassDef(pos) let [snum,enum] = s:GetBufferRubyEntity( '.*', "class" ) let ret = 'nil' if snum < a:pos && a:pos < enum let ret = snum . '..' . enum endif return ret endfunction function! s:GetRubyVarType(v) let stopline = 1 let vtp = '' let pos = getpos('.') let sstr = '^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$' let [lnum,lcol] = searchpos(sstr,'nb',stopline) if lnum != 0 && lcol != 0 call setpos('.',pos) let str = getline(lnum) let vtp = substitute(str,sstr,'\1','') return vtp endif call setpos('.',pos) let ctors = '\(now\|new\|open\|get_instance' if exists('g:rubycomplete_rails') && g:rubycomplete_rails == 1 && s:rubycomplete_rails_loaded == 1 let ctors = ctors.'\|find\|create' else endif let ctors = ctors.'\)' let fstr = '=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%[xwQqr][(\[{@]\|[A-Za-z0-9@:\-()\.]\+...\?\|lambda\|&\)' let sstr = ''.a:v.'\>\s*[+\-*/]*'.fstr let [lnum,lcol] = searchpos(sstr,'nb',stopline) if lnum != 0 && lcol != 0 let str = matchstr(getline(lnum),fstr,lcol) let str = substitute(str,'^=\s*','','') call setpos('.',pos) if str == '"' || str == '''' || stridx(tolower(str), '%q[') != -1 return 'String' elseif str == '[' || stridx(str, '%w[') != -1 return 'Array' elseif str == '{' return 'Hash' elseif str == '/' || str == '%r{' return 'Regexp' elseif strlen(str) >= 4 && stridx(str,'..') != -1 return 'Range' elseif stridx(str, 'lambda') != -1 || str == '&' return 'Proc' elseif strlen(str) > 4 let l = stridx(str,'.') return str[0:l-1] end return '' endif call setpos('.',pos) return '' endfunction "}}} vim-side support functions "{{{ vim-side completion function function! rubycomplete#Init() execute "ruby VimRubyCompletion.preload_rails" endfunction function! rubycomplete#Complete(findstart, base) "findstart = 1 when we need to get the text length if a:findstart let line = getline('.') let idx = col('.') while idx > 0 let idx -= 1 let c = line[idx-1] if c =~ '\w' continue elseif ! c =~ '\.' idx = -1 break else break endif endwhile return idx "findstart = 0 when we need to return the list of completions else let g:rubycomplete_completions = [] execute "ruby VimRubyCompletion.get_completions('" . a:base . "')" return g:rubycomplete_completions endif endfunction "}}} vim-side completion function "{{{ ruby-side code function! s:DefRuby() ruby << RUBYEOF # {{{ ruby completion begin require 'rubygems' # let's assume this is safe...? rescue Exception #ignore? end class VimRubyCompletion # {{{ constants @@debug = false @@ReservedWords = [ "BEGIN", "END", "alias", "and", "begin", "break", "case", "class", "def", "defined", "do", "else", "elsif", "end", "ensure", "false", "for", "if", "in", "module", "next", "nil", "not", "or", "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless", "until", "when", "while", "yield", ] @@Operators = [ "%", "&", "*", "**", "+", "-", "/", "<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>", "[]", "[]=", "^", ] # }}} constants # {{{ buffer analysis magic def load_requires buf = VIM::Buffer.current enum = buf.line_number nums = Range.new( 1, enum ) nums.each do |x| ln = buf[x] begin eval( "require %s" % $1 ) if /.*require\s*(.*)$/.match( ln ) rescue Exception #ignore? end end end def load_buffer_class(name) dprint "load_buffer_class(%s) START" % name classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")') return if classdef == nil pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef ) load_buffer_class( $2 ) if pare != nil && $2 != name # load parent class if needed mixre = /.*\n\s*include\s*(.*)\s*\n/.match( classdef ) load_buffer_module( $2 ) if mixre != nil && $2 != name # load mixins if needed begin eval classdef rescue Exception VIM::evaluate( "s:ErrMsg( 'Problem loading class \"%s\", was it already completed?' )" % name ) end dprint "load_buffer_class(%s) END" % name end def load_buffer_module(name) dprint "load_buffer_module(%s) START" % name classdef = get_buffer_entity(name, 's:GetBufferRubyModule("%s")') return if classdef == nil begin eval classdef rescue Exception VIM::evaluate( "s:ErrMsg( 'Problem loading module \"%s\", was it already completed?' )" % name ) end dprint "load_buffer_module(%s) END" % name end def get_buffer_entity(name, vimfun) loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") return nil if loading_allowed.to_i.zero? return nil if /(\"|\')+/.match( name ) buf = VIM::Buffer.current nums = eval( VIM::evaluate( vimfun % name ) ) return nil if nums == nil return nil if nums.min == nums.max && nums.min == 0 dprint "get_buffer_entity START" visited = [] clscnt = 0 bufname = VIM::Buffer.current.name classdef = "" cur_line = VIM::Buffer.current.line_number while (nums != nil && !(nums.min == 0 && nums.max == 0) ) dprint "visited: %s" % visited.to_s break if visited.index( nums ) visited << nums nums.each do |x| if x != cur_line next if x == 0 ln = buf[x] if /^\s*(module|class|def|include)\s+/.match(ln) clscnt += 1 if $1 == "class" #dprint "\$1$1 classdef += "%s\n" % ln classdef += "end\n" if /def\s+/.match(ln) dprint ln end end end nm = "%s(::.*)*\", %s, \"" % [ name, nums.last ] nums = eval( VIM::evaluate( vimfun % nm ) ) dprint "nm: \"%s\"" % nm dprint "vimfun: %s" % (vimfun % nm) dprint "got nums: %s" % nums.to_s end if classdef.length > 1 classdef += "end\n"*clscnt # classdef = "class %s\n%s\nend\n" % [ bufname.gsub( /\/|\\/, "_" ), classdef ] end dprint "get_buffer_entity END" dprint "classdef====start" lns = classdef.split( "\n" ) lns.each { |x| dprint x } dprint "classdef====end" return classdef end def get_var_type( receiver ) if /(\"|\')+/.match( receiver ) "String" else VIM::evaluate("s:GetRubyVarType('%s')" % receiver) end end def dprint( txt ) print txt if @@debug end def get_buffer_entity_list( type ) # this will be a little expensive. loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") allow_aggressive_load = VIM::evaluate("exists('g:rubycomplete_classes_in_global') && g:rubycomplete_classes_in_global") return [] if allow_aggressive_load.to_i.zero? || loading_allowed.to_i.zero? buf = VIM::Buffer.current eob = buf.length ret = [] rg = 1..eob re = eval( "/^\s*%s\s*([A-Za-z0-9_:-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*/" % type ) rg.each do |x| if re.match( buf[x] ) next if type == "def" && eval( VIM::evaluate("s:IsPosInClassDef(%s)" % x) ) != nil ret.push $1 end end return ret end def get_buffer_modules return get_buffer_entity_list( "modules" ) end def get_buffer_methods return get_buffer_entity_list( "def" ) end def get_buffer_classes return get_buffer_entity_list( "class" ) end def load_rails allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") return if allow_rails.to_i.zero? buf_path = VIM::evaluate('expand("%:p")') file_name = VIM::evaluate('expand("%:t")') vim_dir = VIM::evaluate('getcwd()') file_dir = buf_path.gsub( file_name, '' ) file_dir.gsub!( /\\/, "/" ) vim_dir.gsub!( /\\/, "/" ) vim_dir << "/" dirs = [ vim_dir, file_dir ] sdirs = [ "", "./", "../", "../../", "../../../", "../../../../" ] rails_base = nil dirs.each do |dir| sdirs.each do |sub| trail = "%s%s" % [ dir, sub ] tcfg = "%sconfig" % trail if File.exists?( tcfg ) rails_base = trail break end end break if rails_base end return if rails_base == nil $:.push rails_base unless $:.index( rails_base ) rails_config = rails_base + "config/" rails_lib = rails_base + "lib/" $:.push rails_config unless $:.index( rails_config ) $:.push rails_lib unless $:.index( rails_lib ) bootfile = rails_config + "boot.rb" envfile = rails_config + "environment.rb" if File.exists?( bootfile ) && File.exists?( envfile ) begin require bootfile require envfile begin require 'console_app' require 'console_with_helpers' rescue Exception dprint "Rails 1.1+ Error %s" % $! # assume 1.0 end #eval( "Rails::Initializer.run" ) #not necessary? VIM::command('let s:rubycomplete_rails_loaded = 1') dprint "rails loaded" rescue Exception dprint "Rails Error %s" % $! VIM::evaluate( "s:ErrMsg('Error loading rails environment')" ) end end end def get_rails_helpers allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? buf_path = VIM::evaluate('expand("%:p")') buf_path.gsub!( /\\/, "/" ) path_elm = buf_path.split( "/" ) dprint "buf_path: %s" % buf_path types = [ "app", "db", "lib", "test", "components", "script" ] i = nil ret = [] type = nil types.each do |t| i = path_elm.index( t ) break if i end type = path_elm[i] type.downcase! dprint "type: %s" % type case type when "app" i += 1 subtype = path_elm[i] subtype.downcase! dprint "subtype: %s" % subtype case subtype when "views" ret += ActionView::Base.instance_methods ret += ActionView::Base.methods when "controllers" ret += ActionController::Base.instance_methods ret += ActionController::Base.methods when "models" ret += ActiveRecord::Base.instance_methods ret += ActiveRecord::Base.methods end when "db" ret += ActiveRecord::ConnectionAdapters::SchemaStatements.instance_methods ret += ActiveRecord::ConnectionAdapters::SchemaStatements.methods end return ret end def add_rails_columns( cls ) allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? begin eval( "#{cls}.establish_connection" ) return [] unless eval( "#{cls}.ancestors.include?(ActiveRecord::Base).to_s" ) col = eval( "#{cls}.column_names" ) return col if col rescue dprint "add_rails_columns err: (cls: %s) %s" % [ cls, $! ] return [] end return [] end def clean_sel(sel, msg) sel.delete_if { |x| x == nil } sel.uniq! sel.grep(/^#{Regexp.quote(msg)}/) if msg != nil end def get_rails_view_methods allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? buf_path = VIM::evaluate('expand("%:p")') buf_path.gsub!( /\\/, "/" ) pelm = buf_path.split( "/" ) idx = pelm.index( "views" ) return [] unless idx idx += 1 clspl = pelm[idx].camelize.pluralize cls = clspl.singularize ret = [] begin ret += eval( "#{cls}.instance_methods" ) ret += eval( "#{clspl}Helper.instance_methods" ) rescue Exception dprint "Error: Unable to load rails view helpers for %s: %s" % [ cls, $! ] end return ret end # }}} buffer analysis magic # {{{ main completion code def self.preload_rails a = VimRubyCompletion.new require 'Thread' Thread.new(a) do |b| begin b.load_rails rescue end end a.load_rails rescue end def self.get_completions(base) b = VimRubyCompletion.new b.get_completions base end def get_completions(base) loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") if loading_allowed.to_i == 1 load_requires load_rails end input = VIM::Buffer.current.line cpos = VIM::Window.current.cursor[1] - 1 input = input[0..cpos] input += base input.sub!(/.*[ \t\n\"\\'`><=;|&{(]/, '') # Readline.basic_word_break_characters input.sub!(/self\./, '') input.sub!(/.*((\.\.[\[(]?)|([\[(]))/, '') dprint 'input %s' % input message = nil receiver = nil methods = [] variables = [] classes = [] constants = [] case input when /^(\/[^\/]*\/)\.([^.]*)$/ # Regexp receiver = $1 message = Regexp.quote($2) methods = Regexp.instance_methods(true) when /^([^\]]*\])\.([^.]*)$/ # Array receiver = $1 message = Regexp.quote($2) methods = Array.instance_methods(true) when /^([^\}]*\})\.([^.]*)$/ # Proc or Hash receiver = $1 message = Regexp.quote($2) methods = Proc.instance_methods(true) | Hash.instance_methods(true) when /^(:[^:.]*)$/ # Symbol dprint "symbol" if Symbol.respond_to?(:all_symbols) receiver = $1 message = $1.sub( /:/, '' ) methods = Symbol.all_symbols.collect{|s| s.id2name} methods.delete_if { |c| c.match( /'/ ) } end when /^::([A-Z][^:\.\(]*)$/ # Absolute Constant or class methods dprint "const or cls" receiver = $1 methods = Object.constants methods.grep(/^#{receiver}/).collect{|e| "::" + e} when /^(((::)?[A-Z][^:.\(]*)+?)::?([^:.]*)$/ # Constant or class methods receiver = $1 message = Regexp.quote($4) dprint "const or cls 2 [recv: \'%s\', msg: \'%s\']" % [ receiver, message ] load_buffer_class( receiver ) begin classes = eval("#{receiver}.constants") #methods = eval("#{receiver}.methods") rescue Exception dprint "exception: %s" % $! methods = [] end methods.grep(/^#{message}/).collect{|e| receiver + "::" + e} when /^(:[^:.]+)\.([^.]*)$/ # Symbol dprint "symbol" receiver = $1 message = Regexp.quote($2) methods = Symbol.instance_methods(true) when /^([0-9_]+(\.[0-9_]+)?(e[0-9]+)?)\.([^.]*)$/ # Numeric dprint "numeric" receiver = $1 message = Regexp.quote($4) begin methods = eval(receiver).methods rescue Exception methods = [] end when /^(\$[^.]*)$/ #global dprint "global" methods = global_variables.grep(Regexp.new(Regexp.quote($1))) when /^((\.?[^.]+)+?)\.([^.]*)$/ # variable dprint "variable" receiver = $1 message = Regexp.quote($3) load_buffer_class( receiver ) cv = eval("self.class.constants") vartype = get_var_type( receiver ) dprint "vartype: %s" % vartype if vartype != '' load_buffer_class( vartype ) begin methods = eval("#{vartype}.instance_methods") variables = eval("#{vartype}.instance_variables") rescue Exception dprint "load_buffer_class err: %s" % $! end elsif (cv).include?(receiver) # foo.func and foo is local var. methods = eval("#{receiver}.methods") vartype = receiver elsif /^[A-Z]/ =~ receiver and /\./ !~ receiver vartype = receiver # Foo::Bar.func begin methods = eval("#{receiver}.methods") rescue Exception end else # func1.func2 ObjectSpace.each_object(Module){|m| next if m.name != "IRB::Context" and /^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name methods.concat m.instance_methods(false) } end variables += add_rails_columns( "#{vartype}" ) if vartype && vartype.length > 0 when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/ message = $1 methods = Range.instance_methods(true) when /^\.([^.]*)$/ # unknown(maybe String) message = Regexp.quote($1) methods = String.instance_methods(true) else dprint "default/other" inclass = eval( VIM::evaluate("s:IsInClassDef()") ) if inclass != nil dprint "inclass" classdef = "%s\n" % VIM::Buffer.current[ inclass.min ] found = /^\s*class\s*([A-Za-z0-9_-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*\n$/.match( classdef ) if found != nil receiver = $1 message = input load_buffer_class( receiver ) begin methods = eval( "#{receiver}.instance_methods" ) variables += add_rails_columns( "#{receiver}" ) rescue Exception found = nil end end end if inclass == nil || found == nil dprint "inclass == nil" methods = get_buffer_methods methods += get_rails_view_methods cls_const = Class.constants constants = cls_const.select { |c| /^[A-Z_-]+$/.match( c ) } classes = eval("self.class.constants") - constants classes += get_buffer_classes classes += get_buffer_modules include_objectspace = VIM::evaluate("exists('g:rubycomplete_include_objectspace') && g:rubycomplete_include_objectspace") ObjectSpace.each_object(Class) { |cls| classes << cls.to_s } if include_objectspace == "1" message = receiver = input end methods += get_rails_helpers methods += Kernel.public_methods end include_object = VIM::evaluate("exists('g:rubycomplete_include_object') && g:rubycomplete_include_object") methods = clean_sel( methods, message ) methods = (methods-Object.instance_methods) if include_object == "0" rbcmeth = (VimRubyCompletion.instance_methods-Object.instance_methods) # lets remove those rubycomplete methods methods = (methods-rbcmeth) variables = clean_sel( variables, message ) classes = clean_sel( classes, message ) - ["VimRubyCompletion"] constants = clean_sel( constants, message ) valid = [] valid += methods.collect { |m| { :name => m, :type => 'm' } } valid += variables.collect { |v| { :name => v, :type => 'v' } } valid += classes.collect { |c| { :name => c, :type => 't' } } valid += constants.collect { |d| { :name => d, :type => 'd' } } valid.sort! { |x,y| x[:name] <=> y[:name] } outp = "" rg = 0..valid.length rg.step(150) do |x| stpos = 0+x enpos = 150+x valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ] } outp.sub!(/,$/, '') VIM::command("call extend(g:rubycomplete_completions, [%s])" % outp) outp = "" end end # }}} main completion code end # VimRubyCompletion # }}} ruby completion RUBYEOF endfunction let s:rubycomplete_rails_loaded = 0 call s:DefRuby() "}}} ruby-side code " vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl:
zyz2011-vim
runtime/autoload/rubycomplete.vim
Vim Script
gpl2
23,443
" Vim autoload file for the tohtml plugin. " Maintainer: Ben Fritz <fritzophrenic@gmail.com> " Last Change: 2011 Apr 05 " " Additional contributors: " " Original by Bram Moolenaar <Bram@vim.org> " Diff2HTML() added by Christian Brabandt <cb@256bit.org> " " See Mercurial change logs for more! " this file uses line continuations let s:cpo_sav = &cpo set cpo-=C " Automatically find charsets from all encodings supported natively by Vim. With " the 8bit- and 2byte- prefixes, Vim can actually support more encodings than " this. Let the user specify these however since they won't be supported on " every system. " " Note, not all of Vim's supported encodings have a charset to use. " " Names in this list are from: " http://www.iana.org/assignments/character-sets " g:tohtml#encoding_to_charset: {{{ let g:tohtml#encoding_to_charset = { \ 'latin1' : 'ISO-8859-1', \ 'iso-8859-2' : 'ISO-8859-2', \ 'iso-8859-3' : 'ISO-8859-3', \ 'iso-8859-4' : 'ISO-8859-4', \ 'iso-8859-5' : 'ISO-8859-5', \ 'iso-8859-6' : 'ISO-8859-6', \ 'iso-8859-7' : 'ISO-8859-7', \ 'iso-8859-8' : 'ISO-8859-8', \ 'iso-8859-9' : 'ISO-8859-9', \ 'iso-8859-10' : '', \ 'iso-8859-13' : 'ISO-8859-13', \ 'iso-8859-14' : '', \ 'iso-8859-15' : 'ISO-8859-15', \ 'koi8-r' : 'KOI8-R', \ 'koi8-u' : 'KOI8-U', \ 'macroman' : 'macintosh', \ 'cp437' : '', \ 'cp775' : '', \ 'cp850' : '', \ 'cp852' : '', \ 'cp855' : '', \ 'cp857' : '', \ 'cp860' : '', \ 'cp861' : '', \ 'cp862' : '', \ 'cp863' : '', \ 'cp865' : '', \ 'cp866' : 'IBM866', \ 'cp869' : '', \ 'cp874' : '', \ 'cp1250' : 'windows-1250', \ 'cp1251' : 'windows-1251', \ 'cp1253' : 'windows-1253', \ 'cp1254' : 'windows-1254', \ 'cp1255' : 'windows-1255', \ 'cp1256' : 'windows-1256', \ 'cp1257' : 'windows-1257', \ 'cp1258' : 'windows-1258', \ 'euc-jp' : 'EUC-JP', \ 'sjis' : 'Shift_JIS', \ 'cp932' : 'Shift_JIS', \ 'cp949' : '', \ 'euc-kr' : 'EUC-KR', \ 'cp936' : 'GBK', \ 'euc-cn' : 'GB2312', \ 'big5' : 'Big5', \ 'cp950' : 'Big5', \ 'utf-8' : 'UTF-8', \ 'ucs-2' : 'UTF-8', \ 'ucs-2le' : 'UTF-8', \ 'utf-16' : 'UTF-8', \ 'utf-16le' : 'UTF-8', \ 'ucs-4' : 'UTF-8', \ 'ucs-4le' : 'UTF-8', \ } lockvar g:tohtml#encoding_to_charset " Notes: " 1. All UCS/UTF are converted to UTF-8 because it is much better supported " 2. Any blank spaces are there because Vim supports it but at least one major " web browser does not according to http://wiki.whatwg.org/wiki/Web_Encodings. " }}} " Only automatically find encodings supported natively by Vim, let the user " specify the encoding if it's not natively supported. This function is only " used when the user specifies the charset, they better know what they are " doing! " " Names in this list are from: " http://www.iana.org/assignments/character-sets " g:tohtml#charset_to_encoding: {{{ let g:tohtml#charset_to_encoding = { \ 'iso_8859-1:1987' : 'latin1', \ 'iso-ir-100' : 'latin1', \ 'iso_8859-1' : 'latin1', \ 'iso-8859-1' : 'latin1', \ 'latin1' : 'latin1', \ 'l1' : 'latin1', \ 'ibm819' : 'latin1', \ 'cp819' : 'latin1', \ 'csisolatin1' : 'latin1', \ 'iso_8859-2:1987' : 'iso-8859-2', \ 'iso-ir-101' : 'iso-8859-2', \ 'iso_8859-2' : 'iso-8859-2', \ 'iso-8859-2' : 'iso-8859-2', \ 'latin2' : 'iso-8859-2', \ 'l2' : 'iso-8859-2', \ 'csisolatin2' : 'iso-8859-2', \ 'iso_8859-3:1988' : 'iso-8859-3', \ 'iso-ir-109' : 'iso-8859-3', \ 'iso_8859-3' : 'iso-8859-3', \ 'iso-8859-3' : 'iso-8859-3', \ 'latin3' : 'iso-8859-3', \ 'l3' : 'iso-8859-3', \ 'csisolatin3' : 'iso-8859-3', \ 'iso_8859-4:1988' : 'iso-8859-4', \ 'iso-ir-110' : 'iso-8859-4', \ 'iso_8859-4' : 'iso-8859-4', \ 'iso-8859-4' : 'iso-8859-4', \ 'latin4' : 'iso-8859-4', \ 'l4' : 'iso-8859-4', \ 'csisolatin4' : 'iso-8859-4', \ 'iso_8859-5:1988' : 'iso-8859-5', \ 'iso-ir-144' : 'iso-8859-5', \ 'iso_8859-5' : 'iso-8859-5', \ 'iso-8859-5' : 'iso-8859-5', \ 'cyrillic' : 'iso-8859-5', \ 'csisolatincyrillic' : 'iso-8859-5', \ 'iso_8859-6:1987' : 'iso-8859-6', \ 'iso-ir-127' : 'iso-8859-6', \ 'iso_8859-6' : 'iso-8859-6', \ 'iso-8859-6' : 'iso-8859-6', \ 'ecma-114' : 'iso-8859-6', \ 'asmo-708' : 'iso-8859-6', \ 'arabic' : 'iso-8859-6', \ 'csisolatinarabic' : 'iso-8859-6', \ 'iso_8859-7:1987' : 'iso-8859-7', \ 'iso-ir-126' : 'iso-8859-7', \ 'iso_8859-7' : 'iso-8859-7', \ 'iso-8859-7' : 'iso-8859-7', \ 'elot_928' : 'iso-8859-7', \ 'ecma-118' : 'iso-8859-7', \ 'greek' : 'iso-8859-7', \ 'greek8' : 'iso-8859-7', \ 'csisolatingreek' : 'iso-8859-7', \ 'iso_8859-8:1988' : 'iso-8859-8', \ 'iso-ir-138' : 'iso-8859-8', \ 'iso_8859-8' : 'iso-8859-8', \ 'iso-8859-8' : 'iso-8859-8', \ 'hebrew' : 'iso-8859-8', \ 'csisolatinhebrew' : 'iso-8859-8', \ 'iso_8859-9:1989' : 'iso-8859-9', \ 'iso-ir-148' : 'iso-8859-9', \ 'iso_8859-9' : 'iso-8859-9', \ 'iso-8859-9' : 'iso-8859-9', \ 'latin5' : 'iso-8859-9', \ 'l5' : 'iso-8859-9', \ 'csisolatin5' : 'iso-8859-9', \ 'iso-8859-10' : 'iso-8859-10', \ 'iso-ir-157' : 'iso-8859-10', \ 'l6' : 'iso-8859-10', \ 'iso_8859-10:1992' : 'iso-8859-10', \ 'csisolatin6' : 'iso-8859-10', \ 'latin6' : 'iso-8859-10', \ 'iso-8859-13' : 'iso-8859-13', \ 'iso-8859-14' : 'iso-8859-14', \ 'iso-ir-199' : 'iso-8859-14', \ 'iso_8859-14:1998' : 'iso-8859-14', \ 'iso_8859-14' : 'iso-8859-14', \ 'latin8' : 'iso-8859-14', \ 'iso-celtic' : 'iso-8859-14', \ 'l8' : 'iso-8859-14', \ 'iso-8859-15' : 'iso-8859-15', \ 'iso_8859-15' : 'iso-8859-15', \ 'latin-9' : 'iso-8859-15', \ 'koi8-r' : 'koi8-r', \ 'cskoi8r' : 'koi8-r', \ 'koi8-u' : 'koi8-u', \ 'macintosh' : 'macroman', \ 'mac' : 'macroman', \ 'csmacintosh' : 'macroman', \ 'ibm437' : 'cp437', \ 'cp437' : 'cp437', \ '437' : 'cp437', \ 'cspc8codepage437' : 'cp437', \ 'ibm775' : 'cp775', \ 'cp775' : 'cp775', \ 'cspc775baltic' : 'cp775', \ 'ibm850' : 'cp850', \ 'cp850' : 'cp850', \ '850' : 'cp850', \ 'cspc850multilingual' : 'cp850', \ 'ibm852' : 'cp852', \ 'cp852' : 'cp852', \ '852' : 'cp852', \ 'cspcp852' : 'cp852', \ 'ibm855' : 'cp855', \ 'cp855' : 'cp855', \ '855' : 'cp855', \ 'csibm855' : 'cp855', \ 'ibm857' : 'cp857', \ 'cp857' : 'cp857', \ '857' : 'cp857', \ 'csibm857' : 'cp857', \ 'ibm860' : 'cp860', \ 'cp860' : 'cp860', \ '860' : 'cp860', \ 'csibm860' : 'cp860', \ 'ibm861' : 'cp861', \ 'cp861' : 'cp861', \ '861' : 'cp861', \ 'cp-is' : 'cp861', \ 'csibm861' : 'cp861', \ 'ibm862' : 'cp862', \ 'cp862' : 'cp862', \ '862' : 'cp862', \ 'cspc862latinhebrew' : 'cp862', \ 'ibm863' : 'cp863', \ 'cp863' : 'cp863', \ '863' : 'cp863', \ 'csibm863' : 'cp863', \ 'ibm865' : 'cp865', \ 'cp865' : 'cp865', \ '865' : 'cp865', \ 'csibm865' : 'cp865', \ 'ibm866' : 'cp866', \ 'cp866' : 'cp866', \ '866' : 'cp866', \ 'csibm866' : 'cp866', \ 'ibm869' : 'cp869', \ 'cp869' : 'cp869', \ '869' : 'cp869', \ 'cp-gr' : 'cp869', \ 'csibm869' : 'cp869', \ 'windows-1250' : 'cp1250', \ 'windows-1251' : 'cp1251', \ 'windows-1253' : 'cp1253', \ 'windows-1254' : 'cp1254', \ 'windows-1255' : 'cp1255', \ 'windows-1256' : 'cp1256', \ 'windows-1257' : 'cp1257', \ 'windows-1258' : 'cp1258', \ 'extended_unix_code_packed_format_for_japanese' : 'euc-jp', \ 'cseucpkdfmtjapanese' : 'euc-jp', \ 'euc-jp' : 'euc-jp', \ 'shift_jis' : 'sjis', \ 'ms_kanji' : 'sjis', \ 'sjis' : 'sjis', \ 'csshiftjis' : 'sjis', \ 'ibm-thai' : 'cp874', \ 'csibmthai' : 'cp874', \ 'ks_c_5601-1987' : 'cp949', \ 'iso-ir-149' : 'cp949', \ 'ks_c_5601-1989' : 'cp949', \ 'ksc_5601' : 'cp949', \ 'korean' : 'cp949', \ 'csksc56011987' : 'cp949', \ 'euc-kr' : 'euc-kr', \ 'cseuckr' : 'euc-kr', \ 'gbk' : 'cp936', \ 'cp936' : 'cp936', \ 'ms936' : 'cp936', \ 'windows-936' : 'cp936', \ 'gb_2312-80' : 'euc-cn', \ 'iso-ir-58' : 'euc-cn', \ 'chinese' : 'euc-cn', \ 'csiso58gb231280' : 'euc-cn', \ 'big5' : 'big5', \ 'csbig5' : 'big5', \ 'utf-8' : 'utf-8', \ 'iso-10646-ucs-2' : 'ucs-2', \ 'csunicode' : 'ucs-2', \ 'utf-16' : 'utf-16', \ 'utf-16be' : 'utf-16', \ 'utf-16le' : 'utf-16le', \ 'utf-32' : 'ucs-4', \ 'utf-32be' : 'ucs-4', \ 'utf-32le' : 'ucs-4le', \ 'iso-10646-ucs-4' : 'ucs-4', \ 'csucs4' : 'ucs-4' \ } lockvar g:tohtml#charset_to_encoding "}}} func! tohtml#Convert2HTML(line1, line2) "{{{ let s:settings = tohtml#GetUserSettings() if !&diff || s:settings.diff_one_file "{{{ if a:line2 >= a:line1 let g:html_start_line = a:line1 let g:html_end_line = a:line2 else let g:html_start_line = a:line2 let g:html_end_line = a:line1 endif runtime syntax/2html.vim "}}} else "{{{ let win_list = [] let buf_list = [] windo | if &diff | call add(win_list, winbufnr(0)) | endif let s:settings.whole_filler = 1 let g:html_diff_win_num = 0 for window in win_list " switch to the next buffer to convert exe ":" . bufwinnr(window) . "wincmd w" " figure out whether current charset and encoding will work, if not " default to UTF-8 if !exists('g:html_use_encoding') && \ (((&l:fileencoding=='' || (&l:buftype!='' && &l:buftype!=?'help')) \ && &encoding!=?s:settings.vim_encoding) \ || &l:fileencoding!='' && &l:fileencoding!=?s:settings.vim_encoding) echohl WarningMsg echomsg "TOhtml: mismatched file encodings in Diff buffers, using UTF-8" echohl None let s:settings.vim_encoding = 'utf-8' let s:settings.encoding = 'UTF-8' endif " set up for diff-mode conversion let g:html_start_line = 1 let g:html_end_line = line('$') let g:html_diff_win_num += 1 " convert this file runtime syntax/2html.vim " remember the HTML buffer for later combination call add(buf_list, bufnr('%')) endfor unlet g:html_diff_win_num call tohtml#Diff2HTML(win_list, buf_list) endif "}}} unlet g:html_start_line unlet g:html_end_line unlet s:settings endfunc "}}} func! tohtml#Diff2HTML(win_list, buf_list) "{{{ let xml_line = "" let tag_close = '>' let s:old_paste = &paste set paste let s:old_magic = &magic set magic if s:settings.use_xhtml if s:settings.encoding != "" let xml_line = "<?xml version=\"1.0\" encoding=\"" . s:settings.encoding . "\"?>" else let xml_line = "<?xml version=\"1.0\"?>" endif let tag_close = ' />' endif let style = [s:settings.use_xhtml ? "" : '-->'] let body_line = '' let html = [] if s:settings.use_xhtml call add(html, xml_line) endif if s:settings.use_xhtml call add(html, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">") call add(html, '<html xmlns="http://www.w3.org/1999/xhtml">') elseif s:settings.use_css && !s:settings.no_pre call add(html, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">") call add(html, '<html>') else call add(html, '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"') call add(html, ' "http://www.w3.org/TR/html4/loose.dtd">') call add(html, '<html>') endif call add(html, '<head>') " include encoding as close to the top as possible, but only if not already " contained in XML information if s:settings.encoding != "" && !s:settings.use_xhtml call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close) endif call add(html, '<title>diff</title>') call add(html, '<meta name="Generator" content="Vim/'.v:version/100.'.'.v:version%100.'"'.tag_close) call add(html, '<meta name="plugin-version" content="'.g:loaded_2html_plugin.'"'.tag_close) call add(html, '<meta name="settings" content="'. \ join(filter(keys(s:settings),'s:settings[v:val]'),','). \ '"'.tag_close) call add(html, '</head>') let body_line_num = len(html) call add(html, '<body>') call add(html, '<table border="1" width="100%">') call add(html, '<tr>') for buf in a:win_list call add(html, '<th>'.bufname(buf).'</th>') endfor call add(html, '</tr><tr>') let diff_style_start = 0 let insert_index = 0 for buf in a:buf_list let temp = [] exe bufwinnr(buf) . 'wincmd w' " If text is folded because of user foldmethod settings, etc. we don't want " to act on everything in a fold by mistake. setlocal nofoldenable " When not using CSS or when using xhtml, the <body> line can be important. " Assume it will be the same for all buffers and grab it from the first " buffer. Similarly, need to grab the body end line as well. if body_line == '' 1 call search('<body') let body_line = getline('.') $ call search('</body>', 'b') let s:body_end_line = getline('.') endif " Grab the style information. Some of this will be duplicated so only insert " it if it's not already there. {{{ 1 let style_start = search('^<style type="text/css">') 1 let style_end = search('^</style>') if style_start > 0 && style_end > 0 let buf_styles = getline(style_start + 1, style_end - 1) for a_style in buf_styles if index(style, a_style) == -1 if diff_style_start == 0 if a_style =~ '\<Diff\(Change\|Text\|Add\|Delete\)' let diff_style_start = len(style)-1 endif endif call insert(style, a_style, insert_index) let insert_index += 1 endif endfor endif " }}} " everything new will get added before the diff styles so diff highlight " properly overrides normal highlight if diff_style_start != 0 let insert_index = diff_style_start endif " Delete those parts that are not needed so " we can include the rest into the resulting table 1,/^<body/d_ $ ?</body>?,$d_ let temp = getline(1,'$') " undo deletion of start and end part " so we can later save the file as valid html " TODO: restore using grabbed lines if undolevel is 1? normal 2u if s:settings.use_css call add(html, '<td valign="top"><div>') elseif s:settings.use_xhtml call add(html, '<td nowrap="nowrap" valign="top"><div>') else call add(html, '<td nowrap valign="top"><div>') endif let html += temp call add(html, '</div></td>') " Close this buffer " TODO: the comment above says we're going to allow saving the file " later...but here we discard it? quit! endfor let html[body_line_num] = body_line call add(html, '</tr>') call add(html, '</table>') call add(html, s:body_end_line) call add(html, '</html>') let i = 1 let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html") " Find an unused file name if current file name is already in use while filereadable(name) let name = substitute(name, '\d*\.x\?html$', '', '') . i . '.' . fnamemodify(copy(name), ":t:e") let i += 1 endwhile exe "topleft new " . name setlocal modifiable " just in case some user autocmd creates content in the new buffer, make sure " it is empty before proceeding %d " set the fileencoding to match the charset we'll be using let &l:fileencoding=s:settings.vim_encoding " According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte " order mark is highly recommend on the web when using multibyte encodings. But, " it is not a good idea to include it on UTF-8 files. Otherwise, let Vim " determine when it is actually inserted. if s:settings.vim_encoding == 'utf-8' setlocal nobomb else setlocal bomb endif call append(0, html) if len(style) > 0 1 let style_start = search('^</head>')-1 " Insert javascript to toggle matching folds open and closed in all windows, " if dynamic folding is active. {{{ if s:settings.dynamic_folds call append(style_start, [ \ "<script type='text/javascript'>", \ s:settings.use_xhtml ? '//<![CDATA[' : " <!--", \ " function toggleFold(objID)", \ " {", \ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)", \ " {", \ " var fold;", \ ' fold = document.getElementById("win"+win_num+objID);', \ " if(fold.className == 'closed-fold')", \ " {", \ " fold.className = 'open-fold';", \ " }", \ " else if (fold.className == 'open-fold')", \ " {", \ " fold.className = 'closed-fold';", \ " }", \ " }", \ " }", \ s:settings.use_xhtml ? '//]]>' : " -->", \ "</script>" \ ]) endif "}}} " Insert styles from all the generated html documents and additional styles " for the table-based layout of the side-by-side diff. The diff should take " up the full browser window (but not more), and be static in size, " horizontally scrollable when the lines are too long. Otherwise, the diff " is pretty useless for really long lines. {{{ if s:settings.use_css call append(style_start, \ ['<style type="text/css">']+ \ style+ \ [ s:settings.use_xhtml ? '' : '<!--', \ 'table { table-layout: fixed; }', \ 'html, body, table, tbody { width: 100%; margin: 0; padding: 0; }', \ 'th, td { width: '.printf("%.1f",100.0/len(a:win_list)).'%; }', \ 'td div { overflow: auto; }', \ s:settings.use_xhtml ? '' : '-->', \ '</style>' \]) endif "}}} endif let &paste = s:old_paste let &magic = s:old_magic endfunc "}}} " Gets a single user option and sets it in the passed-in Dict, or gives it the " default value if the option doesn't actually exist. func! tohtml#GetOption(settings, option, default) "{{{ if exists('g:html_'.a:option) let a:settings[a:option] = g:html_{a:option} else let a:settings[a:option] = a:default endif endfunc "}}} " returns a Dict containing the values of all user options for 2html, including " default values for those not given an explicit value by the user. Discards the " html_ prefix of the option for nicer looking code. func! tohtml#GetUserSettings() "{{{ if exists('s:settings') " just restore the known options if we've already retrieved them return s:settings else " otherwise figure out which options are set let user_settings = {} " Define the correct option if the old option name exists and we haven't " already defined the correct one. Maybe I'll put out a warnig message about " this sometime and remove the old option entirely at some even later time, " but for now just silently accept the old option. if exists('g:use_xhtml') && !exists("g:html_use_xhtml") let g:html_use_xhtml = g:use_xhtml endif " get current option settings with appropriate defaults {{{ call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") ) call tohtml#GetOption(user_settings, 'diff_one_file', 0 ) call tohtml#GetOption(user_settings, 'number_lines', &number ) call tohtml#GetOption(user_settings, 'pre_wrap', &wrap ) call tohtml#GetOption(user_settings, 'use_css', 1 ) call tohtml#GetOption(user_settings, 'ignore_conceal', 0 ) call tohtml#GetOption(user_settings, 'ignore_folding', 0 ) call tohtml#GetOption(user_settings, 'dynamic_folds', 0 ) call tohtml#GetOption(user_settings, 'no_foldcolumn', 0 ) call tohtml#GetOption(user_settings, 'hover_unfold', 0 ) call tohtml#GetOption(user_settings, 'no_pre', 0 ) call tohtml#GetOption(user_settings, 'whole_filler', 0 ) call tohtml#GetOption(user_settings, 'use_xhtml', 0 ) " }}} " override those settings that need it {{{ " hover opening implies dynamic folding if user_settings.hover_unfold let user_settings.dynamic_folds = 1 endif " ignore folding overrides dynamic folding if user_settings.ignore_folding && user_settings.dynamic_folds let user_settings.dynamic_folds = 0 let user_settings.hover_unfold = 0 endif " dynamic folding with no foldcolumn implies hover opens if user_settings.dynamic_folds && user_settings.no_foldcolumn let user_settings.hover_unfold = 1 endif " dynamic folding implies css if user_settings.dynamic_folds let user_settings.use_css = 1 endif " if we're not using CSS we cannot use a pre section because <font> tags " aren't allowed inside a <pre> block if !user_settings.use_css let user_settings.no_pre = 1 endif " pre_wrap doesn't do anything if not using pre or not using CSS if user_settings.no_pre || !user_settings.use_css let user_settings.pre_wrap=0 endif "}}} " set up expand_tabs option after all the overrides so we know the " appropriate defaults {{{ if user_settings.no_pre == 0 call tohtml#GetOption(user_settings, \ 'expand_tabs', \ &expandtab || &ts != 8 || user_settings.number_lines || \ (user_settings.dynamic_folds && !user_settings.no_foldcolumn)) else let user_settings.expand_tabs = 1 endif " }}} if exists("g:html_use_encoding") "{{{ " user specified the desired MIME charset, figure out proper " 'fileencoding' from it or warn the user if we cannot let user_settings.encoding = g:html_use_encoding let user_settings.vim_encoding = tohtml#EncodingFromCharset(g:html_use_encoding) if user_settings.vim_encoding == '' echohl WarningMsg echomsg "TOhtml: file encoding for" \ g:html_use_encoding \ "unknown, please set 'fileencoding'" echohl None endif else " Figure out proper MIME charset from 'fileencoding' if possible if &l:fileencoding != '' " If the buffer is not a "normal" type, the 'fileencoding' value may not " be trusted; since the buffer should not be written the fileencoding is " not intended to be used. if &l:buftype=='' || &l:buftype==?'help' let user_settings.vim_encoding = &l:fileencoding call tohtml#CharsetFromEncoding(user_settings) else let user_settings.encoding = '' " trigger detection using &encoding endif endif " else from 'encoding' if possible if &l:fileencoding == '' || user_settings.encoding == '' let user_settings.vim_encoding = &encoding call tohtml#CharsetFromEncoding(user_settings) endif " else default to UTF-8 and warn user if user_settings.encoding == '' let user_settings.vim_encoding = 'utf-8' let user_settings.encoding = 'UTF-8' echohl WarningMsg echomsg "TOhtml: couldn't determine MIME charset, using UTF-8" echohl None endif endif "}}} " TODO: font return user_settings endif endfunc "}}} " get the proper HTML charset name from a Vim encoding option. function! tohtml#CharsetFromEncoding(settings) "{{{ let l:vim_encoding = a:settings.vim_encoding if exists('g:html_charset_override') && has_key(g:html_charset_override, l:vim_encoding) let a:settings.encoding = g:html_charset_override[l:vim_encoding] else if l:vim_encoding =~ '^8bit\|^2byte' " 8bit- and 2byte- prefixes are to indicate encodings available on the " system that Vim will convert with iconv(), look up just the encoding name, " not Vim's prefix. let l:vim_encoding = substitute(l:vim_encoding, '^8bit-\|^2byte-', '', '') endif if has_key(g:tohtml#encoding_to_charset, l:vim_encoding) let a:settings.encoding = g:tohtml#encoding_to_charset[l:vim_encoding] else let a:settings.encoding = "" endif endif if a:settings.encoding != "" let l:vim_encoding = tohtml#EncodingFromCharset(a:settings.encoding) if l:vim_encoding != "" " if the Vim encoding to HTML encoding conversion is set up (by default or " by the user) to convert to a different encoding, we need to also change " the Vim encoding of the new buffer let a:settings.vim_encoding = l:vim_encoding endif endif endfun "}}} " Get the proper Vim encoding option setting from an HTML charset name. function! tohtml#EncodingFromCharset(encoding) "{{{ if exists('g:html_encoding_override') && has_key(g:html_encoding_override, a:encoding) return g:html_encoding_override[a:encoding] elseif has_key(g:tohtml#charset_to_encoding, tolower(a:encoding)) return g:tohtml#charset_to_encoding[tolower(a:encoding)] else return "" endif endfun "}}} let &cpo = s:cpo_sav unlet s:cpo_sav " Make sure any patches will probably use consistent indent " vim: ts=8 sw=2 sts=2 noet fdm=marker
zyz2011-vim
runtime/autoload/tohtml.vim
Vim Script
gpl2
25,667
" Vim autoload file for editing compressed files. " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2008 Jul 04 " These functions are used by the gzip plugin. " Function to check that executing "cmd [-f]" works. " The result is cached in s:have_"cmd" for speed. fun s:check(cmd) let name = substitute(a:cmd, '\(\S*\).*', '\1', '') if !exists("s:have_" . name) let e = executable(name) if e < 0 let r = system(name . " --version") let e = (r !~ "not found" && r != "") endif exe "let s:have_" . name . "=" . e endif exe "return s:have_" . name endfun " Set b:gzip_comp_arg to the gzip argument to be used for compression, based on " the flags in the compressed file. " The only compression methods that can be detected are max speed (-1) and max " compression (-9). fun s:set_compression(line) " get the Compression Method let l:cm = char2nr(a:line[2]) " if it's 8 (DEFLATE), we can check for the compression level if l:cm == 8 " get the eXtra FLags let l:xfl = char2nr(a:line[8]) " max compression if l:xfl == 2 let b:gzip_comp_arg = "-9" " min compression elseif l:xfl == 4 let b:gzip_comp_arg = "-1" endif endif endfun " After reading compressed file: Uncompress text in buffer with "cmd" fun gzip#read(cmd) " don't do anything if the cmd is not supported if !s:check(a:cmd) return endif " for gzip check current compression level and set b:gzip_comp_arg. silent! unlet b:gzip_comp_arg if a:cmd[0] == 'g' call s:set_compression(getline(1)) endif " make 'patchmode' empty, we don't want a copy of the written file let pm_save = &pm set pm= " remove 'a' and 'A' from 'cpo' to avoid the alternate file changes let cpo_save = &cpo set cpo-=a cpo-=A " 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() let tmpe = tmp . "." . expand("<afile>:e") if exists('*fnameescape') let tmp_esc = fnameescape(tmp) let tmpe_esc = fnameescape(tmpe) else let tmp_esc = escape(tmp, ' ') let tmpe_esc = escape(tmpe, ' ') endif " write the just read lines to a temp file "'[,']w tmp.gz" execute "silent '[,']w " . tmpe_esc " uncompress the temp file: call system("gzip -dn tmp.gz") call system(a:cmd . " " . s:escape(tmpe)) if !filereadable(tmp) " uncompress didn't work! Keep the compressed file then. echoerr "Error: Could not read uncompressed file" let ok = 0 else let ok = 1 " delete the compressed lines; remember the line number let l = line("'[") - 1 if exists(":lockmarks") lockmarks '[,']d _ 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_esc else execute "silent lockmarks " . l . "r " . tmp_esc endif else execute "silent " . l . "r " . tmp_esc 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_esc silent! exe "bwipe " . tmpe_esc endif " 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 ok && empty if exists('*fnameescape') let fname = fnameescape(expand("%:r")) else let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<") endif if &verbose >= 8 execute "doau BufReadPost " . fname else execute "silent! doau BufReadPost " . fname endif endif endfun " After writing compressed file: Compress written file with "cmd" fun gzip#write(cmd) " don't do anything if the cmd is not supported if s:check(a:cmd) " Rename the file before compressing it. let nm = resolve(expand("<afile>")) let nmt = s:tempname(nm) if rename(nm, nmt) == 0 if exists("b:gzip_comp_arg") call system(a:cmd . " " . b:gzip_comp_arg . " -- " . s:escape(nmt)) else call system(a:cmd . " -- " . s:escape(nmt)) endif call rename(nmt . "." . expand("<afile>:e"), nm) endif endif endfun " Before appending to compressed file: Uncompress file with "cmd" fun gzip#appre(cmd) " don't do anything if the cmd is not supported if s:check(a:cmd) let nm = expand("<afile>") " for gzip check current compression level and set b:gzip_comp_arg. silent! unlet b:gzip_comp_arg if a:cmd[0] == 'g' call s:set_compression(readfile(nm, "b", 1)[0]) endif " Rename to a weird name to avoid the risk of overwriting another file let nmt = expand("<afile>:p:h") . "/X~=@l9q5" let nmte = nmt . "." . expand("<afile>:e") if rename(nm, nmte) == 0 if &patchmode != "" && getfsize(nm . &patchmode) == -1 " Create patchmode file by creating the decompressed file new call system(a:cmd . " -c -- " . s:escape(nmte) . " > " . s:escape(nmt)) call rename(nmte, nm . &patchmode) else call system(a:cmd . " -- " . s:escape(nmte)) endif call rename(nmt, nm) endif endif endfun " find a file name for the file to be compressed. Use "name" without an " extension if possible. Otherwise use a weird name to avoid overwriting an " existing file. fun s:tempname(name) let fn = fnamemodify(a:name, ":r") if !filereadable(fn) && !isdirectory(fn) return fn endif return fnamemodify(a:name, ":p:h") . "/X~=@l9q5" endfun fun s:escape(name) " shellescape() was added by patch 7.0.111 if exists("*shellescape") return shellescape(a:name) endif return "'" . a:name . "'" endfun " vim: set sw=2 :
zyz2011-vim
runtime/autoload/gzip.vim
Vim Script
gpl2
6,093
"------------------------------------------------------------------------------ " Description: Perform Ada specific completion & tagging. " Language: Ada (2005) " $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: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 " $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. " 16.07.2006 MK Ada-Mode as vim-ball " 02.10.2006 MK Better folding. " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces " 08.07.2007 TV fix mapleader problems. " 09.05.2007 MK Session just won't work no matter how much " tweaking is done " 19.09.2007 NO still some mapleader problems " Help Page: ft-ada-functions "------------------------------------------------------------------------------ if version < 700 finish endif let s:keepcpo= &cpo set cpo&vim " Section: Constants {{{1 " let g:ada#DotWordRegex = '\a\w*\(\_s*\.\_s*\a\w*\)*' let g:ada#WordRegex = '\a\w*' let g:ada#Comment = "\\v^(\"[^\"]*\"|'.'|[^\"']){-}\\zs\\s*--.*" let g:ada#Keywords = [] " Section: g:ada#Keywords {{{1 " " Section: add Ada keywords {{{2 " for Item in ['abort', 'else', 'new', 'return', 'abs', 'elsif', 'not', 'reverse', 'abstract', 'end', 'null', 'accept', 'entry', 'select', 'access', 'exception', 'of', 'separate', 'aliased', 'exit', 'or', 'subtype', 'all', 'others', 'synchronized', 'and', 'for', 'out', 'array', 'function', 'overriding', 'tagged', 'at', 'task', 'generic', 'package', 'terminate', 'begin', 'goto', 'pragma', 'then', 'body', 'private', 'type', 'if', 'procedure', 'case', 'in', 'protected', 'until', 'constant', 'interface', 'use', 'is', 'raise', 'declare', 'range', 'when', 'delay', 'limited', 'record', 'while', 'delta', 'loop', 'rem', 'with', 'digits', 'renames', 'do', 'mod', 'requeue', 'xor'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'keyword', \ 'info': 'Ada keyword.', \ 'kind': 'k', \ 'icase': 1}] endfor " Section: GNAT Project Files {{{3 " if exists ('g:ada_with_gnat_project_files') for Item in ['project'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'keyword', \ 'info': 'GNAT projectfile keyword.', \ 'kind': 'k', \ 'icase': 1}] endfor endif " Section: add standart exception {{{2 " for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'exception', \ 'info': 'Ada standart exception.', \ 'kind': 'x', \ 'icase': 1}] endfor " Section: add GNAT exception {{{3 " if exists ('g:ada_gnat_extensions') for Item in ['Assert_Failure'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'exception', \ 'info': 'GNAT exception.', \ 'kind': 'x', \ 'icase': 1}] endfor endif " Section: add Ada buildin types {{{2 " for Item in ['Boolean', 'Integer', 'Natural', 'Positive', 'Float', 'Character', 'Wide_Character', 'Wide_Wide_Character', 'String', 'Wide_String', 'Wide_Wide_String', 'Duration'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'type', \ 'info': 'Ada buildin type.', \ 'kind': 't', \ 'icase': 1}] endfor " Section: add GNAT buildin types {{{3 " if exists ('g:ada_gnat_extensions') for Item in ['Short_Integer', 'Short_Short_Integer', 'Long_Integer', 'Long_Long_Integer', 'Short_Float', 'Short_Short_Float', 'Long_Float', 'Long_Long_Float'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'type', \ 'info': 'GNAT buildin type.', \ 'kind': 't', \ 'icase': 1}] endfor endif " Section: add Ada Attributes {{{2 " for Item in ['''Access', '''Address', '''Adjacent', '''Aft', '''Alignment', '''Base', '''Bit_Order', '''Body_Version', '''Callable', '''Caller', '''Ceiling', '''Class', '''Component_Size', '''Compose', '''Constrained', '''Copy_Sign', '''Count', '''Definite', '''Delta', '''Denorm', '''Digits', '''Emax', '''Exponent', '''External_Tag', '''Epsilon', '''First', '''First_Bit', '''Floor', '''Fore', '''Fraction', '''Identity', '''Image', '''Input', '''Large', '''Last', '''Last_Bit', '''Leading_Part', '''Length', '''Machine', '''Machine_Emax', '''Machine_Emin', '''Machine_Mantissa', '''Machine_Overflows', '''Machine_Radix', '''Machine_Rounding', '''Machine_Rounds', '''Mantissa', '''Max', '''Max_Size_In_Storage_Elements', '''Min', '''Mod', '''Model', '''Model_Emin', '''Model_Epsilon', '''Model_Mantissa', '''Model_Small', '''Modulus', '''Output', '''Partition_ID', '''Pos', '''Position', '''Pred', '''Priority', '''Range', '''Read', '''Remainder', '''Round', '''Rounding', '''Safe_Emax', '''Safe_First', '''Safe_Large', '''Safe_Last', '''Safe_Small', '''Scale', '''Scaling', '''Signed_Zeros', '''Size', '''Small', '''Storage_Pool', '''Storage_Size', '''Stream_Size', '''Succ', '''Tag', '''Terminated', '''Truncation', '''Unbiased_Rounding', '''Unchecked_Access', '''Val', '''Valid', '''Value', '''Version', '''Wide_Image', '''Wide_Value', '''Wide_Wide_Image', '''Wide_Wide_Value', '''Wide_Wide_Width', '''Wide_Width', '''Width', '''Write'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'attribute', \ 'info': 'Ada attribute.', \ 'kind': 'a', \ 'icase': 1}] endfor " Section: add GNAT Attributes {{{3 " if exists ('g:ada_gnat_extensions') for Item in ['''Abort_Signal', '''Address_Size', '''Asm_Input', '''Asm_Output', '''AST_Entry', '''Bit', '''Bit_Position', '''Code_Address', '''Default_Bit_Order', '''Elaborated', '''Elab_Body', '''Elab_Spec', '''Emax', '''Enum_Rep', '''Epsilon', '''Fixed_Value', '''Has_Access_Values', '''Has_Discriminants', '''Img', '''Integer_Value', '''Machine_Size', '''Max_Interrupt_Priority', '''Max_Priority', '''Maximum_Alignment', '''Mechanism_Code', '''Null_Parameter', '''Object_Size', '''Passed_By_Reference', '''Range_Length', '''Storage_Unit', '''Target_Name', '''Tick', '''To_Address', '''Type_Class', '''UET_Address', '''Unconstrained_Array', '''Universal_Literal_String', '''Unrestricted_Access', '''VADS_Size', '''Value_Size', '''Wchar_T_Size', '''Word_Size'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'attribute', \ 'info': 'GNAT attribute.', \ 'kind': 'a', \ 'icase': 1}] endfor endif " Section: add Ada Pragmas {{{2 " for Item in ['All_Calls_Remote', 'Assert', 'Assertion_Policy', 'Asynchronous', 'Atomic', 'Atomic_Components', 'Attach_Handler', 'Controlled', 'Convention', 'Detect_Blocking', 'Discard_Names', 'Elaborate', 'Elaborate_All', 'Elaborate_Body', 'Export', 'Import', 'Inline', 'Inspection_Point', 'Interface (Obsolescent)', 'Interrupt_Handler', 'Interrupt_Priority', 'Linker_Options', 'List', 'Locking_Policy', 'Memory_Size (Obsolescent)', 'No_Return', 'Normalize_Scalars', 'Optimize', 'Pack', 'Page', 'Partition_Elaboration_Policy', 'Preelaborable_Initialization', 'Preelaborate', 'Priority', 'Priority_Specific_Dispatching', 'Profile', 'Pure', 'Queueing_Policy', 'Relative_Deadline', 'Remote_Call_Interface', 'Remote_Types', 'Restrictions', 'Reviewable', 'Shared (Obsolescent)', 'Shared_Passive', 'Storage_Size', 'Storage_Unit (Obsolescent)', 'Suppress', 'System_Name (Obsolescent)', 'Task_Dispatching_Policy', 'Unchecked_Union', 'Unsuppress', 'Volatile', 'Volatile_Components'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'pragma', \ 'info': 'Ada pragma.', \ 'kind': 'p', \ 'icase': 1}] endfor " Section: add GNAT Pragmas {{{3 " if exists ('g:ada_gnat_extensions') for Item in ['Abort_Defer', 'Ada_83', 'Ada_95', 'Ada_05', 'Annotate', 'Ast_Entry', 'C_Pass_By_Copy', 'Comment', 'Common_Object', 'Compile_Time_Warning', 'Complex_Representation', 'Component_Alignment', 'Convention_Identifier', 'CPP_Class', 'CPP_Constructor', 'CPP_Virtual', 'CPP_Vtable', 'Debug', 'Elaboration_Checks', 'Eliminate', 'Export_Exception', 'Export_Function', 'Export_Object', 'Export_Procedure', 'Export_Value', 'Export_Valued_Procedure', 'Extend_System', 'External', 'External_Name_Casing', 'Finalize_Storage_Only', 'Float_Representation', 'Ident', 'Import_Exception', 'Import_Function', 'Import_Object', 'Import_Procedure', 'Import_Valued_Procedure', 'Initialize_Scalars', 'Inline_Always', 'Inline_Generic', 'Interface_Name', 'Interrupt_State', 'Keep_Names', 'License', 'Link_With', 'Linker_Alias', 'Linker_Section', 'Long_Float', 'Machine_Attribute', 'Main_Storage', 'Obsolescent', 'Passive', 'Polling', 'Profile_Warnings', 'Propagate_Exceptions', 'Psect_Object', 'Pure_Function', 'Restriction_Warnings', 'Source_File_Name', 'Source_File_Name_Project', 'Source_Reference', 'Stream_Convert', 'Style_Checks', 'Subtitle', 'Suppress_All', 'Suppress_Exception_Locations', 'Suppress_Initialization', 'Task_Info', 'Task_Name', 'Task_Storage', 'Thread_Body', 'Time_Slice', 'Title', 'Unimplemented_Unit', 'Universal_Data', 'Unreferenced', 'Unreserve_All_Interrupts', 'Use_VADS_Size', 'Validity_Checks', 'Warnings', 'Weak_External'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'pragma', \ 'info': 'GNAT pragma.', \ 'kind': 'p', \ 'icase': 1}] endfor endif " 1}}} " Section: g:ada#Ctags_Kinds {{{1 " let g:ada#Ctags_Kinds = { \ 'P': ["packspec", "package specifications"], \ 'p': ["package", "packages"], \ 'T': ["typespec", "type specifications"], \ 't': ["type", "types"], \ 'U': ["subspec", "subtype specifications"], \ 'u': ["subtype", "subtypes"], \ 'c': ["component", "record type components"], \ 'l': ["literal", "enum type literals"], \ 'V': ["varspec", "variable specifications"], \ 'v': ["variable", "variables"], \ 'f': ["formal", "generic formal parameters"], \ 'n': ["constant", "constants"], \ 'x': ["exception", "user defined exceptions"], \ 'R': ["subprogspec", "subprogram specifications"], \ 'r': ["subprogram", "subprograms"], \ 'K': ["taskspec", "task specifications"], \ 'k': ["task", "tasks"], \ 'O': ["protectspec", "protected data specifications"], \ 'o': ["protected", "protected data"], \ 'E': ["entryspec", "task/protected data entry specifications"], \ 'e': ["entry", "task/protected data entries"], \ 'b': ["label", "labels"], \ 'i': ["identifier", "loop/declare identifiers"], \ 'a': ["autovar", "automatic variables"], \ 'y': ["annon", "loops and blocks with no identifier"]} " Section: ada#Word (...) {{{1 " " Extract current Ada word across multiple lines " AdaWord ([line, column])\ " function ada#Word (...) if a:0 > 1 let l:Line_Nr = a:1 let l:Column_Nr = a:2 - 1 else let l:Line_Nr = line('.') let l:Column_Nr = col('.') - 1 endif let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' ) " Cope with tag searching for items in comments; if we are, don't loop " backards looking for previous lines if l:Column_Nr > strlen(l:Line) " We were in a comment let l:Line = getline(l:Line_Nr) let l:Search_Prev_Lines = 0 else let l:Search_Prev_Lines = 1 endif " Go backwards until we find a match (Ada ID) that *doesn't* include our " location - i.e., the previous ID. This is because the current 'correct' " match will toggle matching/not matching as we traverse characters " backwards. Thus, we have to find the previous unrelated match, exclude " it, then use the next full match (ours). " Remember to convert vim column 'l:Column_Nr' [1..n] to string offset [0..(n-1)] " ... but start, here, one after the required char. let l:New_Column = l:Column_Nr + 1 while 1 let l:New_Column = l:New_Column - 1 if l:New_Column < 0 " Have to include previous l:Line from file let l:Line_Nr = l:Line_Nr - 1 if l:Line_Nr < 1 || !l:Search_Prev_Lines " Start of file or matching in a comment let l:Line_Nr = 1 let l:New_Column = 0 let l:Our_Match = match (l:Line, g:ada#WordRegex ) break endif " Get previous l:Line, and prepend it to our search string let l:New_Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' ) let l:New_Column = strlen (l:New_Line) - 1 let l:Column_Nr = l:Column_Nr + l:New_Column let l:Line = l:New_Line . l:Line endif " Check to see if this is a match excluding 'us' let l:Match_End = l:New_Column + \ matchend (strpart (l:Line,l:New_Column), g:ada#WordRegex ) - 1 if l:Match_End >= l:New_Column && \ l:Match_End < l:Column_Nr " Yes let l:Our_Match = l:Match_End+1 + \ match (strpart (l:Line,l:Match_End+1), g:ada#WordRegex ) break endif endwhile " Got anything? if l:Our_Match < 0 return '' else let l:Line = strpart (l:Line, l:Our_Match) endif " Now simply add further lines until the match gets no bigger let l:Match_String = matchstr (l:Line, g:ada#WordRegex) let l:Last_Line = line ('$') let l:Line_Nr = line ('.') + 1 while l:Line_Nr <= l:Last_Line let l:Last_Match = l:Match_String let l:Line = l:Line . \ substitute (getline (l:Line_Nr), g:ada#Comment, '', '') let l:Match_String = matchstr (l:Line, g:ada#WordRegex) if l:Match_String == l:Last_Match break endif endwhile " Strip whitespace & return return substitute (l:Match_String, '\s\+', '', 'g') endfunction ada#Word " Section: ada#List_Tag (...) {{{1 " " List tags in quickfix window " function ada#List_Tag (...) if a:0 > 1 let l:Tag_Word = ada#Word (a:1, a:2) elseif a:0 > 0 let l:Tag_Word = a:1 else let l:Tag_Word = ada#Word () endif echo "Searching for" l:Tag_Word let l:Pattern = '^' . l:Tag_Word . '$' let l:Tag_List = taglist (l:Pattern) let l:Error_List = [] " " add symbols " for Tag_Item in l:Tag_List if l:Tag_Item['kind'] == '' let l:Tag_Item['kind'] = 's' endif let l:Error_List += [ \ l:Tag_Item['filename'] . '|' . \ l:Tag_Item['cmd'] . '|' . \ l:Tag_Item['kind'] . "\t" . \ l:Tag_Item['name'] ] endfor set errorformat=%f\|%l\|%m cexpr l:Error_List cwindow endfunction ada#List_Tag " Section: ada#Jump_Tag (Word, Mode) {{{1 " " Word tag - include '.' and if Ada make uppercase " function ada#Jump_Tag (Word, Mode) if a:Word == '' " Get current word let l:Word = ada#Word() if l:Word == '' throw "NOT_FOUND: no identifier found." endif else let l:Word = a:Word endif echo "Searching for " . l:Word try execute a:Mode l:Word catch /.*:E426:.*/ let ignorecase = &ignorecase set ignorecase execute a:Mode l:Word let &ignorecase = ignorecase endtry return endfunction ada#Jump_Tag " Section: ada#Insert_Backspace () {{{1 " " Backspace at end of line after auto-inserted commentstring '-- ' wipes it " function ada#Insert_Backspace () let l:Line = getline ('.') if col ('.') > strlen (l:Line) && \ match (l:Line, '-- $') != -1 && \ match (&comments,'--') != -1 return "\<bs>\<bs>\<bs>" else return "\<bs>" endif return endfunction ada#InsertBackspace " Section: Insert Completions {{{1 " " Section: ada#User_Complete(findstart, base) {{{2 " " This function is used for the 'complete' option. " function! ada#User_Complete(findstart, base) if a:findstart == 1 " " locate the start of the word " let line = getline ('.') let start = col ('.') - 1 while start > 0 && line[start - 1] =~ '\i\|''' let start -= 1 endwhile return start else " " look up matches " let l:Pattern = '^' . a:base . '.*$' " " add keywords " for Tag_Item in g:ada#Keywords if l:Tag_Item['word'] =~? l:Pattern if complete_add (l:Tag_Item) == 0 return [] endif if complete_check () return [] endif endif endfor return [] endif endfunction ada#User_Complete " Section: ada#Completion (cmd) {{{2 " " Word completion (^N/^R/^X^]) - force '.' inclusion function ada#Completion (cmd) set iskeyword+=46 return a:cmd . "\<C-R>=ada#Completion_End ()\<CR>" endfunction ada#Completion " Section: ada#Completion_End () {{{2 " function ada#Completion_End () set iskeyword-=46 return '' endfunction ada#Completion_End " Section: ada#Create_Tags {{{1 " function ada#Create_Tags (option) if a:option == 'file' let l:Filename = fnamemodify (bufname ('%'), ':p') elseif a:option == 'dir' let l:Filename = \ fnamemodify (bufname ('%'), ':p:h') . "*.ada " . \ fnamemodify (bufname ('%'), ':p:h') . "*.adb " . \ fnamemodify (bufname ('%'), ':p:h') . "*.ads" else let l:Filename = a:option endif execute '!ctags --excmd=number ' . l:Filename endfunction ada#Create_Tags " Section: ada#Switch_Session {{{1 " function ada#Switch_Session (New_Session) " " you should not save to much date into the seession since they will " be sourced " let l:sessionoptions=&sessionoptions try set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize if a:New_Session != v:this_session " " We actualy got a new session - otherwise there " is nothing to do. " if strlen (v:this_session) > 0 execute 'mksession! ' . v:this_session endif let v:this_session = a:New_Session "if filereadable (v:this_session) "execute 'source ' . v:this_session "endif augroup ada_session autocmd! autocmd VimLeavePre * execute 'mksession! ' . v:this_session augroup END "if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open "TlistOpen "endif endif finally let &sessionoptions=l:sessionoptions endtry return endfunction ada#Switch_Session " Section: GNAT Pretty Printer folding {{{1 " if exists('g:ada_folding') && g:ada_folding[0] == 'g' " " Lines consisting only of ')' ';' are due to a gnat pretty bug and " have the same level as the line above (can't happen in the first " line). " let s:Fold_Collate = '^\([;)]*$\|' " " some lone statements are folded with the line above " if stridx (g:ada_folding, 'i') >= 0 let s:Fold_Collate .= '\s\+\<is\>$\|' endif if stridx (g:ada_folding, 'b') >= 0 let s:Fold_Collate .= '\s\+\<begin\>$\|' endif if stridx (g:ada_folding, 'p') >= 0 let s:Fold_Collate .= '\s\+\<private\>$\|' endif if stridx (g:ada_folding, 'x') >= 0 let s:Fold_Collate .= '\s\+\<exception\>$\|' endif " We also handle empty lines and " comments here. let s:Fold_Collate .= '--\)' function ada#Pretty_Print_Folding (Line) " {{{2 let l:Text = getline (a:Line) if l:Text =~ s:Fold_Collate " " fold with line above " let l:Level = "=" elseif l:Text =~ '^\s\+(' " " gnat outdents a line which stards with a ( by one characters so " that parameters which follow are aligned. " let l:Level = (indent (a:Line) + 1) / &shiftwidth else let l:Level = indent (a:Line) / &shiftwidth endif return l:Level endfunction ada#Pretty_Print_Folding " }}}2 endif " Section: Options and Menus {{{1 " " Section: ada#Switch_Syntax_Options {{{2 " function ada#Switch_Syntax_Option (option) syntax off if exists ('g:ada_' . a:option) unlet g:ada_{a:option} echo a:option . 'now off' else let g:ada_{a:option}=1 echo a:option . 'now on' endif syntax on endfunction ada#Switch_Syntax_Option " Section: ada#Map_Menu {{{2 " function ada#Map_Menu (Text, Keys, Command) if a:Keys[0] == ':' execute \ "50amenu " . \ "Ada." . escape(a:Text, ' ') . \ "<Tab>" . a:Keys . \ " :" . a:Command . "<CR>" execute \ "command -buffer " . \ a:Keys[1:] . \" :" . a:Command . "<CR>" elseif a:Keys[0] == '<' execute \ "50amenu " . \ "Ada." . escape(a:Text, ' ') . \ "<Tab>" . a:Keys . \ " :" . a:Command . "<CR>" execute \ "nnoremap <buffer> " . \ a:Keys . \" :" . a:Command . "<CR>" execute \ "inoremap <buffer> " . \ a:Keys . \" <C-O>:" . a:Command . "<CR>" else if exists("g:mapleader") let l:leader = g:mapleader else let l:leader = '\' endif execute \ "50amenu " . \ "Ada." . escape(a:Text, ' ') . \ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') . \ " :" . a:Command . "<CR>" execute \ "nnoremap <buffer>" . \ escape(l:leader . "a" . a:Keys , '\') . \" :" . a:Command execute \ "inoremap <buffer>" . \ escape(l:leader . "a" . a:Keys , '\') . \" <C-O>:" . a:Command endif return endfunction " Section: ada#Map_Popup {{{2 " function ada#Map_Popup (Text, Keys, Command) if exists("g:mapleader") let l:leader = g:mapleader else let l:leader = '\' endif execute \ "50amenu " . \ "PopUp." . escape(a:Text, ' ') . \ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') . \ " :" . a:Command . "<CR>" call ada#Map_Menu (a:Text, a:Keys, a:Command) return endfunction ada#Map_Popup " }}}1 lockvar g:ada#WordRegex lockvar g:ada#DotWordRegex lockvar g:ada#Comment lockvar! g:ada#Keywords lockvar! g:ada#Ctags_Kinds let &cpo = s:keepcpo unlet s:keepcpo finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker
zyz2011-vim
runtime/autoload/ada.vim
Vim Script
gpl2
22,509
" Vim completion script " Language: PHP " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) " Last Change: 2011 Dec 08 " " TODO: " - Class aware completion: " a) caching? " - Switching to HTML (XML?) completion (SQL) inside of phpStrings " - allow also for XML completion <- better do html_flavor for HTML " completion " - outside of <?php?> getting parent tag may cause problems. Heh, even in " perfect conditions GetLastOpenTag doesn't cooperate... Inside of " phpStrings this can be even a bonus but outside of <?php?> it is not the " best situation function! phpcomplete#CompletePHP(findstart, base) if a:findstart unlet! b:php_menu " Check if we are inside of PHP markup let pos = getpos('.') let phpbegin = searchpairpos('<?', '', '?>', 'bWn', \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\|comment"') let phpend = searchpairpos('<?', '', '?>', 'Wn', \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\|comment"') if phpbegin == [0,0] && phpend == [0,0] " We are outside of any PHP markup. Complete HTML let htmlbegin = htmlcomplete#CompleteTags(1, '') let cursor_col = pos[2] let base = getline('.')[htmlbegin : cursor_col] let b:php_menu = htmlcomplete#CompleteTags(0, base) return htmlbegin else " locate the start of the word let line = getline('.') let start = col('.') - 1 let curline = line('.') let compl_begin = col('.') - 2 while start >= 0 && line[start - 1] =~ '[a-zA-Z_0-9\x7f-\xff$]' let start -= 1 endwhile let b:compl_context = getline('.')[0:compl_begin] return start " We can be also inside of phpString with HTML tags. Deal with " it later (time, not lines). endif endif " If exists b:php_menu it means completion was already constructed we " don't need to do anything more if exists("b:php_menu") return b:php_menu endif " Initialize base return lists let res = [] let res2 = [] " a:base is very short - we need context if exists("b:compl_context") let context = b:compl_context unlet! b:compl_context endif if !exists('g:php_builtin_functions') call phpcomplete#LoadData() endif let scontext = substitute(context, '\$\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*$', '', '') if scontext =~ '\(=\s*new\|extends\)\s\+$' " Complete class name " Internal solution for finding classes in current file. let file = getline(1, '$') call filter(file, \ 'v:val =~ "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let jfile = join(file, ' ') let int_values = split(jfile, 'class\s\+') let int_classes = {} for i in int_values let c_name = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*') if c_name != '' let int_classes[c_name] = '' endif endfor " Prepare list of classes from tags file let ext_classes = {} let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) if fnames != '' exe 'silent! vimgrep /^'.a:base.'.*\tc\(\t\|$\)/j '.fnames let qflist = getqflist() if len(qflist) > 0 for field in qflist " [:space:] thing: we don't have to be so strict when " dealing with tags files - entries there were already " checked by ctags. let item = matchstr(field['text'], '^[^[:space:]]\+') let ext_classes[item] = '' endfor endif endif " Prepare list of built in classes from g:php_builtin_functions if !exists("g:php_omni_bi_classes") let g:php_omni_bi_classes = {} for i in keys(g:php_builtin_object_functions) let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = '' endfor endif let classes = sort(keys(int_classes)) let classes += sort(keys(ext_classes)) let classes += sort(keys(g:php_omni_bi_classes)) for m in classes if m =~ '^'.a:base call add(res, m) endif endfor let final_menu = [] for i in res let final_menu += [{'word':i, 'kind':'c'}] endfor return final_menu elseif scontext =~ '\(->\|::\)$' " Complete user functions and variables " Internal solution for current file. " That seems as unnecessary repeating of functions but there are " few not so subtle differences as not appending of $ and addition " of 'kind' tag (not necessary in regular completion) if scontext =~ '->$' && scontext !~ '\$this->$' " Get name of the class let classname = phpcomplete#GetClassName(scontext) " Get location of class definition, we have to iterate through all " tags files separately because we need relative path from current " file to the exact file (tags file can be in different dir) if classname != '' let classlocation = phpcomplete#GetClassLocation(classname) else let classlocation = '' endif if classlocation == 'VIMPHP_BUILTINOBJECT' for object in keys(g:php_builtin_object_functions) if object =~ '^'.classname let res += [{'word':substitute(object, '.*::', '', ''), \ 'info': g:php_builtin_object_functions[object]}] endif endfor return res endif if filereadable(classlocation) let classfile = readfile(classlocation) let classcontent = '' let classcontent .= "\n".phpcomplete#GetClassContents(classfile, classname) let sccontent = split(classcontent, "\n") " YES, YES, YES! - we have whole content including extends! " Now we need to get two elements: public functions and public " vars " NO, NO, NO! - third separate filtering looking for content " :(, but all of them have differences. To squeeze them into " one implementation would require many additional arguments " and ifs. No good solution " Functions declared with public keyword or without any " keyword are public let functions = filter(deepcopy(sccontent), \ 'v:val =~ "^\\s*\\(static\\s\\+\\|public\\s\\+\\)*function"') let jfuncs = join(functions, ' ') let sfuncs = split(jfuncs, 'function\s\+') let c_functions = {} for i in sfuncs let f_name = matchstr(i, \ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') let f_args = matchstr(i, \ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*{') if f_name != '' let c_functions[f_name.'('] = f_args endif endfor " Variables declared with var or with public keyword are " public let variables = filter(deepcopy(sccontent), \ 'v:val =~ "^\\s*\\(public\\|var\\)\\s\\+\\$"') let jvars = join(variables, ' ') let svars = split(jvars, '\$') let c_variables = {} for i in svars let c_var = matchstr(i, \ '^\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') if c_var != '' let c_variables[c_var] = '' endif endfor let all_values = {} call extend(all_values, c_functions) call extend(all_values, c_variables) for m in sort(keys(all_values)) if m =~ '^'.a:base && m !~ '::' call add(res, m) elseif m =~ '::'.a:base call add(res2, m) endif endfor let start_list = res + res2 let final_list = [] for i in start_list if has_key(c_variables, i) let class = ' ' if all_values[i] != '' let class = i.' class ' endif let final_list += \ [{'word':i, \ 'info':class.all_values[i], \ 'kind':'v'}] else let final_list += \ [{'word':substitute(i, '.*::', '', ''), \ 'info':i.all_values[i].')', \ 'kind':'f'}] endif endfor return final_list endif endif if a:base =~ '^\$' let adddollar = '$' else let adddollar = '' endif let file = getline(1, '$') let jfile = join(file, ' ') let sfile = split(jfile, '\$') let int_vars = {} for i in sfile if i =~ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new' let val = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*').'->' else let val = matchstr(i, '^[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*') endif if val !~ '' let int_vars[adddollar.val] = '' endif endfor " ctags has good support for PHP, use tags file for external " variables let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let ext_vars = {} if fnames != '' let sbase = substitute(a:base, '^\$', '', '') exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames let qflist = getqflist() if len(qflist) > 0 for field in qflist let item = matchstr(field['text'], '^[^[:space:]]\+') " Add -> if it is possible object declaration let classname = '' if field['text'] =~ item.'\s*=\s*new\s\+' let item = item.'->' let classname = matchstr(field['text'], \ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') endif let ext_vars[adddollar.item] = classname endfor endif endif " Now we have all variables in int_vars dictionary call extend(int_vars, ext_vars) " Internal solution for finding functions in current file. let file = getline(1, '$') call filter(file, \ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let jfile = join(file, ' ') let int_values = split(jfile, 'function\s\+') let int_functions = {} for i in int_values let f_name = matchstr(i, \ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') let f_args = matchstr(i, \ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*{') let int_functions[f_name.'('] = f_args.')' endfor " Prepare list of functions from tags file let ext_functions = {} if fnames != '' exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames let qflist = getqflist() if len(qflist) > 0 for field in qflist " File name let item = matchstr(field['text'], '^[^[:space:]]\+') let fname = matchstr(field['text'], '\t\zs\f\+\ze') let prototype = matchstr(field['text'], \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?') let ext_functions[item.'('] = prototype.') - '.fname endfor endif endif let all_values = {} call extend(all_values, int_functions) call extend(all_values, ext_functions) call extend(all_values, int_vars) " external variables are already in call extend(all_values, g:php_builtin_object_functions) for m in sort(keys(all_values)) if m =~ '\(^\|::\)'.a:base call add(res, m) endif endfor let start_list = res let final_list = [] for i in start_list if has_key(int_vars, i) let class = ' ' if all_values[i] != '' let class = i.' class ' endif let final_list += [{'word':i, 'info':class.all_values[i], 'kind':'v'}] else let final_list += \ [{'word':substitute(i, '.*::', '', ''), \ 'info':i.all_values[i], \ 'kind':'f'}] endif endfor return final_list endif if a:base =~ '^\$' " Complete variables " Built-in variables {{{ let g:php_builtin_vars = {'$GLOBALS':'', \ '$_SERVER':'', \ '$_GET':'', \ '$_POST':'', \ '$_COOKIE':'', \ '$_FILES':'', \ '$_ENV':'', \ '$_REQUEST':'', \ '$_SESSION':'', \ '$HTTP_SERVER_VARS':'', \ '$HTTP_ENV_VARS':'', \ '$HTTP_COOKIE_VARS':'', \ '$HTTP_GET_VARS':'', \ '$HTTP_POST_VARS':'', \ '$HTTP_POST_FILES':'', \ '$HTTP_SESSION_VARS':'', \ '$php_errormsg':'', \ '$this':'' \ } " }}} " Internal solution for current file. let file = getline(1, '$') let jfile = join(file, ' ') let int_vals = split(jfile, '\ze\$') let int_vars = {} for i in int_vals if i =~ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new' let val = matchstr(i, \ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*').'->' else let val = matchstr(i, \ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*') endif if val != '' let int_vars[val] = '' endif endfor call extend(int_vars,g:php_builtin_vars) " ctags has support for PHP, use tags file for external variables let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let ext_vars = {} if fnames != '' let sbase = substitute(a:base, '^\$', '', '') exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames let qflist = getqflist() if len(qflist) > 0 for field in qflist let item = '$'.matchstr(field['text'], '^[^[:space:]]\+') let m_menu = '' " Add -> if it is possible object declaration if field['text'] =~ item.'\s*=\s*new\s\+' let item = item.'->' let m_menu = matchstr(field['text'], \ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') endif let ext_vars[item] = m_menu endfor endif endif call extend(int_vars, ext_vars) let g:a0 = keys(int_vars) for m in sort(keys(int_vars)) if m =~ '^\'.a:base call add(res, m) endif endfor let int_list = res let int_dict = [] for i in int_list if int_vars[i] != '' let class = ' ' if int_vars[i] != '' let class = i.' class ' endif let int_dict += [{'word':i, 'info':class.int_vars[i], 'kind':'v'}] else let int_dict += [{'word':i, 'kind':'v'}] endif endfor return int_dict else " Complete everything else - " + functions, DONE " + keywords of language DONE " + defines (constant definitions), DONE " + extend keywords for predefined constants, DONE " + classes (after new), DONE " + limit choice after -> and :: to funcs and vars DONE " Internal solution for finding functions in current file. let file = getline(1, '$') call filter(file, \ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("') let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let jfile = join(file, ' ') let int_values = split(jfile, 'function\s\+') let int_functions = {} for i in int_values let f_name = matchstr(i, \ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze') let f_args = matchstr(i, \ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\s*\zs.\{-}\ze\s*)\_s*{') let int_functions[f_name.'('] = f_args.')' endfor " Prepare list of functions from tags file let ext_functions = {} if fnames != '' exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames let qflist = getqflist() if len(qflist) > 0 for field in qflist " File name let item = matchstr(field['text'], '^[^[:space:]]\+') let fname = matchstr(field['text'], '\t\zs\f\+\ze') let prototype = matchstr(field['text'], \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?') let ext_functions[item.'('] = prototype.') - '.fname endfor endif endif " All functions call extend(int_functions, ext_functions) call extend(int_functions, g:php_builtin_functions) " Internal solution for finding constants in current file let file = getline(1, '$') call filter(file, 'v:val =~ "define\\s*("') let jfile = join(file, ' ') let int_values = split(jfile, 'define\s*(\s*') let int_constants = {} for i in int_values let c_name = matchstr(i, '\(["'']\)\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze\1') " let c_value = matchstr(i, " \ '\(["'']\)[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\1\s*,\s*\zs.\{-}\ze\s*)') if c_name != '' let int_constants[c_name] = '' " c_value endif endfor " Prepare list of constants from tags file let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) let ext_constants = {} if fnames != '' exe 'silent! vimgrep /^'.a:base.'.*\td\(\t\|$\)/j '.fnames let qflist = getqflist() if len(qflist) > 0 for field in qflist let item = matchstr(field['text'], '^[^[:space:]]\+') let ext_constants[item] = '' endfor endif endif " All constants call extend(int_constants, ext_constants) " Treat keywords as constants let all_values = {} " One big dictionary of functions call extend(all_values, int_functions) " Add constants call extend(all_values, int_constants) " Add keywords call extend(all_values, g:php_keywords) for m in sort(keys(all_values)) if m =~ '^'.a:base call add(res, m) endif endfor let int_list = res let final_list = [] for i in int_list if has_key(int_functions, i) let final_list += \ [{'word':i, \ 'info':i.int_functions[i], \ 'kind':'f'}] elseif has_key(int_constants, i) let final_list += [{'word':i, 'kind':'d'}] else let final_list += [{'word':i}] endif endfor return final_list endif endfunction function! phpcomplete#GetClassName(scontext) " {{{ " Get class name " Class name can be detected in few ways: " @var $myVar class " line above " or line in tags file let object = matchstr(a:scontext, '\zs[a-zA-Z_0-9\x7f-\xff]\+\ze->') let i = 1 while i < line('.') let line = getline(line('.')-i) if line =~ '^\s*\*\/\?\s*$' let i += 1 continue else if line =~ '@var\s\+\$'.object.'\s\+[a-zA-Z_0-9\x7f-\xff]\+' let classname = matchstr(line, '@var\s\+\$'.object.'\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+') return classname else break endif endif endwhile " OK, first way failed, now check tags file(s) let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) exe 'silent! vimgrep /^'.object.'.*\$'.object.'.*=\s*new\s\+.*\tv\(\t\|$\)/j '.fnames let qflist = getqflist() if len(qflist) == 0 return '' else " In all properly managed projects it should be one item list, even if it " *is* longer we cannot solve conflicts, assume it is first element let classname = matchstr(qflist[0]['text'], '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') return classname endif endfunction " }}} function! phpcomplete#GetClassLocation(classname) " {{{ " Check classname may be name of built in object if !exists("g:php_omni_bi_classes") let g:php_omni_bi_classes = {} for i in keys(g:php_builtin_object_functions) let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = '' endfor endif if has_key(g:php_omni_bi_classes, a:classname) return 'VIMPHP_BUILTINOBJECT' endif " Get class location for fname in tagfiles() let fhead = fnamemodify(fname, ":h") if fhead != '' let psep = '/' " Note: slash is potential problem! let fhead .= psep endif let fname = escape(fname, " \\") exe 'silent! vimgrep /^'.a:classname.'.*\tc\(\t\|$\)/j '.fname let qflist = getqflist() " As in GetClassName we can manage only one element if it exists if len(qflist) > 0 let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t') else return '' endif " And only one class location if classlocation != '' let classlocation = fhead.classlocation return classlocation else return '' endif endfor endfunction " }}} function! phpcomplete#GetClassContents(file, name) " {{{ let cfile = join(a:file, "\n") " We use new buffer and (later) normal! because " this is the most efficient way. The other way " is to go through the looong string looking for " matching {} let original_window = winnr() below 1new 0put =cfile call search('class\s\+'.a:name) let cfline = line('.') " Catch extends if getline('.') =~ 'extends' let extends_class = matchstr(getline('.'), \ 'class\s\+'.a:name.'\s\+extends\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze') else let extends_class = '' endif call search('{') normal! % let classc = getline(cfline, ".") let classcontent = join(classc, "\n") bw! % " go back to where we started exe original_window.'wincmd w' if extends_class != '' let classlocation = phpcomplete#GetClassLocation(extends_class) if filereadable(classlocation) let classfile = readfile(classlocation) let classcontent .= "\n".phpcomplete#GetClassContents(classfile, extends_class) endif endif return classcontent endfunction " }}} function! phpcomplete#LoadData() " {{{ " Keywords/reserved words, all other special things {{{ " Later it is possible to add some help to values, or type of " defined variable let g:php_keywords = { \ 'PHP_SELF':'', \ 'argv':'', \ 'argc':'', \ 'GATEWAY_INTERFACE':'', \ 'SERVER_ADDR':'', \ 'SERVER_NAME':'', \ 'SERVER_SOFTWARE':'', \ 'SERVER_PROTOCOL':'', \ 'REQUEST_METHOD':'', \ 'REQUEST_TIME':'', \ 'QUERY_STRING':'', \ 'DOCUMENT_ROOT':'', \ 'HTTP_ACCEPT':'', \ 'HTTP_ACCEPT_CHARSET':'', \ 'HTTP_ACCEPT_ENCODING':'', \ 'HTTP_ACCEPT_LANGUAGE':'', \ 'HTTP_CONNECTION':'', \ 'HTTP_POST':'', \ 'HTTP_REFERER':'', \ 'HTTP_USER_AGENT':'', \ 'HTTPS':'', \ 'REMOTE_ADDR':'', \ 'REMOTE_HOST':'', \ 'REMOTE_PORT':'', \ 'SCRIPT_FILENAME':'', \ 'SERVER_ADMIN':'', \ 'SERVER_PORT':'', \ 'SERVER_SIGNATURE':'', \ 'PATH_TRANSLATED':'', \ 'SCRIPT_NAME':'', \ 'REQUEST_URI':'', \ 'PHP_AUTH_DIGEST':'', \ 'PHP_AUTH_USER':'', \ 'PHP_AUTH_PW':'', \ 'AUTH_TYPE':'', \ 'and':'', \ 'or':'', \ 'xor':'', \ '__FILE__':'', \ 'exception':'', \ '__LINE__':'', \ 'as':'', \ 'break':'', \ 'case':'', \ 'class':'', \ 'const':'', \ 'continue':'', \ 'declare':'', \ 'default':'', \ 'do':'', \ 'echo':'', \ 'else':'', \ 'elseif':'', \ 'enddeclare':'', \ 'endfor':'', \ 'endforeach':'', \ 'endif':'', \ 'endswitch':'', \ 'endwhile':'', \ 'extends':'', \ 'for':'', \ 'foreach':'', \ 'function':'', \ 'global':'', \ 'if':'', \ 'new':'', \ 'static':'', \ 'switch':'', \ 'use':'', \ 'var':'', \ 'while':'', \ '__FUNCTION__':'', \ '__CLASS__':'', \ '__METHOD__':'', \ 'final':'', \ 'php_user_filter':'', \ 'interface':'', \ 'implements':'', \ 'public':'', \ 'private':'', \ 'protected':'', \ 'abstract':'', \ 'clone':'', \ 'try':'', \ 'catch':'', \ 'throw':'', \ 'cfunction':'', \ 'old_function':'', \ 'this':'', \ 'PHP_VERSION': '', \ 'PHP_OS': '', \ 'PHP_SAPI': '', \ 'PHP_EOL': '', \ 'PHP_INT_MAX': '', \ 'PHP_INT_SIZE': '', \ 'DEFAULT_INCLUDE_PATH': '', \ 'PEAR_INSTALL_DIR': '', \ 'PEAR_EXTENSION_DIR': '', \ 'PHP_EXTENSION_DIR': '', \ 'PHP_PREFIX': '', \ 'PHP_BINDIR': '', \ 'PHP_LIBDIR': '', \ 'PHP_DATADIR': '', \ 'PHP_SYSCONFDIR': '', \ 'PHP_LOCALSTATEDIR': '', \ 'PHP_CONFIG_FILE_PATH': '', \ 'PHP_CONFIG_FILE_SCAN_DIR': '', \ 'PHP_SHLIB_SUFFIX': '', \ 'PHP_OUTPUT_HANDLER_START': '', \ 'PHP_OUTPUT_HANDLER_CONT': '', \ 'PHP_OUTPUT_HANDLER_END': '', \ 'E_ERROR': '', \ 'E_WARNING': '', \ 'E_PARSE': '', \ 'E_NOTICE': '', \ 'E_CORE_ERROR': '', \ 'E_CORE_WARNING': '', \ 'E_COMPILE_ERROR': '', \ 'E_COMPILE_WARNING': '', \ 'E_USER_ERROR': '', \ 'E_USER_WARNING': '', \ 'E_USER_NOTICE': '', \ 'E_ALL': '', \ 'E_STRICT': '', \ '__COMPILER_HALT_OFFSET__': '', \ 'EXTR_OVERWRITE': '', \ 'EXTR_SKIP': '', \ 'EXTR_PREFIX_SAME': '', \ 'EXTR_PREFIX_ALL': '', \ 'EXTR_PREFIX_INVALID': '', \ 'EXTR_PREFIX_IF_EXISTS': '', \ 'EXTR_IF_EXISTS': '', \ 'SORT_ASC': '', \ 'SORT_DESC': '', \ 'SORT_REGULAR': '', \ 'SORT_NUMERIC': '', \ 'SORT_STRING': '', \ 'CASE_LOWER': '', \ 'CASE_UPPER': '', \ 'COUNT_NORMAL': '', \ 'COUNT_RECURSIVE': '', \ 'ASSERT_ACTIVE': '', \ 'ASSERT_CALLBACK': '', \ 'ASSERT_BAIL': '', \ 'ASSERT_WARNING': '', \ 'ASSERT_QUIET_EVAL': '', \ 'CONNECTION_ABORTED': '', \ 'CONNECTION_NORMAL': '', \ 'CONNECTION_TIMEOUT': '', \ 'INI_USER': '', \ 'INI_PERDIR': '', \ 'INI_SYSTEM': '', \ 'INI_ALL': '', \ 'M_E': '', \ 'M_LOG2E': '', \ 'M_LOG10E': '', \ 'M_LN2': '', \ 'M_LN10': '', \ 'M_PI': '', \ 'M_PI_2': '', \ 'M_PI_4': '', \ 'M_1_PI': '', \ 'M_2_PI': '', \ 'M_2_SQRTPI': '', \ 'M_SQRT2': '', \ 'M_SQRT1_2': '', \ 'CRYPT_SALT_LENGTH': '', \ 'CRYPT_STD_DES': '', \ 'CRYPT_EXT_DES': '', \ 'CRYPT_MD5': '', \ 'CRYPT_BLOWFISH': '', \ 'DIRECTORY_SEPARATOR': '', \ 'SEEK_SET': '', \ 'SEEK_CUR': '', \ 'SEEK_END': '', \ 'LOCK_SH': '', \ 'LOCK_EX': '', \ 'LOCK_UN': '', \ 'LOCK_NB': '', \ 'HTML_SPECIALCHARS': '', \ 'HTML_ENTITIES': '', \ 'ENT_COMPAT': '', \ 'ENT_QUOTES': '', \ 'ENT_NOQUOTES': '', \ 'INFO_GENERAL': '', \ 'INFO_CREDITS': '', \ 'INFO_CONFIGURATION': '', \ 'INFO_MODULES': '', \ 'INFO_ENVIRONMENT': '', \ 'INFO_VARIABLES': '', \ 'INFO_LICENSE': '', \ 'INFO_ALL': '', \ 'CREDITS_GROUP': '', \ 'CREDITS_GENERAL': '', \ 'CREDITS_SAPI': '', \ 'CREDITS_MODULES': '', \ 'CREDITS_DOCS': '', \ 'CREDITS_FULLPAGE': '', \ 'CREDITS_QA': '', \ 'CREDITS_ALL': '', \ 'STR_PAD_LEFT': '', \ 'STR_PAD_RIGHT': '', \ 'STR_PAD_BOTH': '', \ 'PATHINFO_DIRNAME': '', \ 'PATHINFO_BASENAME': '', \ 'PATHINFO_EXTENSION': '', \ 'PATH_SEPARATOR': '', \ 'CHAR_MAX': '', \ 'LC_CTYPE': '', \ 'LC_NUMERIC': '', \ 'LC_TIME': '', \ 'LC_COLLATE': '', \ 'LC_MONETARY': '', \ 'LC_ALL': '', \ 'LC_MESSAGES': '', \ 'ABDAY_1': '', \ 'ABDAY_2': '', \ 'ABDAY_3': '', \ 'ABDAY_4': '', \ 'ABDAY_5': '', \ 'ABDAY_6': '', \ 'ABDAY_7': '', \ 'DAY_1': '', \ 'DAY_2': '', \ 'DAY_3': '', \ 'DAY_4': '', \ 'DAY_5': '', \ 'DAY_6': '', \ 'DAY_7': '', \ 'ABMON_1': '', \ 'ABMON_2': '', \ 'ABMON_3': '', \ 'ABMON_4': '', \ 'ABMON_5': '', \ 'ABMON_6': '', \ 'ABMON_7': '', \ 'ABMON_8': '', \ 'ABMON_9': '', \ 'ABMON_10': '', \ 'ABMON_11': '', \ 'ABMON_12': '', \ 'MON_1': '', \ 'MON_2': '', \ 'MON_3': '', \ 'MON_4': '', \ 'MON_5': '', \ 'MON_6': '', \ 'MON_7': '', \ 'MON_8': '', \ 'MON_9': '', \ 'MON_10': '', \ 'MON_11': '', \ 'MON_12': '', \ 'AM_STR': '', \ 'PM_STR': '', \ 'D_T_FMT': '', \ 'D_FMT': '', \ 'T_FMT': '', \ 'T_FMT_AMPM': '', \ 'ERA': '', \ 'ERA_YEAR': '', \ 'ERA_D_T_FMT': '', \ 'ERA_D_FMT': '', \ 'ERA_T_FMT': '', \ 'ALT_DIGITS': '', \ 'INT_CURR_SYMBOL': '', \ 'CURRENCY_SYMBOL': '', \ 'CRNCYSTR': '', \ 'MON_DECIMAL_POINT': '', \ 'MON_THOUSANDS_SEP': '', \ 'MON_GROUPING': '', \ 'POSITIVE_SIGN': '', \ 'NEGATIVE_SIGN': '', \ 'INT_FRAC_DIGITS': '', \ 'FRAC_DIGITS': '', \ 'P_CS_PRECEDES': '', \ 'P_SEP_BY_SPACE': '', \ 'N_CS_PRECEDES': '', \ 'N_SEP_BY_SPACE': '', \ 'P_SIGN_POSN': '', \ 'N_SIGN_POSN': '', \ 'DECIMAL_POINT': '', \ 'RADIXCHAR': '', \ 'THOUSANDS_SEP': '', \ 'THOUSEP': '', \ 'GROUPING': '', \ 'YESEXPR': '', \ 'NOEXPR': '', \ 'YESSTR': '', \ 'NOSTR': '', \ 'CODESET': '', \ 'LOG_EMERG': '', \ 'LOG_ALERT': '', \ 'LOG_CRIT': '', \ 'LOG_ERR': '', \ 'LOG_WARNING': '', \ 'LOG_NOTICE': '', \ 'LOG_INFO': '', \ 'LOG_DEBUG': '', \ 'LOG_KERN': '', \ 'LOG_USER': '', \ 'LOG_MAIL': '', \ 'LOG_DAEMON': '', \ 'LOG_AUTH': '', \ 'LOG_SYSLOG': '', \ 'LOG_LPR': '', \ 'LOG_NEWS': '', \ 'LOG_UUCP': '', \ 'LOG_CRON': '', \ 'LOG_AUTHPRIV': '', \ 'LOG_LOCAL0': '', \ 'LOG_LOCAL1': '', \ 'LOG_LOCAL2': '', \ 'LOG_LOCAL3': '', \ 'LOG_LOCAL4': '', \ 'LOG_LOCAL5': '', \ 'LOG_LOCAL6': '', \ 'LOG_LOCAL7': '', \ 'LOG_PID': '', \ 'LOG_CONS': '', \ 'LOG_ODELAY': '', \ 'LOG_NDELAY': '', \ 'LOG_NOWAIT': '', \ 'LOG_PERROR': '', \ } " }}} " PHP builtin functions {{{ " To create from scratch list of functions: " 1. Download multi html file PHP documentation " 2. run for i in `ls | grep "^function\."`; do grep -A4 Description $i >> funcs; done " 3. Open funcs in Vim and " a) g/Description/normal! 5J " b) remove all html tags (it will require few s/// and g//) " c) :%s/^\([^[:space:]]\+\) \([^[:space:]]\+\) ( \(.*\))/\\ '\2(': '\3| \1', " This will create Dictionary " d) remove all /^[^\\] lines let g:php_builtin_functions = { \ 'abs(': 'mixed number | number', \ 'acosh(': 'float arg | float', \ 'acos(': 'float arg | float', \ 'addcslashes(': 'string str, string charlist | string', \ 'addslashes(': 'string str | string', \ 'aggregate(': 'object object, string class_name | void', \ 'aggregate_info(': 'object object | array', \ 'aggregate_methods_by_list(': 'object object, string class_name, array methods_list [, bool exclude] | void', \ 'aggregate_methods_by_regexp(': 'object object, string class_name, string regexp [, bool exclude] | void', \ 'aggregate_methods(': 'object object, string class_name | void', \ 'aggregate_properties_by_list(': 'object object, string class_name, array properties_list [, bool exclude] | void', \ 'aggregate_properties_by_regexp(': 'object object, string class_name, string regexp [, bool exclude] | void', \ 'aggregate_properties(': 'object object, string class_name | void', \ 'apache_child_terminate(': 'void | bool', \ 'apache_getenv(': 'string variable [, bool walk_to_top] | string', \ 'apache_get_modules(': 'void | array', \ 'apache_get_version(': 'void | string', \ 'apache_lookup_uri(': 'string filename | object', \ 'apache_note(': 'string note_name [, string note_value] | string', \ 'apache_request_headers(': 'void | array', \ 'apache_reset_timeout(': 'void | bool', \ 'apache_response_headers(': 'void | array', \ 'apache_setenv(': 'string variable, string value [, bool walk_to_top] | bool', \ 'apc_cache_info(': '[string cache_type] | array', \ 'apc_clear_cache(': '[string cache_type] | bool', \ 'apc_define_constants(': 'string key, array constants [, bool case_sensitive] | bool', \ 'apc_delete(': 'string key | bool', \ 'apc_fetch(': 'string key | mixed', \ 'apc_load_constants(': 'string key [, bool case_sensitive] | bool', \ 'apc_sma_info(': 'void | array', \ 'apc_store(': 'string key, mixed var [, int ttl] | bool', \ 'apd_breakpoint(': 'int debug_level | bool', \ 'apd_callstack(': 'void | array', \ 'apd_clunk(': 'string warning [, string delimiter] | void', \ 'apd_continue(': 'int debug_level | bool', \ 'apd_croak(': 'string warning [, string delimiter] | void', \ 'apd_dump_function_table(': 'void | void', \ 'apd_dump_persistent_resources(': 'void | array', \ 'apd_dump_regular_resources(': 'void | array', \ 'apd_echo(': 'string output | bool', \ 'apd_get_active_symbols(': ' | array', \ 'apd_set_pprof_trace(': '[string dump_directory] | void', \ 'apd_set_session(': 'int debug_level | void', \ 'apd_set_session_trace(': 'int debug_level [, string dump_directory] | void', \ 'apd_set_socket_session_trace(': 'string ip_address_or_unix_socket_file, int socket_type, int port, int debug_level | bool', \ 'array_change_key_case(': 'array input [, int case] | array', \ 'array_chunk(': 'array input, int size [, bool preserve_keys] | array', \ 'array_combine(': 'array keys, array values | array', \ 'array_count_values(': 'array input | array', \ 'array_diff_assoc(': 'array array1, array array2 [, array ...] | array', \ 'array_diff(': 'array array1, array array2 [, array ...] | array', \ 'array_diff_key(': 'array array1, array array2 [, array ...] | array', \ 'array_diff_uassoc(': 'array array1, array array2 [, array ..., callback key_compare_func] | array', \ 'array_diff_ukey(': 'array array1, array array2 [, array ..., callback key_compare_func] | array', \ 'array_fill(': 'int start_index, int num, mixed value | array', \ 'array_filter(': 'array input [, callback callback] | array', \ 'array_flip(': 'array trans | array', \ 'array(': '[mixed ...] | array', \ 'array_intersect_assoc(': 'array array1, array array2 [, array ...] | array', \ 'array_intersect(': 'array array1, array array2 [, array ...] | array', \ 'array_intersect_key(': 'array array1, array array2 [, array ...] | array', \ 'array_intersect_uassoc(': 'array array1, array array2 [, array ..., callback key_compare_func] | array', \ 'array_intersect_ukey(': 'array array1, array array2 [, array ..., callback key_compare_func] | array', \ 'array_key_exists(': 'mixed key, array search | bool', \ 'array_keys(': 'array input [, mixed search_value [, bool strict]] | array', \ 'array_map(': 'callback callback, array arr1 [, array ...] | array', \ 'array_merge(': 'array array1 [, array array2 [, array ...]] | array', \ 'array_merge_recursive(': 'array array1 [, array ...] | array', \ 'array_multisort(': 'array ar1 [, mixed arg [, mixed ... [, array ...]]] | bool', \ 'array_pad(': 'array input, int pad_size, mixed pad_value | array', \ 'array_pop(': 'array &#38;array | mixed', \ 'array_product(': 'array array | number', \ 'array_push(': 'array &#38;array, mixed var [, mixed ...] | int', \ 'array_rand(': 'array input [, int num_req] | mixed', \ 'array_reduce(': 'array input, callback function [, int initial] | mixed', \ 'array_reverse(': 'array array [, bool preserve_keys] | array', \ 'array_search(': 'mixed needle, array haystack [, bool strict] | mixed', \ 'array_shift(': 'array &#38;array | mixed', \ 'array_slice(': 'array array, int offset [, int length [, bool preserve_keys]] | array', \ 'array_splice(': 'array &#38;input, int offset [, int length [, array replacement]] | array', \ 'array_sum(': 'array array | number', \ 'array_udiff_assoc(': 'array array1, array array2 [, array ..., callback data_compare_func] | array', \ 'array_udiff(': 'array array1, array array2 [, array ..., callback data_compare_func] | array', \ 'array_udiff_uassoc(': 'array array1, array array2 [, array ..., callback data_compare_func, callback key_compare_func] | array', \ 'array_uintersect_assoc(': 'array array1, array array2 [, array ..., callback data_compare_func] | array', \ 'array_uintersect(': 'array array1, array array2 [, array ..., callback data_compare_func] | array', \ 'array_uintersect_uassoc(': 'array array1, array array2 [, array ..., callback data_compare_func, callback key_compare_func] | array', \ 'array_unique(': 'array array | array', \ 'array_unshift(': 'array &#38;array, mixed var [, mixed ...] | int', \ 'array_values(': 'array input | array', \ 'array_walk(': 'array &#38;array, callback funcname [, mixed userdata] | bool', \ 'array_walk_recursive(': 'array &#38;input, callback funcname [, mixed userdata] | bool', \ 'arsort(': 'array &#38;array [, int sort_flags] | bool', \ 'ascii2ebcdic(': 'string ascii_str | int', \ 'asinh(': 'float arg | float', \ 'asin(': 'float arg | float', \ 'asort(': 'array &#38;array [, int sort_flags] | bool', \ 'aspell_check(': 'int dictionary_link, string word | bool', \ 'aspell_check_raw(': 'int dictionary_link, string word | bool', \ 'aspell_new(': 'string master [, string personal] | int', \ 'aspell_suggest(': 'int dictionary_link, string word | array', \ 'assert(': 'mixed assertion | bool', \ 'assert_options(': 'int what [, mixed value] | mixed', \ 'atan2(': 'float y, float x | float', \ 'atanh(': 'float arg | float', \ 'atan(': 'float arg | float', \ 'base64_decode(': 'string encoded_data | string', \ 'base64_encode(': 'string data | string', \ 'base_convert(': 'string number, int frombase, int tobase | string', \ 'basename(': 'string path [, string suffix] | string', \ 'bcadd(': 'string left_operand, string right_operand [, int scale] | string', \ 'bccomp(': 'string left_operand, string right_operand [, int scale] | int', \ 'bcdiv(': 'string left_operand, string right_operand [, int scale] | string', \ 'bcmod(': 'string left_operand, string modulus | string', \ 'bcmul(': 'string left_operand, string right_operand [, int scale] | string', \ 'bcompiler_load_exe(': 'string filename | bool', \ 'bcompiler_load(': 'string filename | bool', \ 'bcompiler_parse_class(': 'string class, string callback | bool', \ 'bcompiler_read(': 'resource filehandle | bool', \ 'bcompiler_write_class(': 'resource filehandle, string className [, string extends] | bool', \ 'bcompiler_write_constant(': 'resource filehandle, string constantName | bool', \ 'bcompiler_write_exe_footer(': 'resource filehandle, int startpos | bool', \ 'bcompiler_write_file(': 'resource filehandle, string filename | bool', \ 'bcompiler_write_footer(': 'resource filehandle | bool', \ 'bcompiler_write_function(': 'resource filehandle, string functionName | bool', \ 'bcompiler_write_functions_from_file(': 'resource filehandle, string fileName | bool', \ 'bcompiler_write_header(': 'resource filehandle [, string write_ver] | bool', \ 'bcpow(': 'string x, string y [, int scale] | string', \ 'bcpowmod(': 'string x, string y, string modulus [, int scale] | string', \ 'bcscale(': 'int scale | bool', \ 'bcsqrt(': 'string operand [, int scale] | string', \ 'bcsub(': 'string left_operand, string right_operand [, int scale] | string', \ 'bin2hex(': 'string str | string', \ 'bindec(': 'string binary_string | number', \ 'bind_textdomain_codeset(': 'string domain, string codeset | string', \ 'bindtextdomain(': 'string domain, string directory | string', \ 'bzclose(': 'resource bz | int', \ 'bzcompress(': 'string source [, int blocksize [, int workfactor]] | mixed', \ 'bzdecompress(': 'string source [, int small] | mixed', \ 'bzerrno(': 'resource bz | int', \ 'bzerror(': 'resource bz | array', \ 'bzerrstr(': 'resource bz | string', \ 'bzflush(': 'resource bz | int', \ 'bzopen(': 'string filename, string mode | resource', \ 'bzread(': 'resource bz [, int length] | string', \ 'bzwrite(': 'resource bz, string data [, int length] | int', \ 'cal_days_in_month(': 'int calendar, int month, int year | int', \ 'cal_from_jd(': 'int jd, int calendar | array', \ 'cal_info(': '[int calendar] | array', \ 'call_user_func_array(': 'callback function, array param_arr | mixed', \ 'call_user_func(': 'callback function [, mixed parameter [, mixed ...]] | mixed', \ 'call_user_method_array(': 'string method_name, object &#38;obj, array paramarr | mixed', \ 'call_user_method(': 'string method_name, object &#38;obj [, mixed parameter [, mixed ...]] | mixed', \ 'cal_to_jd(': 'int calendar, int month, int day, int year | int', \ 'ccvs_add(': 'string session, string invoice, string argtype, string argval | string', \ 'ccvs_auth(': 'string session, string invoice | string', \ 'ccvs_command(': 'string session, string type, string argval | string', \ 'ccvs_count(': 'string session, string type | int', \ 'ccvs_delete(': 'string session, string invoice | string', \ 'ccvs_done(': 'string sess | string', \ 'ccvs_init(': 'string name | string', \ 'ccvs_lookup(': 'string session, string invoice, int inum | string', \ 'ccvs_new(': 'string session, string invoice | string', \ 'ccvs_report(': 'string session, string type | string', \ 'ccvs_return(': 'string session, string invoice | string', \ 'ccvs_reverse(': 'string session, string invoice | string', \ 'ccvs_sale(': 'string session, string invoice | string', \ 'ccvs_status(': 'string session, string invoice | string', \ 'ccvs_textvalue(': 'string session | string', \ 'ccvs_void(': 'string session, string invoice | string', \ 'ceil(': 'float value | float', \ 'chdir(': 'string directory | bool', \ 'checkdate(': 'int month, int day, int year | bool', \ 'checkdnsrr(': 'string host [, string type] | int', \ 'chgrp(': 'string filename, mixed group | bool', \ 'chmod(': 'string filename, int mode | bool', \ 'chown(': 'string filename, mixed user | bool', \ 'chr(': 'int ascii | string', \ 'chroot(': 'string directory | bool', \ 'chunk_split(': 'string body [, int chunklen [, string end]] | string', \ 'class_exists(': 'string class_name [, bool autoload] | bool', \ 'class_implements(': 'mixed class [, bool autoload] | array', \ 'classkit_import(': 'string filename | array', \ 'classkit_method_add(': 'string classname, string methodname, string args, string code [, int flags] | bool', \ 'classkit_method_copy(': 'string dClass, string dMethod, string sClass [, string sMethod] | bool', \ 'classkit_method_redefine(': 'string classname, string methodname, string args, string code [, int flags] | bool', \ 'classkit_method_remove(': 'string classname, string methodname | bool', \ 'classkit_method_rename(': 'string classname, string methodname, string newname | bool', \ 'class_parents(': 'mixed class [, bool autoload] | array', \ 'clearstatcache(': 'void | void', \ 'closedir(': 'resource dir_handle | void', \ 'closelog(': 'void | bool', \ 'com_addref(': 'void | void', \ 'com_create_guid(': 'void | string', \ 'com_event_sink(': 'variant comobject, object sinkobject [, mixed sinkinterface] | bool', \ 'com_get_active_object(': 'string progid [, int code_page] | variant', \ 'com_get(': 'resource com_object, string property | mixed', \ 'com_invoke(': 'resource com_object, string function_name [, mixed function_parameters] | mixed', \ 'com_isenum(': 'variant com_module | bool', \ 'com_load(': 'string module_name [, string server_name [, int codepage]] | resource', \ 'com_load_typelib(': 'string typelib_name [, bool case_insensitive] | bool', \ 'com_message_pump(': '[int timeoutms] | bool', \ 'compact(': 'mixed varname [, mixed ...] | array', \ 'com_print_typeinfo(': 'object comobject [, string dispinterface [, bool wantsink]] | bool', \ 'com_release(': 'void | void', \ 'com_set(': 'resource com_object, string property, mixed value | void', \ 'connection_aborted(': 'void | int', \ 'connection_status(': 'void | int', \ 'connection_timeout(': 'void | bool', \ 'constant(': 'string name | mixed', \ 'convert_cyr_string(': 'string str, string from, string to | string', \ 'convert_uudecode(': 'string data | string', \ 'convert_uuencode(': 'string data | string', \ 'copy(': 'string source, string dest | bool', \ 'cosh(': 'float arg | float', \ 'cos(': 'float arg | float', \ 'count_chars(': 'string string [, int mode] | mixed', \ 'count(': 'mixed var [, int mode] | int', \ 'cpdf_add_annotation(': 'int pdf_document, float llx, float lly, float urx, float ury, string title, string content [, int mode] | bool', \ 'cpdf_add_outline(': 'int pdf_document, int lastoutline, int sublevel, int open, int pagenr, string text | int', \ 'cpdf_arc(': 'int pdf_document, float x_coor, float y_coor, float radius, float start, float end [, int mode] | bool', \ 'cpdf_begin_text(': 'int pdf_document | bool', \ 'cpdf_circle(': 'int pdf_document, float x_coor, float y_coor, float radius [, int mode] | bool', \ 'cpdf_clip(': 'int pdf_document | bool', \ 'cpdf_close(': 'int pdf_document | bool', \ 'cpdf_closepath_fill_stroke(': 'int pdf_document | bool', \ 'cpdf_closepath(': 'int pdf_document | bool', \ 'cpdf_closepath_stroke(': 'int pdf_document | bool', \ 'cpdf_continue_text(': 'int pdf_document, string text | bool', \ 'cpdf_curveto(': 'int pdf_document, float x1, float y1, float x2, float y2, float x3, float y3 [, int mode] | bool', \ 'cpdf_end_text(': 'int pdf_document | bool', \ 'cpdf_fill(': 'int pdf_document | bool', \ 'cpdf_fill_stroke(': 'int pdf_document | bool', \ 'cpdf_finalize(': 'int pdf_document | bool', \ 'cpdf_finalize_page(': 'int pdf_document, int page_number | bool', \ 'cpdf_global_set_document_limits(': 'int maxpages, int maxfonts, int maximages, int maxannotations, int maxobjects | bool', \ 'cpdf_import_jpeg(': 'int pdf_document, string file_name, float x_coor, float y_coor, float angle, float width, float height, float x_scale, float y_scale, int gsave [, int mode] | bool', \ 'cpdf_lineto(': 'int pdf_document, float x_coor, float y_coor [, int mode] | bool', \ 'cpdf_moveto(': 'int pdf_document, float x_coor, float y_coor [, int mode] | bool', \ 'cpdf_newpath(': 'int pdf_document | bool', \ 'cpdf_open(': 'int compression [, string filename [, array doc_limits]] | int', \ 'cpdf_output_buffer(': 'int pdf_document | bool', \ 'cpdf_page_init(': 'int pdf_document, int page_number, int orientation, float height, float width [, float unit] | bool', \ 'cpdf_place_inline_image(': 'int pdf_document, int image, float x_coor, float y_coor, float angle, float width, float height, int gsave [, int mode] | bool', \ 'cpdf_rect(': 'int pdf_document, float x_coor, float y_coor, float width, float height [, int mode] | bool', \ 'cpdf_restore(': 'int pdf_document | bool', \ 'cpdf_rlineto(': 'int pdf_document, float x_coor, float y_coor [, int mode] | bool', \ 'cpdf_rmoveto(': 'int pdf_document, float x_coor, float y_coor [, int mode] | bool', \ 'cpdf_rotate(': 'int pdf_document, float angle | bool', \ 'cpdf_rotate_text(': 'int pdfdoc, float angle | bool', \ 'cpdf_save(': 'int pdf_document | bool', \ 'cpdf_save_to_file(': 'int pdf_document, string filename | bool', \ 'cpdf_scale(': 'int pdf_document, float x_scale, float y_scale | bool', \ 'cpdf_set_action_url(': 'int pdfdoc, float xll, float yll, float xur, float xur, string url [, int mode] | bool', \ 'cpdf_set_char_spacing(': 'int pdf_document, float space | bool', \ 'cpdf_set_creator(': 'int pdf_document, string creator | bool', \ 'cpdf_set_current_page(': 'int pdf_document, int page_number | bool', \ 'cpdf_setdash(': 'int pdf_document, float white, float black | bool', \ 'cpdf_setflat(': 'int pdf_document, float value | bool', \ 'cpdf_set_font_directories(': 'int pdfdoc, string pfmdir, string pfbdir | bool', \ 'cpdf_set_font(': 'int pdf_document, string font_name, float size, string encoding | bool', \ 'cpdf_set_font_map_file(': 'int pdfdoc, string filename | bool', \ 'cpdf_setgray_fill(': 'int pdf_document, float value | bool', \ 'cpdf_setgray(': 'int pdf_document, float gray_value | bool', \ 'cpdf_setgray_stroke(': 'int pdf_document, float gray_value | bool', \ 'cpdf_set_horiz_scaling(': 'int pdf_document, float scale | bool', \ 'cpdf_set_keywords(': 'int pdf_document, string keywords | bool', \ 'cpdf_set_leading(': 'int pdf_document, float distance | bool', \ 'cpdf_setlinecap(': 'int pdf_document, int value | bool', \ 'cpdf_setlinejoin(': 'int pdf_document, int value | bool', \ 'cpdf_setlinewidth(': 'int pdf_document, float width | bool', \ 'cpdf_setmiterlimit(': 'int pdf_document, float value | bool', \ 'cpdf_set_page_animation(': 'int pdf_document, int transition, float duration, float direction, int orientation, int inout | bool', \ 'cpdf_setrgbcolor_fill(': 'int pdf_document, float red_value, float green_value, float blue_value | bool', \ 'cpdf_setrgbcolor(': 'int pdf_document, float red_value, float green_value, float blue_value | bool', \ 'cpdf_setrgbcolor_stroke(': 'int pdf_document, float red_value, float green_value, float blue_value | bool', \ 'cpdf_set_subject(': 'int pdf_document, string subject | bool', \ 'cpdf_set_text_matrix(': 'int pdf_document, array matrix | bool', \ 'cpdf_set_text_pos(': 'int pdf_document, float x_coor, float y_coor [, int mode] | bool', \ 'cpdf_set_text_rendering(': 'int pdf_document, int rendermode | bool', \ 'cpdf_set_text_rise(': 'int pdf_document, float value | bool', \ 'cpdf_set_title(': 'int pdf_document, string title | bool', \ 'cpdf_set_viewer_preferences(': 'int pdfdoc, array preferences | bool', \ 'cpdf_set_word_spacing(': 'int pdf_document, float space | bool', \ 'cpdf_show(': 'int pdf_document, string text | bool', \ 'cpdf_show_xy(': 'int pdf_document, string text, float x_coor, float y_coor [, int mode] | bool', \ 'cpdf_stringwidth(': 'int pdf_document, string text | float', \ 'cpdf_stroke(': 'int pdf_document | bool', \ 'cpdf_text(': 'int pdf_document, string text [, float x_coor, float y_coor [, int mode [, float orientation [, int alignmode]]]] | bool', \ 'cpdf_translate(': 'int pdf_document, float x_coor, float y_coor | bool', \ 'crack_check(': 'resource dictionary, string password | bool', \ 'crack_closedict(': '[resource dictionary] | bool', \ 'crack_getlastmessage(': 'void | string', \ 'crack_opendict(': 'string dictionary | resource', \ 'crc32(': 'string str | int', \ 'create_function(': 'string args, string code | string', \ 'crypt(': 'string str [, string salt] | string', \ 'ctype_alnum(': 'string text | bool', \ 'ctype_alpha(': 'string text | bool', \ 'ctype_cntrl(': 'string text | bool', \ 'ctype_digit(': 'string text | bool', \ 'ctype_graph(': 'string text | bool', \ 'ctype_lower(': 'string text | bool', \ 'ctype_print(': 'string text | bool', \ 'ctype_punct(': 'string text | bool', \ 'ctype_space(': 'string text | bool', \ 'ctype_upper(': 'string text | bool', \ 'ctype_xdigit(': 'string text | bool', \ 'curl_close(': 'resource ch | void', \ 'curl_copy_handle(': 'resource ch | resource', \ 'curl_errno(': 'resource ch | int', \ 'curl_error(': 'resource ch | string', \ 'curl_exec(': 'resource ch | mixed', \ 'curl_getinfo(': 'resource ch [, int opt] | mixed', \ 'curl_init(': '[string url] | resource', \ 'curl_multi_add_handle(': 'resource mh, resource ch | int', \ 'curl_multi_close(': 'resource mh | void', \ 'curl_multi_exec(': 'resource mh, int &#38;still_running | int', \ 'curl_multi_getcontent(': 'resource ch | string', \ 'curl_multi_info_read(': 'resource mh | array', \ 'curl_multi_init(': 'void | resource', \ 'curl_multi_remove_handle(': 'resource mh, resource ch | int', \ 'curl_multi_select(': 'resource mh [, float timeout] | int', \ 'curl_setopt(': 'resource ch, int option, mixed value | bool', \ 'curl_version(': '[int version] | array', \ 'current(': 'array &#38;array | mixed', \ 'cybercash_base64_decode(': 'string inbuff | string', \ 'cybercash_base64_encode(': 'string inbuff | string', \ 'cybercash_decr(': 'string wmk, string sk, string inbuff | array', \ 'cybercash_encr(': 'string wmk, string sk, string inbuff | array', \ 'cybermut_creerformulairecm(': 'string url_cm, string version, string tpe, string price, string ref_command, string text_free, string url_return, string url_return_ok, string url_return_err, string language, string code_company, string text_button | string', \ 'cybermut_creerreponsecm(': 'string sentence | string', \ 'cybermut_testmac(': 'string code_mac, string version, string tpe, string cdate, string price, string ref_command, string text_free, string code_return | bool', \ 'cyrus_authenticate(': 'resource connection [, string mechlist [, string service [, string user [, int minssf [, int maxssf [, string authname [, string password]]]]]]] | void', \ 'cyrus_bind(': 'resource connection, array callbacks | bool', \ 'cyrus_close(': 'resource connection | bool', \ 'cyrus_connect(': '[string host [, string port [, int flags]]] | resource', \ 'cyrus_query(': 'resource connection, string query | array', \ 'cyrus_unbind(': 'resource connection, string trigger_name | bool', \ 'date_default_timezone_get(': 'void | string', \ 'date_default_timezone_set(': 'string timezone_identifier | bool', \ 'date(': 'string format [, int timestamp] | string', \ 'date_sunrise(': 'int timestamp [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]] | mixed', \ 'date_sunset(': 'int timestamp [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]] | mixed', \ 'db2_autocommit(': 'resource connection [, bool value] | mixed', \ 'db2_bind_param(': 'resource stmt, int parameter-number, string variable-name [, int parameter-type [, int data-type [, int precision [, int scale]]]] | bool', \ 'db2_client_info(': 'resource connection | object', \ 'db2_close(': 'resource connection | bool', \ 'db2_column_privileges(': 'resource connection [, string qualifier [, string schema [, string table-name [, string column-name]]]] | resource', \ 'db2_columns(': 'resource connection [, string qualifier [, string schema [, string table-name [, string column-name]]]] | resource', \ 'db2_commit(': 'resource connection | bool', \ 'db2_connect(': 'string database, string username, string password [, array options] | resource', \ 'db2_conn_error(': '[resource connection] | string', \ 'db2_conn_errormsg(': '[resource connection] | string', \ 'db2_cursor_type(': 'resource stmt | int', \ 'db2_exec(': 'resource connection, string statement [, array options] | resource', \ 'db2_execute(': 'resource stmt [, array parameters] | bool', \ 'db2_fetch_array(': 'resource stmt [, int row_number] | array', \ 'db2_fetch_assoc(': 'resource stmt [, int row_number] | array', \ 'db2_fetch_both(': 'resource stmt [, int row_number] | array', \ 'db2_fetch_object(': 'resource stmt [, int row_number] | object', \ 'db2_fetch_row(': 'resource stmt [, int row_number] | bool', \ 'db2_field_display_size(': 'resource stmt, mixed column | int', \ 'db2_field_name(': 'resource stmt, mixed column | string', \ 'db2_field_num(': 'resource stmt, mixed column | int', \ 'db2_field_precision(': 'resource stmt, mixed column | int', \ 'db2_field_scale(': 'resource stmt, mixed column | int', \ 'db2_field_type(': 'resource stmt, mixed column | string', \ 'db2_field_width(': 'resource stmt, mixed column | int', \ 'db2_foreign_keys(': 'resource connection, string qualifier, string schema, string table-name | resource', \ 'db2_free_result(': 'resource stmt | bool', \ 'db2_free_stmt(': 'resource stmt | bool', \ 'db2_next_result(': 'resource stmt | resource', \ 'db2_num_fields(': 'resource stmt | int', \ 'db2_num_rows(': 'resource stmt | int', \ 'db2_pconnect(': 'string database, string username, string password [, array options] | resource', \ 'db2_prepare(': 'resource connection, string statement [, array options] | resource', \ 'db2_primary_keys(': 'resource connection, string qualifier, string schema, string table-name | resource', \ 'db2_procedure_columns(': 'resource connection, string qualifier, string schema, string procedure, string parameter | resource', \ 'db2_procedures(': 'resource connection, string qualifier, string schema, string procedure | resource', \ 'db2_result(': 'resource stmt, mixed column | mixed', \ 'db2_rollback(': 'resource connection | bool', \ 'db2_server_info(': 'resource connection | object', \ 'db2_special_columns(': 'resource connection, string qualifier, string schema, string table_name, int scope | resource', \ 'db2_statistics(': 'resource connection, string qualifier, string schema, string table-name, bool unique | resource', \ 'db2_stmt_error(': '[resource stmt] | string', \ 'db2_stmt_errormsg(': '[resource stmt] | string', \ 'db2_table_privileges(': 'resource connection [, string qualifier [, string schema [, string table_name]]] | resource', \ 'db2_tables(': 'resource connection [, string qualifier [, string schema [, string table-name [, string table-type]]]] | resource', \ 'dba_close(': 'resource handle | void', \ 'dba_delete(': 'string key, resource handle | bool', \ 'dba_exists(': 'string key, resource handle | bool', \ 'dba_fetch(': 'string key, resource handle | string', \ 'dba_firstkey(': 'resource handle | string', \ 'dba_handlers(': '[bool full_info] | array', \ 'dba_insert(': 'string key, string value, resource handle | bool', \ 'dba_key_split(': 'mixed key | mixed', \ 'dba_list(': 'void | array', \ 'dba_nextkey(': 'resource handle | string', \ 'dba_open(': 'string path, string mode [, string handler [, mixed ...]] | resource', \ 'dba_optimize(': 'resource handle | bool', \ 'dba_popen(': 'string path, string mode [, string handler [, mixed ...]] | resource', \ 'dba_replace(': 'string key, string value, resource handle | bool', \ 'dbase_add_record(': 'int dbase_identifier, array record | bool', \ 'dbase_close(': 'int dbase_identifier | bool', \ 'dbase_create(': 'string filename, array fields | int', \ 'dbase_delete_record(': 'int dbase_identifier, int record_number | bool', \ 'dbase_get_header_info(': 'int dbase_identifier | array', \ 'dbase_get_record(': 'int dbase_identifier, int record_number | array', \ 'dbase_get_record_with_names(': 'int dbase_identifier, int record_number | array', \ 'dbase_numfields(': 'int dbase_identifier | int', \ 'dbase_numrecords(': 'int dbase_identifier | int', \ 'dbase_open(': 'string filename, int mode | int', \ 'dbase_pack(': 'int dbase_identifier | bool', \ 'dbase_replace_record(': 'int dbase_identifier, array record, int record_number | bool', \ 'dba_sync(': 'resource handle | bool', \ 'dblist(': 'void | string', \ 'dbmclose(': 'resource dbm_identifier | bool', \ 'dbmdelete(': 'resource dbm_identifier, string key | bool', \ 'dbmexists(': 'resource dbm_identifier, string key | bool', \ 'dbmfetch(': 'resource dbm_identifier, string key | string', \ 'dbmfirstkey(': 'resource dbm_identifier | string', \ 'dbminsert(': 'resource dbm_identifier, string key, string value | int', \ 'dbmnextkey(': 'resource dbm_identifier, string key | string', \ 'dbmopen(': 'string filename, string flags | resource', \ 'dbmreplace(': 'resource dbm_identifier, string key, string value | int', \ 'dbplus_add(': 'resource relation, array tuple | int', \ 'dbplus_aql(': 'string query [, string server [, string dbpath]] | resource', \ 'dbplus_chdir(': '[string newdir] | string', \ 'dbplus_close(': 'resource relation | mixed', \ 'dbplus_curr(': 'resource relation, array &#38;tuple | int', \ 'dbplus_errcode(': '[int errno] | string', \ 'dbplus_errno(': 'void | int', \ 'dbplus_find(': 'resource relation, array constraints, mixed tuple | int', \ 'dbplus_first(': 'resource relation, array &#38;tuple | int', \ 'dbplus_flush(': 'resource relation | int', \ 'dbplus_freealllocks(': 'void | int', \ 'dbplus_freelock(': 'resource relation, string tname | int', \ 'dbplus_freerlocks(': 'resource relation | int', \ 'dbplus_getlock(': 'resource relation, string tname | int', \ 'dbplus_getunique(': 'resource relation, int uniqueid | int', \ 'dbplus_info(': 'resource relation, string key, array &#38;result | int', \ 'dbplus_last(': 'resource relation, array &#38;tuple | int', \ 'dbplus_lockrel(': 'resource relation | int', \ 'dbplus_next(': 'resource relation, array &#38;tuple | int', \ 'dbplus_open(': 'string name | resource', \ 'dbplus_prev(': 'resource relation, array &#38;tuple | int', \ 'dbplus_rchperm(': 'resource relation, int mask, string user, string group | int', \ 'dbplus_rcreate(': 'string name, mixed domlist [, bool overwrite] | resource', \ 'dbplus_rcrtexact(': 'string name, resource relation [, bool overwrite] | mixed', \ 'dbplus_rcrtlike(': 'string name, resource relation [, int overwrite] | mixed', \ 'dbplus_resolve(': 'string relation_name | array', \ 'dbplus_restorepos(': 'resource relation, array tuple | int', \ 'dbplus_rkeys(': 'resource relation, mixed domlist | mixed', \ 'dbplus_ropen(': 'string name | resource', \ 'dbplus_rquery(': 'string query [, string dbpath] | resource', \ 'dbplus_rrename(': 'resource relation, string name | int', \ 'dbplus_rsecindex(': 'resource relation, mixed domlist, int type | mixed', \ 'dbplus_runlink(': 'resource relation | int', \ 'dbplus_rzap(': 'resource relation | int', \ 'dbplus_savepos(': 'resource relation | int', \ 'dbplus_setindexbynumber(': 'resource relation, int idx_number | int', \ 'dbplus_setindex(': 'resource relation, string idx_name | int', \ 'dbplus_sql(': 'string query [, string server [, string dbpath]] | resource', \ 'dbplus_tcl(': 'int sid, string script | string', \ 'dbplus_tremove(': 'resource relation, array tuple [, array &#38;current] | int', \ 'dbplus_undo(': 'resource relation | int', \ 'dbplus_undoprepare(': 'resource relation | int', \ 'dbplus_unlockrel(': 'resource relation | int', \ 'dbplus_unselect(': 'resource relation | int', \ 'dbplus_update(': 'resource relation, array old, array new | int', \ 'dbplus_xlockrel(': 'resource relation | int', \ 'dbplus_xunlockrel(': 'resource relation | int', \ 'dbx_close(': 'object link_identifier | bool', \ 'dbx_compare(': 'array row_a, array row_b, string column_key [, int flags] | int', \ 'dbx_connect(': 'mixed module, string host, string database, string username, string password [, int persistent] | object', \ 'dbx_error(': 'object link_identifier | string', \ 'dbx_escape_string(': 'object link_identifier, string text | string', \ 'dbx_fetch_row(': 'object result_identifier | mixed', \ 'dbx_query(': 'object link_identifier, string sql_statement [, int flags] | mixed', \ 'dbx_sort(': 'object result, string user_compare_function | bool', \ 'dcgettext(': 'string domain, string message, int category | string', \ 'dcngettext(': 'string domain, string msgid1, string msgid2, int n, int category | string', \ 'deaggregate(': 'object object [, string class_name] | void', \ 'debug_backtrace(': 'void | array', \ 'debugger_off(': 'void | int', \ 'debugger_on(': 'string address | int', \ 'debug_print_backtrace(': 'void | void', \ 'debug_zval_dump(': 'mixed variable | void', \ 'decbin(': 'int number | string', \ 'dechex(': 'int number | string', \ 'decoct(': 'int number | string', \ 'defined(': 'string name | bool', \ 'define(': 'string name, mixed value [, bool case_insensitive] | bool', \ 'define_syslog_variables(': 'void | void', \ 'deg2rad(': 'float number | float', \ 'delete(': 'string file | void', \ 'dgettext(': 'string domain, string message | string', \ 'dio_close(': 'resource fd | void', \ 'dio_fcntl(': 'resource fd, int cmd [, mixed args] | mixed', \ 'dio_open(': 'string filename, int flags [, int mode] | resource', \ 'dio_read(': 'resource fd [, int len] | string', \ 'dio_seek(': 'resource fd, int pos [, int whence] | int', \ 'dio_stat(': 'resource fd | array', \ 'dio_tcsetattr(': 'resource fd, array options | bool', \ 'dio_truncate(': 'resource fd, int offset | bool', \ 'dio_write(': 'resource fd, string data [, int len] | int', \ 'dirname(': 'string path | string', \ 'disk_free_space(': 'string directory | float', \ 'disk_total_space(': 'string directory | float', \ 'dl(': 'string library | int', \ 'dngettext(': 'string domain, string msgid1, string msgid2, int n | string', \ 'dns_check_record(': 'string host [, string type] | bool', \ 'dns_get_mx(': 'string hostname, array &#38;mxhosts [, array &#38;weight] | bool', \ 'dns_get_record(': 'string hostname [, int type [, array &#38;authns, array &#38;addtl]] | array', \ 'DomDocument-&#62;add_root(': 'string name | domelement', \ 'DomDocument-&#62;create_attribute(': 'string name, string value | domattribute', \ 'DomDocument-&#62;create_cdata_section(': 'string content | domcdata', \ 'DomDocument-&#62;create_comment(': 'string content | domcomment', \ 'DomDocument-&#62;create_element(': 'string name | domelement', \ 'DomDocument-&#62;create_element_ns(': 'string uri, string name [, string prefix] | domelement', \ 'DomDocument-&#62;create_entity_reference(': 'string content | domentityreference', \ 'DomDocument-&#62;create_processing_instruction(': 'string content | domprocessinginstruction', \ 'DomDocument-&#62;create_text_node(': 'string content | domtext', \ 'DomDocument-&#62;doctype(': 'void | domdocumenttype', \ 'DomDocument-&#62;document_element(': 'void | domelement', \ 'DomDocument-&#62;dump_file(': 'string filename [, bool compressionmode [, bool format]] | string', \ 'DomDocument-&#62;dump_mem(': '[bool format [, string encoding]] | string', \ 'DomDocument-&#62;get_element_by_id(': 'string id | domelement', \ 'DomDocument-&#62;get_elements_by_tagname(': 'string name | array', \ 'DomDocument-&#62;html_dump_mem(': 'void | string', \ 'DomDocument-&#62;xinclude(': 'void | int', \ 'dom_import_simplexml(': 'SimpleXMLElement node | DOMElement', \ 'DomNode-&#62;append_sibling(': 'domelement newnode | domelement', \ 'DomNode-&#62;attributes(': 'void | array', \ 'DomNode-&#62;child_nodes(': 'void | array', \ 'DomNode-&#62;clone_node(': 'void | domelement', \ 'DomNode-&#62;dump_node(': 'void | string', \ 'DomNode-&#62;first_child(': 'void | domelement', \ 'DomNode-&#62;get_content(': 'void | string', \ 'DomNode-&#62;has_attributes(': 'void | bool', \ 'DomNode-&#62;has_child_nodes(': 'void | bool', \ 'DomNode-&#62;insert_before(': 'domelement newnode, domelement refnode | domelement', \ 'DomNode-&#62;is_blank_node(': 'void | bool', \ 'DomNode-&#62;last_child(': 'void | domelement', \ 'DomNode-&#62;next_sibling(': 'void | domelement', \ 'DomNode-&#62;node_name(': 'void | string', \ 'DomNode-&#62;node_type(': 'void | int', \ 'DomNode-&#62;node_value(': 'void | string', \ 'DomNode-&#62;owner_document(': 'void | domdocument', \ 'DomNode-&#62;parent_node(': 'void | domnode', \ 'DomNode-&#62;prefix(': 'void | string', \ 'DomNode-&#62;previous_sibling(': 'void | domelement', \ 'DomNode-&#62;remove_child(': 'domtext oldchild | domtext', \ 'DomNode-&#62;replace_child(': 'domelement oldnode, domelement newnode | domelement', \ 'DomNode-&#62;replace_node(': 'domelement newnode | domelement', \ 'DomNode-&#62;set_content(': 'string content | bool', \ 'DomNode-&#62;set_name(': 'void | bool', \ 'DomNode-&#62;set_namespace(': 'string uri [, string prefix] | void', \ 'DomNode-&#62;unlink_node(': 'void | void', \ 'domxml_new_doc(': 'string version | DomDocument', \ 'domxml_open_file(': 'string filename [, int mode [, array &#38;error]] | DomDocument', \ 'domxml_open_mem(': 'string str [, int mode [, array &#38;error]] | DomDocument', \ 'domxml_version(': 'void | string', \ 'domxml_xmltree(': 'string str | DomDocument', \ 'domxml_xslt_stylesheet_doc(': 'DomDocument xsl_doc | DomXsltStylesheet', \ 'domxml_xslt_stylesheet_file(': 'string xsl_file | DomXsltStylesheet', \ 'domxml_xslt_stylesheet(': 'string xsl_buf | DomXsltStylesheet', \ 'domxml_xslt_version(': 'void | int', \ 'dotnet_load(': 'string assembly_name [, string datatype_name [, int codepage]] | int', \ 'each(': 'array &#38;array | array', \ 'easter_date(': '[int year] | int', \ 'easter_days(': '[int year [, int method]] | int', \ 'ebcdic2ascii(': 'string ebcdic_str | int', \ 'echo(': 'string arg1 [, string ...] | void', \ 'empty(': 'mixed var | bool', \ 'end(': 'array &#38;array | mixed', \ 'ereg(': 'string pattern, string string [, array &#38;regs] | int', \ 'eregi(': 'string pattern, string string [, array &#38;regs] | int', \ 'eregi_replace(': 'string pattern, string replacement, string string | string', \ 'ereg_replace(': 'string pattern, string replacement, string string | string', \ 'error_log(': 'string message [, int message_type [, string destination [, string extra_headers]]] | bool', \ 'error_reporting(': '[int level] | int', \ 'escapeshellarg(': 'string arg | string', \ 'escapeshellcmd(': 'string command | string', \ 'eval(': 'string code_str | mixed', \ 'exec(': 'string command [, array &#38;output [, int &#38;return_var]] | string', \ 'exif_imagetype(': 'string filename | int', \ 'exif_read_data(': 'string filename [, string sections [, bool arrays [, bool thumbnail]]] | array', \ 'exif_tagname(': 'string index | string', \ 'exif_thumbnail(': 'string filename [, int &#38;width [, int &#38;height [, int &#38;imagetype]]] | string', \ 'exit(': '[string status] | void', \ 'expect_expectl(': 'resource expect, array cases, string &#38;match | mixed', \ 'expect_popen(': 'string command | resource', \ 'exp(': 'float arg | float', \ 'explode(': 'string separator, string string [, int limit] | array', \ 'expm1(': 'float number | float', \ 'extension_loaded(': 'string name | bool', \ 'extract(': 'array var_array [, int extract_type [, string prefix]] | int', \ 'ezmlm_hash(': 'string addr | int', \ 'fam_cancel_monitor(': 'resource fam, resource fam_monitor | bool', \ 'fam_close(': 'resource fam | void', \ 'fam_monitor_collection(': 'resource fam, string dirname, int depth, string mask | resource', \ 'fam_monitor_directory(': 'resource fam, string dirname | resource', \ 'fam_monitor_file(': 'resource fam, string filename | resource', \ 'fam_next_event(': 'resource fam | array', \ 'fam_open(': '[string appname] | resource', \ 'fam_pending(': 'resource fam | int', \ 'fam_resume_monitor(': 'resource fam, resource fam_monitor | bool', \ 'fam_suspend_monitor(': 'resource fam, resource fam_monitor | bool', \ 'fbsql_affected_rows(': '[resource link_identifier] | int', \ 'fbsql_autocommit(': 'resource link_identifier [, bool OnOff] | bool', \ 'fbsql_blob_size(': 'string blob_handle [, resource link_identifier] | int', \ 'fbsql_change_user(': 'string user, string password [, string database [, resource link_identifier]] | resource', \ 'fbsql_clob_size(': 'string clob_handle [, resource link_identifier] | int', \ 'fbsql_close(': '[resource link_identifier] | bool', \ 'fbsql_commit(': '[resource link_identifier] | bool', \ 'fbsql_connect(': '[string hostname [, string username [, string password]]] | resource', \ 'fbsql_create_blob(': 'string blob_data [, resource link_identifier] | string', \ 'fbsql_create_clob(': 'string clob_data [, resource link_identifier] | string', \ 'fbsql_create_db(': 'string database_name [, resource link_identifier [, string database_options]] | bool', \ 'fbsql_database(': 'resource link_identifier [, string database] | string', \ 'fbsql_database_password(': 'resource link_identifier [, string database_password] | string', \ 'fbsql_data_seek(': 'resource result_identifier, int row_number | bool', \ 'fbsql_db_query(': 'string database, string query [, resource link_identifier] | resource', \ 'fbsql_db_status(': 'string database_name [, resource link_identifier] | int', \ 'fbsql_drop_db(': 'string database_name [, resource link_identifier] | bool', \ 'fbsql_errno(': '[resource link_identifier] | int', \ 'fbsql_error(': '[resource link_identifier] | string', \ 'fbsql_fetch_array(': 'resource result [, int result_type] | array', \ 'fbsql_fetch_assoc(': 'resource result | array', \ 'fbsql_fetch_field(': 'resource result [, int field_offset] | object', \ 'fbsql_fetch_lengths(': 'resource result | array', \ 'fbsql_fetch_object(': 'resource result [, int result_type] | object', \ 'fbsql_fetch_row(': 'resource result | array', \ 'fbsql_field_flags(': 'resource result [, int field_offset] | string', \ 'fbsql_field_len(': 'resource result [, int field_offset] | int', \ 'fbsql_field_name(': 'resource result [, int field_index] | string', \ 'fbsql_field_seek(': 'resource result [, int field_offset] | bool', \ 'fbsql_field_table(': 'resource result [, int field_offset] | string', \ 'fbsql_field_type(': 'resource result [, int field_offset] | string', \ 'fbsql_free_result(': 'resource result | bool', \ 'fbsql_get_autostart_info(': '[resource link_identifier] | array', \ 'fbsql_hostname(': 'resource link_identifier [, string host_name] | string', \ 'fbsql_insert_id(': '[resource link_identifier] | int', \ 'fbsql_list_dbs(': '[resource link_identifier] | resource', \ 'fbsql_list_fields(': 'string database_name, string table_name [, resource link_identifier] | resource', \ 'fbsql_list_tables(': 'string database [, resource link_identifier] | resource', \ 'fbsql_next_result(': 'resource result_id | bool', \ 'fbsql_num_fields(': 'resource result | int', \ 'fbsql_num_rows(': 'resource result | int', \ 'fbsql_password(': 'resource link_identifier [, string password] | string', \ 'fbsql_pconnect(': '[string hostname [, string username [, string password]]] | resource', \ 'fbsql_query(': 'string query [, resource link_identifier [, int batch_size]] | resource', \ 'fbsql_read_blob(': 'string blob_handle [, resource link_identifier] | string', \ 'fbsql_read_clob(': 'string clob_handle [, resource link_identifier] | string', \ 'fbsql_result(': 'resource result [, int row [, mixed field]] | mixed', \ 'fbsql_rollback(': '[resource link_identifier] | bool', \ 'fbsql_select_db(': '[string database_name [, resource link_identifier]] | bool', \ 'fbsql_set_lob_mode(': 'resource result, string database_name | bool', \ 'fbsql_set_password(': 'resource link_identifier, string user, string password, string old_password | bool', \ 'fbsql_set_transaction(': 'resource link_identifier, int Locking, int Isolation | void', \ 'fbsql_start_db(': 'string database_name [, resource link_identifier [, string database_options]] | bool', \ 'fbsql_stop_db(': 'string database_name [, resource link_identifier] | bool', \ 'fbsql_tablename(': 'resource result, int i | string', \ 'fbsql_username(': 'resource link_identifier [, string username] | string', \ 'fbsql_warnings(': '[bool OnOff] | bool', \ 'fclose(': 'resource handle | bool', \ 'fdf_add_doc_javascript(': 'resource fdfdoc, string script_name, string script_code | bool', \ 'fdf_add_template(': 'resource fdfdoc, int newpage, string filename, string template, int rename | bool', \ 'fdf_close(': 'resource fdf_document | void', \ 'fdf_create(': 'void | resource', \ 'fdf_enum_values(': 'resource fdfdoc, callback function [, mixed userdata] | bool', \ 'fdf_errno(': 'void | int', \ 'fdf_error(': '[int error_code] | string', \ 'fdf_get_ap(': 'resource fdf_document, string field, int face, string filename | bool', \ 'fdf_get_attachment(': 'resource fdf_document, string fieldname, string savepath | array', \ 'fdf_get_encoding(': 'resource fdf_document | string', \ 'fdf_get_file(': 'resource fdf_document | string', \ 'fdf_get_flags(': 'resource fdfdoc, string fieldname, int whichflags | int', \ 'fdf_get_opt(': 'resource fdfdof, string fieldname [, int element] | mixed', \ 'fdf_get_status(': 'resource fdf_document | string', \ 'fdf_get_value(': 'resource fdf_document, string fieldname [, int which] | mixed', \ 'fdf_get_version(': '[resource fdf_document] | string', \ 'fdf_header(': 'void | void', \ 'fdf_next_field_name(': 'resource fdf_document [, string fieldname] | string', \ 'fdf_open(': 'string filename | resource', \ 'fdf_open_string(': 'string fdf_data | resource', \ 'fdf_remove_item(': 'resource fdfdoc, string fieldname, int item | bool', \ 'fdf_save(': 'resource fdf_document [, string filename] | bool', \ 'fdf_save_string(': 'resource fdf_document | string', \ 'fdf_set_ap(': 'resource fdf_document, string field_name, int face, string filename, int page_number | bool', \ 'fdf_set_encoding(': 'resource fdf_document, string encoding | bool', \ 'fdf_set_file(': 'resource fdf_document, string url [, string target_frame] | bool', \ 'fdf_set_flags(': 'resource fdf_document, string fieldname, int whichFlags, int newFlags | bool', \ 'fdf_set_javascript_action(': 'resource fdf_document, string fieldname, int trigger, string script | bool', \ 'fdf_set_on_import_javascript(': 'resource fdfdoc, string script, bool before_data_import | bool', \ 'fdf_set_opt(': 'resource fdf_document, string fieldname, int element, string str1, string str2 | bool', \ 'fdf_set_status(': 'resource fdf_document, string status | bool', \ 'fdf_set_submit_form_action(': 'resource fdf_document, string fieldname, int trigger, string script, int flags | bool', \ 'fdf_set_target_frame(': 'resource fdf_document, string frame_name | bool', \ 'fdf_set_value(': 'resource fdf_document, string fieldname, mixed value [, int isName] | bool', \ 'fdf_set_version(': 'resource fdf_document, string version | bool', \ 'feof(': 'resource handle | bool', \ 'fflush(': 'resource handle | bool', \ 'fgetc(': 'resource handle | string', \ 'fgetcsv(': 'resource handle [, int length [, string delimiter [, string enclosure]]] | array', \ 'fgets(': 'resource handle [, int length] | string', \ 'fgetss(': 'resource handle [, int length [, string allowable_tags]] | string', \ 'fileatime(': 'string filename | int', \ 'filectime(': 'string filename | int', \ 'file_exists(': 'string filename | bool', \ 'file_get_contents(': 'string filename [, bool use_include_path [, resource context [, int offset [, int maxlen]]]] | string', \ 'filegroup(': 'string filename | int', \ 'file(': 'string filename [, int use_include_path [, resource context]] | array', \ 'fileinode(': 'string filename | int', \ 'filemtime(': 'string filename | int', \ 'fileowner(': 'string filename | int', \ 'fileperms(': 'string filename | int', \ 'filepro_fieldcount(': 'void | int', \ 'filepro_fieldname(': 'int field_number | string', \ 'filepro_fieldtype(': 'int field_number | string', \ 'filepro_fieldwidth(': 'int field_number | int', \ 'filepro(': 'string directory | bool', \ 'filepro_retrieve(': 'int row_number, int field_number | string', \ 'filepro_rowcount(': 'void | int', \ 'file_put_contents(': 'string filename, mixed data [, int flags [, resource context]] | int', \ 'filesize(': 'string filename | int', \ 'filetype(': 'string filename | string', \ 'floatval(': 'mixed var | float', \ 'flock(': 'resource handle, int operation [, int &#38;wouldblock] | bool', \ 'floor(': 'float value | float', \ 'flush(': 'void | void', \ 'fmod(': 'float x, float y | float', \ 'fnmatch(': 'string pattern, string string [, int flags] | bool', \ 'fopen(': 'string filename, string mode [, bool use_include_path [, resource zcontext]] | resource', \ 'fpassthru(': 'resource handle | int', \ 'fprintf(': 'resource handle, string format [, mixed args [, mixed ...]] | int', \ 'fputcsv(': 'resource handle [, array fields [, string delimiter [, string enclosure]]] | int', \ 'fread(': 'resource handle, int length | string', \ 'frenchtojd(': 'int month, int day, int year | int', \ 'fribidi_log2vis(': 'string str, string direction, int charset | string', \ 'fscanf(': 'resource handle, string format [, mixed &#38;...] | mixed', \ 'fseek(': 'resource handle, int offset [, int whence] | int', \ 'fsockopen(': 'string target [, int port [, int &#38;errno [, string &#38;errstr [, float timeout]]]] | resource', \ 'fstat(': 'resource handle | array', \ 'ftell(': 'resource handle | int', \ 'ftok(': 'string pathname, string proj | int', \ 'ftp_alloc(': 'resource ftp_stream, int filesize [, string &#38;result] | bool', \ 'ftp_cdup(': 'resource ftp_stream | bool', \ 'ftp_chdir(': 'resource ftp_stream, string directory | bool', \ 'ftp_chmod(': 'resource ftp_stream, int mode, string filename | int', \ 'ftp_close(': 'resource ftp_stream | bool', \ 'ftp_connect(': 'string host [, int port [, int timeout]] | resource', \ 'ftp_delete(': 'resource ftp_stream, string path | bool', \ 'ftp_exec(': 'resource ftp_stream, string command | bool', \ 'ftp_fget(': 'resource ftp_stream, resource handle, string remote_file, int mode [, int resumepos] | bool', \ 'ftp_fput(': 'resource ftp_stream, string remote_file, resource handle, int mode [, int startpos] | bool', \ 'ftp_get(': 'resource ftp_stream, string local_file, string remote_file, int mode [, int resumepos] | bool', \ 'ftp_get_option(': 'resource ftp_stream, int option | mixed', \ 'ftp_login(': 'resource ftp_stream, string username, string password | bool', \ 'ftp_mdtm(': 'resource ftp_stream, string remote_file | int', \ 'ftp_mkdir(': 'resource ftp_stream, string directory | string', \ 'ftp_nb_continue(': 'resource ftp_stream | int', \ 'ftp_nb_fget(': 'resource ftp_stream, resource handle, string remote_file, int mode [, int resumepos] | int', \ 'ftp_nb_fput(': 'resource ftp_stream, string remote_file, resource handle, int mode [, int startpos] | int', \ 'ftp_nb_get(': 'resource ftp_stream, string local_file, string remote_file, int mode [, int resumepos] | int', \ 'ftp_nb_put(': 'resource ftp_stream, string remote_file, string local_file, int mode [, int startpos] | int', \ 'ftp_nlist(': 'resource ftp_stream, string directory | array', \ 'ftp_pasv(': 'resource ftp_stream, bool pasv | bool', \ 'ftp_put(': 'resource ftp_stream, string remote_file, string local_file, int mode [, int startpos] | bool', \ 'ftp_pwd(': 'resource ftp_stream | string', \ 'ftp_raw(': 'resource ftp_stream, string command | array', \ 'ftp_rawlist(': 'resource ftp_stream, string directory [, bool recursive] | array', \ 'ftp_rename(': 'resource ftp_stream, string oldname, string newname | bool', \ 'ftp_rmdir(': 'resource ftp_stream, string directory | bool', \ 'ftp_set_option(': 'resource ftp_stream, int option, mixed value | bool', \ 'ftp_site(': 'resource ftp_stream, string command | bool', \ 'ftp_size(': 'resource ftp_stream, string remote_file | int', \ 'ftp_ssl_connect(': 'string host [, int port [, int timeout]] | resource', \ 'ftp_systype(': 'resource ftp_stream | string', \ 'ftruncate(': 'resource handle, int size | bool', \ 'func_get_arg(': 'int arg_num | mixed', \ 'func_get_args(': 'void | array', \ 'func_num_args(': 'void | int', \ 'function_exists(': 'string function_name | bool', \ 'fwrite(': 'resource handle, string string [, int length] | int', \ 'gd_info(': 'void | array', \ 'getallheaders(': 'void | array', \ 'get_browser(': '[string user_agent [, bool return_array]] | mixed', \ 'get_cfg_var(': 'string varname | string', \ 'get_class(': '[object obj] | string', \ 'get_class_methods(': 'mixed class_name | array', \ 'get_class_vars(': 'string class_name | array', \ 'get_current_user(': 'void | string', \ 'getcwd(': 'void | string', \ 'getdate(': '[int timestamp] | array', \ 'get_declared_classes(': 'void | array', \ 'get_declared_interfaces(': 'void | array', \ 'get_defined_constants(': '[mixed categorize] | array', \ 'get_defined_functions(': 'void | array', \ 'get_defined_vars(': 'void | array', \ 'getenv(': 'string varname | string', \ 'get_extension_funcs(': 'string module_name | array', \ 'get_headers(': 'string url [, int format] | array', \ 'gethostbyaddr(': 'string ip_address | string', \ 'gethostbyname(': 'string hostname | string', \ 'gethostbynamel(': 'string hostname | array', \ 'get_html_translation_table(': '[int table [, int quote_style]] | array', \ 'getimagesize(': 'string filename [, array &#38;imageinfo] | array', \ 'get_included_files(': 'void | array', \ 'get_include_path(': 'void | string', \ 'getlastmod(': 'void | int', \ 'get_loaded_extensions(': 'void | array', \ 'get_magic_quotes_gpc(': 'void | int', \ 'get_magic_quotes_runtime(': 'void | int', \ 'get_meta_tags(': 'string filename [, bool use_include_path] | array', \ 'getmxrr(': 'string hostname, array &#38;mxhosts [, array &#38;weight] | bool', \ 'getmygid(': 'void | int', \ 'getmyinode(': 'void | int', \ 'getmypid(': 'void | int', \ 'getmyuid(': 'void | int', \ 'get_object_vars(': 'object obj | array', \ 'getopt(': 'string options | array', \ 'get_parent_class(': '[mixed obj] | string', \ 'getprotobyname(': 'string name | int', \ 'getprotobynumber(': 'int number | string', \ 'getrandmax(': 'void | int', \ 'get_resource_type(': 'resource handle | string', \ 'getrusage(': '[int who] | array', \ 'getservbyname(': 'string service, string protocol | int', \ 'getservbyport(': 'int port, string protocol | string', \ 'gettext(': 'string message | string', \ 'gettimeofday(': '[bool return_float] | mixed', \ 'gettype(': 'mixed var | string', \ 'glob(': 'string pattern [, int flags] | array', \ 'gmdate(': 'string format [, int timestamp] | string', \ 'gmmktime(': '[int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] | int', \ 'gmp_abs(': 'resource a | resource', \ 'gmp_add(': 'resource a, resource b | resource', \ 'gmp_and(': 'resource a, resource b | resource', \ 'gmp_clrbit(': 'resource &#38;a, int index | void', \ 'gmp_cmp(': 'resource a, resource b | int', \ 'gmp_com(': 'resource a | resource', \ 'gmp_divexact(': 'resource n, resource d | resource', \ 'gmp_div_q(': 'resource a, resource b [, int round] | resource', \ 'gmp_div_qr(': 'resource n, resource d [, int round] | array', \ 'gmp_div_r(': 'resource n, resource d [, int round] | resource', \ 'gmp_fact(': 'int a | resource', \ 'gmp_gcdext(': 'resource a, resource b | array', \ 'gmp_gcd(': 'resource a, resource b | resource', \ 'gmp_hamdist(': 'resource a, resource b | int', \ 'gmp_init(': 'mixed number [, int base] | resource', \ 'gmp_intval(': 'resource gmpnumber | int', \ 'gmp_invert(': 'resource a, resource b | resource', \ 'gmp_jacobi(': 'resource a, resource p | int', \ 'gmp_legendre(': 'resource a, resource p | int', \ 'gmp_mod(': 'resource n, resource d | resource', \ 'gmp_mul(': 'resource a, resource b | resource', \ 'gmp_neg(': 'resource a | resource', \ 'gmp_or(': 'resource a, resource b | resource', \ 'gmp_perfect_square(': 'resource a | bool', \ 'gmp_popcount(': 'resource a | int', \ 'gmp_pow(': 'resource base, int exp | resource', \ 'gmp_powm(': 'resource base, resource exp, resource mod | resource', \ 'gmp_prob_prime(': 'resource a [, int reps] | int', \ 'gmp_random(': 'int limiter | resource', \ 'gmp_scan0(': 'resource a, int start | int', \ 'gmp_scan1(': 'resource a, int start | int', \ 'gmp_setbit(': 'resource &#38;a, int index [, bool set_clear] | void', \ 'gmp_sign(': 'resource a | int', \ 'gmp_sqrt(': 'resource a | resource', \ 'gmp_sqrtrem(': 'resource a | array', \ 'gmp_strval(': 'resource gmpnumber [, int base] | string', \ 'gmp_sub(': 'resource a, resource b | resource', \ 'gmp_xor(': 'resource a, resource b | resource', \ 'gmstrftime(': 'string format [, int timestamp] | string', \ 'gnupg_adddecryptkey(': 'resource identifier, string fingerprint, string passphrase | bool', \ 'gnupg_addencryptkey(': 'resource identifier, string fingerprint | bool', \ 'gnupg_addsignkey(': 'resource identifier, string fingerprint [, string passphrase] | bool', \ 'gnupg_cleardecryptkeys(': 'resource identifier | bool', \ 'gnupg_clearencryptkeys(': 'resource identifier | bool', \ 'gnupg_clearsignkeys(': 'resource identifier | bool', \ 'gnupg_decrypt(': 'resource identifier, string text | string', \ 'gnupg_decryptverify(': 'resource identifier, string text, string plaintext | array', \ 'gnupg_encrypt(': 'resource identifier, string plaintext | string', \ 'gnupg_encryptsign(': 'resource identifier, string plaintext | string', \ 'gnupg_export(': 'resource identifier, string fingerprint | string', \ 'gnupg_geterror(': 'resource identifier | string', \ 'gnupg_getprotocol(': 'resource identifier | int', \ 'gnupg_import(': 'resource identifier, string keydata | array', \ 'gnupg_keyinfo(': 'resource identifier, string pattern | array', \ 'gnupg_setarmor(': 'resource identifier, int armor | bool', \ 'gnupg_seterrormode(': 'resource identifier, int errormode | void', \ 'gnupg_setsignmode(': 'resource identifier, int signmode | bool', \ 'gnupg_sign(': 'resource identifier, string plaintext | string', \ 'gnupg_verify(': 'resource identifier, string signed_text, string signature [, string plaintext] | array', \ 'gopher_parsedir(': 'string dirent | array', \ 'gregoriantojd(': 'int month, int day, int year | int', \ 'gzclose(': 'resource zp | bool', \ 'gzcompress(': 'string data [, int level] | string', \ 'gzdeflate(': 'string data [, int level] | string', \ 'gzencode(': 'string data [, int level [, int encoding_mode]] | string', \ 'gzeof(': 'resource zp | int', \ 'gzfile(': 'string filename [, int use_include_path] | array', \ 'gzgetc(': 'resource zp | string', \ 'gzgets(': 'resource zp, int length | string', \ 'gzgetss(': 'resource zp, int length [, string allowable_tags] | string', \ 'gzinflate(': 'string data [, int length] | string', \ 'gzopen(': 'string filename, string mode [, int use_include_path] | resource', \ 'gzpassthru(': 'resource zp | int', \ 'gzread(': 'resource zp, int length | string', \ 'gzrewind(': 'resource zp | bool', \ 'gzseek(': 'resource zp, int offset | int', \ 'gztell(': 'resource zp | int', \ 'gzuncompress(': 'string data [, int length] | string', \ 'gzwrite(': 'resource zp, string string [, int length] | int', \ '__halt_compiler(': 'void | void', \ 'hash_algos(': 'void | array', \ 'hash_file(': 'string algo, string filename [, bool raw_output] | string', \ 'hash_final(': 'resource context [, bool raw_output] | string', \ 'hash_hmac_file(': 'string algo, string filename, string key [, bool raw_output] | string', \ 'hash_hmac(': 'string algo, string data, string key [, bool raw_output] | string', \ 'hash(': 'string algo, string data [, bool raw_output] | string', \ 'hash_init(': 'string algo [, int options, string key] | resource', \ 'hash_update_file(': 'resource context, string filename [, resource context] | bool', \ 'hash_update(': 'resource context, string data | bool', \ 'hash_update_stream(': 'resource context, resource handle [, int length] | int', \ 'header(': 'string string [, bool replace [, int http_response_code]] | void', \ 'headers_list(': 'void | array', \ 'headers_sent(': '[string &#38;file [, int &#38;line]] | bool', \ 'hebrevc(': 'string hebrew_text [, int max_chars_per_line] | string', \ 'hebrev(': 'string hebrew_text [, int max_chars_per_line] | string', \ 'hexdec(': 'string hex_string | number', \ 'highlight_file(': 'string filename [, bool return] | mixed', \ 'highlight_string(': 'string str [, bool return] | mixed', \ 'htmlentities(': 'string string [, int quote_style [, string charset]] | string', \ 'html_entity_decode(': 'string string [, int quote_style [, string charset]] | string', \ 'htmlspecialchars_decode(': 'string string [, int quote_style] | string', \ 'htmlspecialchars(': 'string string [, int quote_style [, string charset]] | string', \ 'http_build_query(': 'array formdata [, string numeric_prefix] | string', \ 'hw_api_attribute(': '[string name [, string value]] | HW_API_Attribute', \ 'hw_api_attribute-&#62;key(': 'void | string', \ 'hw_api_attribute-&#62;langdepvalue(': 'string language | string', \ 'hw_api_attribute-&#62;value(': 'void | string', \ 'hw_api_attribute-&#62;values(': 'void | array', \ 'hw_api-&#62;checkin(': 'array parameter | bool', \ 'hw_api-&#62;checkout(': 'array parameter | bool', \ 'hw_api-&#62;children(': 'array parameter | array', \ 'hw_api-&#62;content(': 'array parameter | HW_API_Content', \ 'hw_api_content-&#62;mimetype(': 'void | string', \ 'hw_api_content-&#62;read(': 'string buffer, int len | string', \ 'hw_api-&#62;copy(': 'array parameter | hw_api_object', \ 'hw_api-&#62;dbstat(': 'array parameter | hw_api_object', \ 'hw_api-&#62;dcstat(': 'array parameter | hw_api_object', \ 'hw_api-&#62;dstanchors(': 'array parameter | array', \ 'hw_api-&#62;dstofsrcanchor(': 'array parameter | hw_api_object', \ 'hw_api_error-&#62;count(': 'void | int', \ 'hw_api_error-&#62;reason(': 'void | HW_API_Reason', \ 'hw_api-&#62;find(': 'array parameter | array', \ 'hw_api-&#62;ftstat(': 'array parameter | hw_api_object', \ 'hwapi_hgcsp(': 'string hostname [, int port] | HW_API', \ 'hw_api-&#62;hwstat(': 'array parameter | hw_api_object', \ 'hw_api-&#62;identify(': 'array parameter | bool', \ 'hw_api-&#62;info(': 'array parameter | array', \ 'hw_api-&#62;insertanchor(': 'array parameter | hw_api_object', \ 'hw_api-&#62;insertcollection(': 'array parameter | hw_api_object', \ 'hw_api-&#62;insertdocument(': 'array parameter | hw_api_object', \ 'hw_api-&#62;insert(': 'array parameter | hw_api_object', \ 'hw_api-&#62;link(': 'array parameter | bool', \ 'hw_api-&#62;lock(': 'array parameter | bool', \ 'hw_api-&#62;move(': 'array parameter | bool', \ 'hw_api_content(': 'string content, string mimetype | HW_API_Content', \ 'hw_api_object-&#62;assign(': 'array parameter | bool', \ 'hw_api_object-&#62;attreditable(': 'array parameter | bool', \ 'hw_api-&#62;objectbyanchor(': 'array parameter | hw_api_object', \ 'hw_api_object-&#62;count(': 'array parameter | int', \ 'hw_api-&#62;object(': 'array parameter | hw_api_object', \ 'hw_api_object-&#62;insert(': 'HW_API_Attribute attribute | bool', \ 'hw_api_object(': 'array parameter | hw_api_object', \ 'hw_api_object-&#62;remove(': 'string name | bool', \ 'hw_api_object-&#62;title(': 'array parameter | string', \ 'hw_api_object-&#62;value(': 'string name | string', \ 'hw_api-&#62;parents(': 'array parameter | array', \ 'hw_api_reason-&#62;description(': 'void | string', \ 'hw_api_reason-&#62;type(': 'void | HW_API_Reason', \ 'hw_api-&#62;remove(': 'array parameter | bool', \ 'hw_api-&#62;replace(': 'array parameter | hw_api_object', \ 'hw_api-&#62;setcommittedversion(': 'array parameter | hw_api_object', \ 'hw_api-&#62;srcanchors(': 'array parameter | array', \ 'hw_api-&#62;srcsofdst(': 'array parameter | array', \ 'hw_api-&#62;unlock(': 'array parameter | bool', \ 'hw_api-&#62;user(': 'array parameter | hw_api_object', \ 'hw_api-&#62;userlist(': 'array parameter | array', \ 'hw_array2objrec(': 'array object_array | string', \ 'hw_changeobject(': 'int link, int objid, array attributes | bool', \ 'hw_children(': 'int connection, int objectID | array', \ 'hw_childrenobj(': 'int connection, int objectID | array', \ 'hw_close(': 'int connection | bool', \ 'hw_connect(': 'string host, int port [, string username, string password] | int', \ 'hw_connection_info(': 'int link | void', \ 'hw_cp(': 'int connection, array object_id_array, int destination_id | int', \ 'hw_deleteobject(': 'int connection, int object_to_delete | bool', \ 'hw_docbyanchor(': 'int connection, int anchorID | int', \ 'hw_docbyanchorobj(': 'int connection, int anchorID | string', \ 'hw_document_attributes(': 'int hw_document | string', \ 'hw_document_bodytag(': 'int hw_document [, string prefix] | string', \ 'hw_document_content(': 'int hw_document | string', \ 'hw_document_setcontent(': 'int hw_document, string content | bool', \ 'hw_document_size(': 'int hw_document | int', \ 'hw_dummy(': 'int link, int id, int msgid | string', \ 'hw_edittext(': 'int connection, int hw_document | bool', \ 'hw_error(': 'int connection | int', \ 'hw_errormsg(': 'int connection | string', \ 'hw_free_document(': 'int hw_document | bool', \ 'hw_getanchors(': 'int connection, int objectID | array', \ 'hw_getanchorsobj(': 'int connection, int objectID | array', \ 'hw_getandlock(': 'int connection, int objectID | string', \ 'hw_getchildcoll(': 'int connection, int objectID | array', \ 'hw_getchildcollobj(': 'int connection, int objectID | array', \ 'hw_getchilddoccoll(': 'int connection, int objectID | array', \ 'hw_getchilddoccollobj(': 'int connection, int objectID | array', \ 'hw_getobjectbyquerycoll(': 'int connection, int objectID, string query, int max_hits | array', \ 'hw_getobjectbyquerycollobj(': 'int connection, int objectID, string query, int max_hits | array', \ 'hw_getobjectbyquery(': 'int connection, string query, int max_hits | array', \ 'hw_getobjectbyqueryobj(': 'int connection, string query, int max_hits | array', \ 'hw_getobject(': 'int connection, mixed objectID [, string query] | mixed', \ 'hw_getparents(': 'int connection, int objectID | array', \ 'hw_getparentsobj(': 'int connection, int objectID | array', \ 'hw_getrellink(': 'int link, int rootid, int sourceid, int destid | string', \ 'hw_getremotechildren(': 'int connection, string object_record | mixed', \ 'hw_getremote(': 'int connection, int objectID | int', \ 'hw_getsrcbydestobj(': 'int connection, int objectID | array', \ 'hw_gettext(': 'int connection, int objectID [, mixed rootID/prefix] | int', \ 'hw_getusername(': 'int connection | string', \ 'hw_identify(': 'int link, string username, string password | string', \ 'hw_incollections(': 'int connection, array object_id_array, array collection_id_array, int return_collections | array', \ 'hw_info(': 'int connection | string', \ 'hw_inscoll(': 'int connection, int objectID, array object_array | int', \ 'hw_insdoc(': 'resource connection, int parentID, string object_record [, string text] | int', \ 'hw_insertanchors(': 'int hwdoc, array anchorecs, array dest [, array urlprefixes] | bool', \ 'hw_insertdocument(': 'int connection, int parent_id, int hw_document | int', \ 'hw_insertobject(': 'int connection, string object_rec, string parameter | int', \ 'hw_mapid(': 'int connection, int server_id, int object_id | int', \ 'hw_modifyobject(': 'int connection, int object_to_change, array remove, array add [, int mode] | bool', \ 'hw_mv(': 'int connection, array object_id_array, int source_id, int destination_id | int', \ 'hw_new_document(': 'string object_record, string document_data, int document_size | int', \ 'hw_objrec2array(': 'string object_record [, array format] | array', \ 'hw_output_document(': 'int hw_document | bool', \ 'hw_pconnect(': 'string host, int port [, string username, string password] | int', \ 'hw_pipedocument(': 'int connection, int objectID [, array url_prefixes] | int', \ 'hw_root(': ' | int', \ 'hw_setlinkroot(': 'int link, int rootid | int', \ 'hw_stat(': 'int link | string', \ 'hw_unlock(': 'int connection, int objectID | bool', \ 'hw_who(': 'int connection | array', \ 'hypot(': 'float x, float y | float', \ 'i18n_loc_get_default(': 'void | string', \ 'i18n_loc_set_default(': 'string name | bool', \ 'ibase_add_user(': 'resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]] | bool', \ 'ibase_affected_rows(': '[resource link_identifier] | int', \ 'ibase_backup(': 'resource service_handle, string source_db, string dest_file [, int options [, bool verbose]] | mixed', \ 'ibase_blob_add(': 'resource blob_handle, string data | void', \ 'ibase_blob_cancel(': 'resource blob_handle | bool', \ 'ibase_blob_close(': 'resource blob_handle | mixed', \ 'ibase_blob_create(': '[resource link_identifier] | resource', \ 'ibase_blob_echo(': 'resource link_identifier, string blob_id | bool', \ 'ibase_blob_get(': 'resource blob_handle, int len | string', \ 'ibase_blob_import(': 'resource link_identifier, resource file_handle | string', \ 'ibase_blob_info(': 'resource link_identifier, string blob_id | array', \ 'ibase_blob_open(': 'resource link_identifier, string blob_id | resource', \ 'ibase_close(': '[resource connection_id] | bool', \ 'ibase_commit(': '[resource link_or_trans_identifier] | bool', \ 'ibase_commit_ret(': '[resource link_or_trans_identifier] | bool', \ 'ibase_connect(': '[string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role [, int sync]]]]]]]] | resource', \ 'ibase_db_info(': 'resource service_handle, string db, int action [, int argument] | string', \ 'ibase_delete_user(': 'resource service_handle, string user_name | bool', \ 'ibase_drop_db(': '[resource connection] | bool', \ 'ibase_errcode(': 'void | int', \ 'ibase_errmsg(': 'void | string', \ 'ibase_execute(': 'resource query [, mixed bind_arg [, mixed ...]] | resource', \ 'ibase_fetch_assoc(': 'resource result [, int fetch_flag] | array', \ 'ibase_fetch_object(': 'resource result_id [, int fetch_flag] | object', \ 'ibase_fetch_row(': 'resource result_identifier [, int fetch_flag] | array', \ 'ibase_field_info(': 'resource result, int field_number | array', \ 'ibase_free_event_handler(': 'resource event | bool', \ 'ibase_free_query(': 'resource query | bool', \ 'ibase_free_result(': 'resource result_identifier | bool', \ 'ibase_gen_id(': 'string generator [, int increment [, resource link_identifier]] | mixed', \ 'ibase_maintain_db(': 'resource service_handle, string db, int action [, int argument] | bool', \ 'ibase_modify_user(': 'resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]] | bool', \ 'ibase_name_result(': 'resource result, string name | bool', \ 'ibase_num_fields(': 'resource result_id | int', \ 'ibase_num_params(': 'resource query | int', \ 'ibase_param_info(': 'resource query, int param_number | array', \ 'ibase_pconnect(': '[string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role [, int sync]]]]]]]] | resource', \ 'ibase_prepare(': 'string query | resource', \ 'ibase_query(': '[resource link_identifier, string query [, int bind_args]] | resource', \ 'ibase_restore(': 'resource service_handle, string source_file, string dest_db [, int options [, bool verbose]] | mixed', \ 'ibase_rollback(': '[resource link_or_trans_identifier] | bool', \ 'ibase_rollback_ret(': '[resource link_or_trans_identifier] | bool', \ 'ibase_server_info(': 'resource service_handle, int action | string', \ 'ibase_service_attach(': 'string host, string dba_username, string dba_password | resource', \ 'ibase_service_detach(': 'resource service_handle | bool', \ 'ibase_set_event_handler(': 'callback event_handler, string event_name1 [, string event_name2 [, string ...]] | resource', \ 'ibase_timefmt(': 'string format [, int columntype] | int', \ 'ibase_trans(': '[int trans_args [, resource link_identifier]] | resource', \ 'ibase_wait_event(': 'string event_name1 [, string event_name2 [, string ...]] | string', \ 'icap_close(': 'int icap_stream [, int flags] | int', \ 'icap_create_calendar(': 'int stream_id, string calendar | string', \ 'icap_delete_calendar(': 'int stream_id, string calendar | string', \ 'icap_delete_event(': 'int stream_id, int uid | string', \ 'icap_fetch_event(': 'int stream_id, int event_id [, int options] | int', \ 'icap_list_alarms(': 'int stream_id, array date, array time | int', \ 'icap_list_events(': 'int stream_id, int begin_date [, int end_date] | array', \ 'icap_open(': 'string calendar, string username, string password, string options | resource', \ 'icap_rename_calendar(': 'int stream_id, string old_name, string new_name | string', \ 'icap_reopen(': 'int stream_id, string calendar [, int options] | int', \ 'icap_snooze(': 'int stream_id, int uid | string', \ 'icap_store_event(': 'int stream_id, object event | string', \ 'iconv_get_encoding(': '[string type] | mixed', \ 'iconv(': 'string in_charset, string out_charset, string str | string', \ 'iconv_mime_decode_headers(': 'string encoded_headers [, int mode [, string charset]] | array', \ 'iconv_mime_decode(': 'string encoded_header [, int mode [, string charset]] | string', \ 'iconv_mime_encode(': 'string field_name, string field_value [, array preferences] | string', \ 'iconv_set_encoding(': 'string type, string charset | bool', \ 'iconv_strlen(': 'string str [, string charset] | int', \ 'iconv_strpos(': 'string haystack, string needle [, int offset [, string charset]] | int', \ 'iconv_strrpos(': 'string haystack, string needle [, string charset] | int', \ 'iconv_substr(': 'string str, int offset [, int length [, string charset]] | string', \ 'id3_get_frame_long_name(': 'string frameId | string', \ 'id3_get_frame_short_name(': 'string frameId | string', \ 'id3_get_genre_id(': 'string genre | int', \ 'id3_get_genre_list(': 'void | array', \ 'id3_get_genre_name(': 'int genre_id | string', \ 'id3_get_tag(': 'string filename [, int version] | array', \ 'id3_get_version(': 'string filename | int', \ 'id3_remove_tag(': 'string filename [, int version] | bool', \ 'id3_set_tag(': 'string filename, array tag [, int version] | bool', \ 'idate(': 'string format [, int timestamp] | int', \ 'ifx_affected_rows(': 'int result_id | int', \ 'ifx_blobinfile_mode(': 'int mode | void', \ 'ifx_byteasvarchar(': 'int mode | void', \ 'ifx_close(': '[int link_identifier] | int', \ 'ifx_connect(': '[string database [, string userid [, string password]]] | int', \ 'ifx_copy_blob(': 'int bid | int', \ 'ifx_create_blob(': 'int type, int mode, string param | int', \ 'ifx_create_char(': 'string param | int', \ 'ifx_do(': 'int result_id | int', \ 'ifx_error(': 'void | string', \ 'ifx_errormsg(': '[int errorcode] | string', \ 'ifx_fetch_row(': 'int result_id [, mixed position] | array', \ 'ifx_fieldproperties(': 'int result_id | array', \ 'ifx_fieldtypes(': 'int result_id | array', \ 'ifx_free_blob(': 'int bid | int', \ 'ifx_free_char(': 'int bid | int', \ 'ifx_free_result(': 'int result_id | int', \ 'ifx_get_blob(': 'int bid | int', \ 'ifx_get_char(': 'int bid | int', \ 'ifx_getsqlca(': 'int result_id | array', \ 'ifx_htmltbl_result(': 'int result_id [, string html_table_options] | int', \ 'ifx_nullformat(': 'int mode | void', \ 'ifx_num_fields(': 'int result_id | int', \ 'ifx_num_rows(': 'int result_id | int', \ 'ifx_pconnect(': '[string database [, string userid [, string password]]] | int', \ 'ifx_prepare(': 'string query, int conn_id [, int cursor_def, mixed blobidarray] | int', \ 'ifx_query(': 'string query, int link_identifier [, int cursor_type [, mixed blobidarray]] | int', \ 'ifx_textasvarchar(': 'int mode | void', \ 'ifx_update_blob(': 'int bid, string content | bool', \ 'ifx_update_char(': 'int bid, string content | int', \ 'ifxus_close_slob(': 'int bid | int', \ 'ifxus_create_slob(': 'int mode | int', \ 'ifxus_free_slob(': 'int bid | int', \ 'ifxus_open_slob(': 'int bid, int mode | int', \ 'ifxus_read_slob(': 'int bid, int nbytes | int', \ 'ifxus_seek_slob(': 'int bid, int mode, int offset | int', \ 'ifxus_tell_slob(': 'int bid | int', \ 'ifxus_write_slob(': 'int bid, string content | int', \ 'ignore_user_abort(': '[bool setting] | int', \ 'iis_add_server(': 'string path, string comment, string server_ip, int port, string host_name, int rights, int start_server | int', \ 'iis_get_dir_security(': 'int server_instance, string virtual_path | int', \ 'iis_get_script_map(': 'int server_instance, string virtual_path, string script_extension | string', \ 'iis_get_server_by_comment(': 'string comment | int', \ 'iis_get_server_by_path(': 'string path | int', \ 'iis_get_server_rights(': 'int server_instance, string virtual_path | int', \ 'iis_get_service_state(': 'string service_id | int', \ 'iis_remove_server(': 'int server_instance | int', \ 'iis_set_app_settings(': 'int server_instance, string virtual_path, string application_scope | int', \ 'iis_set_dir_security(': 'int server_instance, string virtual_path, int directory_flags | int', \ 'iis_set_script_map(': 'int server_instance, string virtual_path, string script_extension, string engine_path, int allow_scripting | int', \ 'iis_set_server_rights(': 'int server_instance, string virtual_path, int directory_flags | int', \ 'iis_start_server(': 'int server_instance | int', \ 'iis_start_service(': 'string service_id | int', \ 'iis_stop_server(': 'int server_instance | int', \ 'iis_stop_service(': 'string service_id | int', \ 'image2wbmp(': 'resource image [, string filename [, int threshold]] | int', \ 'imagealphablending(': 'resource image, bool blendmode | bool', \ 'imageantialias(': 'resource im, bool on | bool', \ 'imagearc(': 'resource image, int cx, int cy, int w, int h, int s, int e, int color | bool', \ 'imagechar(': 'resource image, int font, int x, int y, string c, int color | bool', \ 'imagecharup(': 'resource image, int font, int x, int y, string c, int color | bool', \ 'imagecolorallocatealpha(': 'resource image, int red, int green, int blue, int alpha | int', \ 'imagecolorallocate(': 'resource image, int red, int green, int blue | int', \ 'imagecolorat(': 'resource image, int x, int y | int', \ 'imagecolorclosestalpha(': 'resource image, int red, int green, int blue, int alpha | int', \ 'imagecolorclosest(': 'resource image, int red, int green, int blue | int', \ 'imagecolorclosesthwb(': 'resource image, int red, int green, int blue | int', \ 'imagecolordeallocate(': 'resource image, int color | bool', \ 'imagecolorexactalpha(': 'resource image, int red, int green, int blue, int alpha | int', \ 'imagecolorexact(': 'resource image, int red, int green, int blue | int', \ 'imagecolormatch(': 'resource image1, resource image2 | bool', \ 'imagecolorresolvealpha(': 'resource image, int red, int green, int blue, int alpha | int', \ 'imagecolorresolve(': 'resource image, int red, int green, int blue | int', \ 'imagecolorset(': 'resource image, int index, int red, int green, int blue | void', \ 'imagecolorsforindex(': 'resource image, int index | array', \ 'imagecolorstotal(': 'resource image | int', \ 'imagecolortransparent(': 'resource image [, int color] | int', \ 'imageconvolution(': 'resource image, array matrix3x3, float div, float offset | bool', \ 'imagecopy(': 'resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h | bool', \ 'imagecopymergegray(': 'resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct | bool', \ 'imagecopymerge(': 'resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct | bool', \ 'imagecopyresampled(': 'resource dst_image, resource src_image, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h | bool', \ 'imagecopyresized(': 'resource dst_image, resource src_image, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h | bool', \ 'imagecreatefromgd2(': 'string filename | resource', \ 'imagecreatefromgd2part(': 'string filename, int srcX, int srcY, int width, int height | resource', \ 'imagecreatefromgd(': 'string filename | resource', \ 'imagecreatefromgif(': 'string filename | resource', \ 'imagecreatefromjpeg(': 'string filename | resource', \ 'imagecreatefrompng(': 'string filename | resource', \ 'imagecreatefromstring(': 'string image | resource', \ 'imagecreatefromwbmp(': 'string filename | resource', \ 'imagecreatefromxbm(': 'string filename | resource', \ 'imagecreatefromxpm(': 'string filename | resource', \ 'imagecreate(': 'int x_size, int y_size | resource', \ 'imagecreatetruecolor(': 'int x_size, int y_size | resource', \ 'imagedashedline(': 'resource image, int x1, int y1, int x2, int y2, int color | bool', \ 'imagedestroy(': 'resource image | bool', \ 'imageellipse(': 'resource image, int cx, int cy, int w, int h, int color | bool', \ 'imagefilledarc(': 'resource image, int cx, int cy, int w, int h, int s, int e, int color, int style | bool', \ 'imagefilledellipse(': 'resource image, int cx, int cy, int w, int h, int color | bool', \ 'imagefilledpolygon(': 'resource image, array points, int num_points, int color | bool', \ 'imagefilledrectangle(': 'resource image, int x1, int y1, int x2, int y2, int color | bool', \ 'imagefill(': 'resource image, int x, int y, int color | bool', \ 'imagefilltoborder(': 'resource image, int x, int y, int border, int color | bool', \ 'imagefilter(': 'resource src_im, int filtertype [, int arg1 [, int arg2 [, int arg3]]] | bool', \ 'imagefontheight(': 'int font | int', \ 'imagefontwidth(': 'int font | int', \ 'imageftbbox(': 'float size, float angle, string font_file, string text [, array extrainfo] | array', \ 'imagefttext(': 'resource image, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo] | array', \ 'imagegammacorrect(': 'resource image, float inputgamma, float outputgamma | bool', \ 'imagegd2(': 'resource image [, string filename [, int chunk_size [, int type]]] | bool', \ 'imagegd(': 'resource image [, string filename] | bool', \ 'imagegif(': 'resource image [, string filename] | bool', \ 'imageinterlace(': 'resource image [, int interlace] | int', \ 'imageistruecolor(': 'resource image | bool', \ 'imagejpeg(': 'resource image [, string filename [, int quality]] | bool', \ 'imagelayereffect(': 'resource image, int effect | bool', \ 'imageline(': 'resource image, int x1, int y1, int x2, int y2, int color | bool', \ 'imageloadfont(': 'string file | int', \ 'imagepalettecopy(': 'resource destination, resource source | void', \ 'imagepng(': 'resource image [, string filename] | bool', \ 'imagepolygon(': 'resource image, array points, int num_points, int color | bool', \ 'imagepsbbox(': 'string text, int font, int size [, int space, int tightness, float angle] | array', \ 'imagepscopyfont(': 'resource fontindex | int', \ 'imagepsencodefont(': 'resource font_index, string encodingfile | bool', \ 'imagepsextendfont(': 'int font_index, float extend | bool', \ 'imagepsfreefont(': 'resource fontindex | bool', \ 'imagepsloadfont(': 'string filename | resource', \ 'imagepsslantfont(': 'resource font_index, float slant | bool', \ 'imagepstext(': 'resource image, string text, resource font, int size, int foreground, int background, int x, int y [, int space, int tightness, float angle, int antialias_steps] | array', \ 'imagerectangle(': 'resource image, int x1, int y1, int x2, int y2, int col | bool', \ 'imagerotate(': 'resource src_im, float angle, int bgd_color [, int ignore_transparent] | resource', \ 'imagesavealpha(': 'resource image, bool saveflag | bool', \ 'imagesetbrush(': 'resource image, resource brush | bool', \ 'imagesetpixel(': 'resource image, int x, int y, int color | bool', \ 'imagesetstyle(': 'resource image, array style | bool', \ 'imagesetthickness(': 'resource image, int thickness | bool', \ 'imagesettile(': 'resource image, resource tile | bool', \ 'imagestring(': 'resource image, int font, int x, int y, string s, int col | bool', \ 'imagestringup(': 'resource image, int font, int x, int y, string s, int col | bool', \ 'imagesx(': 'resource image | int', \ 'imagesy(': 'resource image | int', \ 'imagetruecolortopalette(': 'resource image, bool dither, int ncolors | bool', \ 'imagettfbbox(': 'float size, float angle, string fontfile, string text | array', \ 'imagettftext(': 'resource image, float size, float angle, int x, int y, int color, string fontfile, string text | array', \ 'imagetypes(': 'void | int', \ 'image_type_to_extension(': 'int imagetype [, bool include_dot] | string', \ 'image_type_to_mime_type(': 'int imagetype | string', \ 'imagewbmp(': 'resource image [, string filename [, int foreground]] | bool', \ 'imagexbm(': 'resource image, string filename [, int foreground] | bool', \ 'imap_8bit(': 'string string | string', \ 'imap_alerts(': 'void | array', \ 'imap_append(': 'resource imap_stream, string mbox, string message [, string options] | bool', \ 'imap_base64(': 'string text | string', \ 'imap_binary(': 'string string | string', \ 'imap_body(': 'resource imap_stream, int msg_number [, int options] | string', \ 'imap_bodystruct(': 'resource stream_id, int msg_no, string section | object', \ 'imap_check(': 'resource imap_stream | object', \ 'imap_clearflag_full(': 'resource stream, string sequence, string flag [, string options] | bool', \ 'imap_close(': 'resource imap_stream [, int flag] | bool', \ 'imap_createmailbox(': 'resource imap_stream, string mbox | bool', \ 'imap_delete(': 'int imap_stream, int msg_number [, int options] | bool', \ 'imap_deletemailbox(': 'resource imap_stream, string mbox | bool', \ 'imap_errors(': 'void | array', \ 'imap_expunge(': 'resource imap_stream | bool', \ 'imap_fetchbody(': 'resource imap_stream, int msg_number, string part_number [, int options] | string', \ 'imap_fetchheader(': 'resource imap_stream, int msgno [, int options] | string', \ 'imap_fetch_overview(': 'resource imap_stream, string sequence [, int options] | array', \ 'imap_fetchstructure(': 'resource imap_stream, int msg_number [, int options] | object', \ 'imap_getacl(': 'resource stream_id, string mailbox | array', \ 'imap_getmailboxes(': 'resource imap_stream, string ref, string pattern | array', \ 'imap_get_quota(': 'resource imap_stream, string quota_root | array', \ 'imap_get_quotaroot(': 'resource imap_stream, string quota_root | array', \ 'imap_getsubscribed(': 'resource imap_stream, string ref, string pattern | array', \ 'imap_headerinfo(': 'resource imap_stream, int msg_number [, int fromlength [, int subjectlength [, string defaulthost]]] | object', \ 'imap_headers(': 'resource imap_stream | array', \ 'imap_last_error(': 'void | string', \ 'imap_list(': 'resource imap_stream, string ref, string pattern | array', \ 'imap_listscan(': 'resource imap_stream, string ref, string pattern, string content | array', \ 'imap_lsub(': 'resource imap_stream, string ref, string pattern | array', \ 'imap_mailboxmsginfo(': 'resource imap_stream | object', \ 'imap_mail_compose(': 'array envelope, array body | string', \ 'imap_mail_copy(': 'resource imap_stream, string msglist, string mbox [, int options] | bool', \ 'imap_mail(': 'string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]] | bool', \ 'imap_mail_move(': 'resource imap_stream, string msglist, string mbox [, int options] | bool', \ 'imap_mime_header_decode(': 'string text | array', \ 'imap_msgno(': 'resource imap_stream, int uid | int', \ 'imap_num_msg(': 'resource imap_stream | int', \ 'imap_num_recent(': 'resource imap_stream | int', \ 'imap_open(': 'string mailbox, string username, string password [, int options] | resource', \ 'imap_ping(': 'resource imap_stream | bool', \ 'imap_qprint(': 'string string | string', \ 'imap_renamemailbox(': 'resource imap_stream, string old_mbox, string new_mbox | bool', \ 'imap_reopen(': 'resource imap_stream, string mailbox [, int options] | bool', \ 'imap_rfc822_parse_adrlist(': 'string address, string default_host | array', \ 'imap_rfc822_parse_headers(': 'string headers [, string defaulthost] | object', \ 'imap_rfc822_write_address(': 'string mailbox, string host, string personal | string', \ 'imap_search(': 'resource imap_stream, string criteria [, int options [, string charset]] | array', \ 'imap_setacl(': 'resource stream_id, string mailbox, string id, string rights | bool', \ 'imap_setflag_full(': 'resource stream, string sequence, string flag [, string options] | bool', \ 'imap_set_quota(': 'resource imap_stream, string quota_root, int quota_limit | bool', \ 'imap_sort(': 'resource stream, int criteria, int reverse [, int options [, string search_criteria [, string charset]]] | array', \ 'imap_status(': 'resource imap_stream, string mailbox, int options | object', \ 'imap_subscribe(': 'resource imap_stream, string mbox | bool', \ 'imap_thread(': 'resource stream_id [, int options] | array', \ 'imap_timeout(': 'int timeout_type [, int timeout] | mixed', \ 'imap_uid(': 'resource imap_stream, int msgno | int', \ 'imap_undelete(': 'resource imap_stream, int msg_number [, int flags] | bool', \ 'imap_unsubscribe(': 'string imap_stream, string mbox | bool', \ 'imap_utf7_decode(': 'string text | string', \ 'imap_utf7_encode(': 'string data | string', \ 'imap_utf8(': 'string mime_encoded_text | string', \ 'implode(': 'string glue, array pieces | string', \ 'import_request_variables(': 'string types [, string prefix] | bool', \ 'in_array(': 'mixed needle, array haystack [, bool strict] | bool', \ 'inet_ntop(': 'string in_addr | string', \ 'inet_pton(': 'string address | string', \ 'ingres_autocommit(': '[resource link] | bool', \ 'ingres_close(': '[resource link] | bool', \ 'ingres_commit(': '[resource link] | bool', \ 'ingres_connect(': '[string database [, string username [, string password]]] | resource', \ 'ingres_cursor(': '[resource link] | string', \ 'ingres_errno(': '[resource link] | int', \ 'ingres_error(': '[resource link] | string', \ 'ingres_errsqlstate(': '[resource link] | string', \ 'ingres_fetch_array(': '[int result_type [, resource link]] | array', \ 'ingres_fetch_object(': '[int result_type [, resource link]] | object', \ 'ingres_fetch_row(': '[resource link] | array', \ 'ingres_field_length(': 'int index [, resource link] | int', \ 'ingres_field_name(': 'int index [, resource link] | string', \ 'ingres_field_nullable(': 'int index [, resource link] | bool', \ 'ingres_field_precision(': 'int index [, resource link] | int', \ 'ingres_field_scale(': 'int index [, resource link] | int', \ 'ingres_field_type(': 'int index [, resource link] | string', \ 'ingres_num_fields(': '[resource link] | int', \ 'ingres_num_rows(': '[resource link] | int', \ 'ingres_pconnect(': '[string database [, string username [, string password]]] | resource', \ 'ingres_query(': 'string query [, resource link] | bool', \ 'ingres_rollback(': '[resource link] | bool', \ 'ini_get_all(': '[string extension] | array', \ 'ini_get(': 'string varname | string', \ 'ini_restore(': 'string varname | void', \ 'ini_set(': 'string varname, string newvalue | string', \ 'interface_exists(': 'string interface_name [, bool autoload] | bool', \ 'intval(': 'mixed var [, int base] | int', \ 'ip2long(': 'string ip_address | int', \ 'iptcembed(': 'string iptcdata, string jpeg_file_name [, int spool] | mixed', \ 'iptcparse(': 'string iptcblock | array', \ 'ircg_channel_mode(': 'resource connection, string channel, string mode_spec, string nick | bool', \ 'ircg_disconnect(': 'resource connection, string reason | bool', \ 'ircg_eval_ecmascript_params(': 'string params | array', \ 'ircg_fetch_error_msg(': 'resource connection | array', \ 'ircg_get_username(': 'resource connection | string', \ 'ircg_html_encode(': 'string html_string [, bool auto_links [, bool conv_br]] | string', \ 'ircg_ignore_add(': 'resource connection, string nick | void', \ 'ircg_ignore_del(': 'resource connection, string nick | bool', \ 'ircg_invite(': 'resource connection, string channel, string nickname | bool', \ 'ircg_is_conn_alive(': 'resource connection | bool', \ 'ircg_join(': 'resource connection, string channel [, string key] | bool', \ 'ircg_kick(': 'resource connection, string channel, string nick, string reason | bool', \ 'ircg_list(': 'resource connection, string channel | bool', \ 'ircg_lookup_format_messages(': 'string name | bool', \ 'ircg_lusers(': 'resource connection | bool', \ 'ircg_msg(': 'resource connection, string recipient, string message [, bool suppress] | bool', \ 'ircg_names(': 'int connection, string channel [, string target] | bool', \ 'ircg_nick(': 'resource connection, string nick | bool', \ 'ircg_nickname_escape(': 'string nick | string', \ 'ircg_nickname_unescape(': 'string nick | string', \ 'ircg_notice(': 'resource connection, string recipient, string message | bool', \ 'ircg_oper(': 'resource connection, string name, string password | bool', \ 'ircg_part(': 'resource connection, string channel | bool', \ 'ircg_pconnect(': 'string username [, string server_ip [, int server_port [, string msg_format [, array ctcp_messages [, array user_settings [, bool bailout_on_trivial]]]]]] | resource', \ 'ircg_register_format_messages(': 'string name, array messages | bool', \ 'ircg_set_current(': 'resource connection | bool', \ 'ircg_set_file(': 'resource connection, string path | bool', \ 'ircg_set_on_die(': 'resource connection, string host, int port, string data | bool', \ 'ircg_topic(': 'resource connection, string channel, string new_topic | bool', \ 'ircg_who(': 'resource connection, string mask [, bool ops_only] | bool', \ 'ircg_whois(': 'resource connection, string nick | bool', \ 'is_a(': 'object object, string class_name | bool', \ 'is_array(': 'mixed var | bool', \ 'is_bool(': 'mixed var | bool', \ 'is_callable(': 'mixed var [, bool syntax_only [, string &#38;callable_name]] | bool', \ 'is_dir(': 'string filename | bool', \ 'is_executable(': 'string filename | bool', \ 'is_file(': 'string filename | bool', \ 'is_finite(': 'float val | bool', \ 'is_float(': 'mixed var | bool', \ 'is_infinite(': 'float val | bool', \ 'is_int(': 'mixed var | bool', \ 'is_link(': 'string filename | bool', \ 'is_nan(': 'float val | bool', \ 'is_null(': 'mixed var | bool', \ 'is_numeric(': 'mixed var | bool', \ 'is_object(': 'mixed var | bool', \ 'is_readable(': 'string filename | bool', \ 'is_resource(': 'mixed var | bool', \ 'is_scalar(': 'mixed var | bool', \ 'isset(': 'mixed var [, mixed var [, ...]] | bool', \ 'is_soap_fault(': 'mixed obj | bool', \ 'is_string(': 'mixed var | bool', \ 'is_subclass_of(': 'mixed object, string class_name | bool', \ 'is_uploaded_file(': 'string filename | bool', \ 'is_writable(': 'string filename | bool', \ 'iterator_count(': 'IteratorAggregate iterator | int', \ 'iterator_to_array(': 'IteratorAggregate iterator | array', \ 'java_last_exception_clear(': 'void | void', \ 'java_last_exception_get(': 'void | object', \ 'jddayofweek(': 'int julianday [, int mode] | mixed', \ 'jdmonthname(': 'int julianday, int mode | string', \ 'jdtofrench(': 'int juliandaycount | string', \ 'jdtogregorian(': 'int julianday | string', \ 'jdtojewish(': 'int juliandaycount [, bool hebrew [, int fl]] | string', \ 'jdtojulian(': 'int julianday | string', \ 'jdtounix(': 'int jday | int', \ 'jewishtojd(': 'int month, int day, int year | int', \ 'jpeg2wbmp(': 'string jpegname, string wbmpname, int d_height, int d_width, int threshold | int', \ 'juliantojd(': 'int month, int day, int year | int', \ 'kadm5_chpass_principal(': 'resource handle, string principal, string password | bool', \ 'kadm5_create_principal(': 'resource handle, string principal [, string password [, array options]] | bool', \ 'kadm5_delete_principal(': 'resource handle, string principal | bool', \ 'kadm5_destroy(': 'resource handle | bool', \ 'kadm5_flush(': 'resource handle | bool', \ 'kadm5_get_policies(': 'resource handle | array', \ 'kadm5_get_principal(': 'resource handle, string principal | array', \ 'kadm5_get_principals(': 'resource handle | array', \ 'kadm5_init_with_password(': 'string admin_server, string realm, string principal, string password | resource', \ 'kadm5_modify_principal(': 'resource handle, string principal, array options | bool', \ 'key(': 'array &#38;array | mixed', \ 'krsort(': 'array &#38;array [, int sort_flags] | bool', \ 'ksort(': 'array &#38;array [, int sort_flags] | bool', \ 'lcg_value(': 'void | float', \ 'ldap_8859_to_t61(': 'string value | string', \ 'ldap_add(': 'resource link_identifier, string dn, array entry | bool', \ 'ldap_bind(': 'resource link_identifier [, string bind_rdn [, string bind_password]] | bool', \ 'ldap_compare(': 'resource link_identifier, string dn, string attribute, string value | mixed', \ 'ldap_connect(': '[string hostname [, int port]] | resource', \ 'ldap_count_entries(': 'resource link_identifier, resource result_identifier | int', \ 'ldap_delete(': 'resource link_identifier, string dn | bool', \ 'ldap_dn2ufn(': 'string dn | string', \ 'ldap_err2str(': 'int errno | string', \ 'ldap_errno(': 'resource link_identifier | int', \ 'ldap_error(': 'resource link_identifier | string', \ 'ldap_explode_dn(': 'string dn, int with_attrib | array', \ 'ldap_first_attribute(': 'resource link_identifier, resource result_entry_identifier, int &#38;ber_identifier | string', \ 'ldap_first_entry(': 'resource link_identifier, resource result_identifier | resource', \ 'ldap_first_reference(': 'resource link, resource result | resource', \ 'ldap_free_result(': 'resource result_identifier | bool', \ 'ldap_get_attributes(': 'resource link_identifier, resource result_entry_identifier | array', \ 'ldap_get_dn(': 'resource link_identifier, resource result_entry_identifier | string', \ 'ldap_get_entries(': 'resource link_identifier, resource result_identifier | array', \ 'ldap_get_option(': 'resource link_identifier, int option, mixed &#38;retval | bool', \ 'ldap_get_values(': 'resource link_identifier, resource result_entry_identifier, string attribute | array', \ 'ldap_get_values_len(': 'resource link_identifier, resource result_entry_identifier, string attribute | array', \ 'ldap_list(': 'resource link_identifier, string base_dn, string filter [, array attributes [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]] | resource', \ 'ldap_mod_add(': 'resource link_identifier, string dn, array entry | bool', \ 'ldap_mod_del(': 'resource link_identifier, string dn, array entry | bool', \ 'ldap_modify(': 'resource link_identifier, string dn, array entry | bool', \ 'ldap_mod_replace(': 'resource link_identifier, string dn, array entry | bool', \ 'ldap_next_attribute(': 'resource link_identifier, resource result_entry_identifier, resource &#38;ber_identifier | string', \ 'ldap_next_entry(': 'resource link_identifier, resource result_entry_identifier | resource', \ 'ldap_next_reference(': 'resource link, resource entry | resource', \ 'ldap_parse_reference(': 'resource link, resource entry, array &#38;referrals | bool', \ 'ldap_parse_result(': 'resource link, resource result, int &#38;errcode [, string &#38;matcheddn [, string &#38;errmsg [, array &#38;referrals]]] | bool', \ 'ldap_read(': 'resource link_identifier, string base_dn, string filter [, array attributes [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]] | resource', \ 'ldap_rename(': 'resource link_identifier, string dn, string newrdn, string newparent, bool deleteoldrdn | bool', \ 'ldap_sasl_bind(': 'resource link [, string binddn [, string password [, string sasl_mech [, string sasl_realm [, string sasl_authz_id [, string props]]]]]] | bool', \ 'ldap_search(': 'resource link_identifier, string base_dn, string filter [, array attributes [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]] | resource', \ 'ldap_set_option(': 'resource link_identifier, int option, mixed newval | bool', \ 'ldap_set_rebind_proc(': 'resource link, callback callback | bool', \ 'ldap_sort(': 'resource link, resource result, string sortfilter | bool', \ 'ldap_start_tls(': 'resource link | bool', \ 'ldap_t61_to_8859(': 'string value | string', \ 'ldap_unbind(': 'resource link_identifier | bool', \ 'levenshtein(': 'string str1, string str2 [, int cost_ins [, int cost_rep, int cost_del]] | int', \ 'libxml_clear_errors(': 'void | void', \ 'libxml_get_errors(': 'void | array', \ 'libxml_get_last_error(': 'void | LibXMLError', \ 'libxml_set_streams_context(': 'resource streams_context | void', \ 'libxml_use_internal_errors(': '[bool use_errors] | bool', \ 'link(': 'string target, string link | bool', \ 'linkinfo(': 'string path | int', \ 'list(': 'mixed varname, mixed ... | void', \ 'localeconv(': 'void | array', \ 'localtime(': '[int timestamp [, bool is_associative]] | array', \ 'log10(': 'float arg | float', \ 'log1p(': 'float number | float', \ 'log(': 'float arg [, float base] | float', \ 'long2ip(': 'int proper_address | string', \ 'lstat(': 'string filename | array', \ 'ltrim(': 'string str [, string charlist] | string', \ 'lzf_compress(': 'string data | string', \ 'lzf_decompress(': 'string data | string', \ 'lzf_optimized_for(': 'void | int', \ 'mail(': 'string to, string subject, string message [, string additional_headers [, string additional_parameters]] | bool', \ 'mailparse_determine_best_xfer_encoding(': 'resource fp | string', \ 'mailparse_msg_create(': 'void | resource', \ 'mailparse_msg_extract_part_file(': 'resource rfc2045, string filename [, callback callbackfunc] | string', \ 'mailparse_msg_extract_part(': 'resource rfc2045, string msgbody [, callback callbackfunc] | void', \ 'mailparse_msg_free(': 'resource rfc2045buf | bool', \ 'mailparse_msg_get_part_data(': 'resource rfc2045 | array', \ 'mailparse_msg_get_part(': 'resource rfc2045, string mimesection | resource', \ 'mailparse_msg_get_structure(': 'resource rfc2045 | array', \ 'mailparse_msg_parse_file(': 'string filename | resource', \ 'mailparse_msg_parse(': 'resource rfc2045buf, string data | bool', \ 'mailparse_rfc822_parse_addresses(': 'string addresses | array', \ 'mailparse_stream_encode(': 'resource sourcefp, resource destfp, string encoding | bool', \ 'mailparse_uudecode_all(': 'resource fp | array', \ 'maxdb_connect_errno(': 'void | int', \ 'maxdb_connect_error(': 'void | string', \ 'maxdb_debug(': 'string debug | void', \ 'maxdb_disable_rpl_parse(': 'resource link | bool', \ 'maxdb_dump_debug_info(': 'resource link | bool', \ 'maxdb_embedded_connect(': '[string dbname] | resource', \ 'maxdb_enable_reads_from_master(': 'resource link | bool', \ 'maxdb_enable_rpl_parse(': 'resource link | bool', \ 'maxdb_get_client_info(': 'void | string', \ 'maxdb_get_client_version(': 'void | int', \ 'maxdb_init(': 'void | resource', \ 'maxdb_master_query(': 'resource link, string query | bool', \ 'maxdb_more_results(': 'resource link | bool', \ 'maxdb_next_result(': 'resource link | bool', \ 'maxdb_report(': 'int flags | bool', \ 'maxdb_rollback(': 'resource link | bool', \ 'maxdb_rpl_parse_enabled(': 'resource link | int', \ 'maxdb_rpl_probe(': 'resource link | bool', \ 'maxdb_rpl_query_type(': 'resource link | int', \ 'maxdb_select_db(': 'resource link, string dbname | bool', \ 'maxdb_send_query(': 'resource link, string query | bool', \ 'maxdb_server_end(': 'void | void', \ 'maxdb_server_init(': '[array server [, array groups]] | bool', \ 'maxdb_stmt_sqlstate(': 'resource stmt | string', \ 'max(': 'number arg1, number arg2 [, number ...] | mixed', \ 'mb_convert_case(': 'string str, int mode [, string encoding] | string', \ 'mb_convert_encoding(': 'string str, string to_encoding [, mixed from_encoding] | string', \ 'mb_convert_kana(': 'string str [, string option [, string encoding]] | string', \ 'mb_convert_variables(': 'string to_encoding, mixed from_encoding, mixed &#38;vars [, mixed &#38;...] | string', \ 'mb_decode_mimeheader(': 'string str | string', \ 'mb_decode_numericentity(': 'string str, array convmap [, string encoding] | string', \ 'mb_detect_encoding(': 'string str [, mixed encoding_list [, bool strict]] | string', \ 'mb_detect_order(': '[mixed encoding_list] | mixed', \ 'mb_encode_mimeheader(': 'string str [, string charset [, string transfer_encoding [, string linefeed]]] | string', \ 'mb_encode_numericentity(': 'string str, array convmap [, string encoding] | string', \ 'mb_ereg(': 'string pattern, string string [, array regs] | int', \ 'mb_eregi(': 'string pattern, string string [, array regs] | int', \ 'mb_eregi_replace(': 'string pattern, string replace, string string [, string option] | string', \ 'mb_ereg_match(': 'string pattern, string string [, string option] | bool', \ 'mb_ereg_replace(': 'string pattern, string replacement, string string [, string option] | string', \ 'mb_ereg_search_getpos(': 'void | int', \ 'mb_ereg_search_getregs(': 'void | array', \ 'mb_ereg_search(': '[string pattern [, string option]] | bool', \ 'mb_ereg_search_init(': 'string string [, string pattern [, string option]] | bool', \ 'mb_ereg_search_pos(': '[string pattern [, string option]] | array', \ 'mb_ereg_search_regs(': '[string pattern [, string option]] | array', \ 'mb_ereg_search_setpos(': 'int position | bool', \ 'mb_get_info(': '[string type] | mixed', \ 'mb_http_input(': '[string type] | mixed', \ 'mb_http_output(': '[string encoding] | mixed', \ 'mb_internal_encoding(': '[string encoding] | mixed', \ 'mb_language(': '[string language] | mixed', \ 'mb_list_encodings(': 'void | array', \ 'mb_output_handler(': 'string contents, int status | string', \ 'mb_parse_str(': 'string encoded_string [, array &#38;result] | bool', \ 'mb_preferred_mime_name(': 'string encoding | string', \ 'mb_regex_encoding(': '[string encoding] | mixed', \ 'mb_regex_set_options(': '[string options] | string', \ 'mb_send_mail(': 'string to, string subject, string message [, string additional_headers [, string additional_parameter]] | bool', \ 'mb_split(': 'string pattern, string string [, int limit] | array', \ 'mb_strcut(': 'string str, int start [, int length [, string encoding]] | string', \ 'mb_strimwidth(': 'string str, int start, int width [, string trimmarker [, string encoding]] | string', \ 'mb_strlen(': 'string str [, string encoding] | int', \ 'mb_strpos(': 'string haystack, string needle [, int offset [, string encoding]] | int', \ 'mb_strrpos(': 'string haystack, string needle [, string encoding] | int', \ 'mb_strtolower(': 'string str [, string encoding] | string', \ 'mb_strtoupper(': 'string str [, string encoding] | string', \ 'mb_strwidth(': 'string str [, string encoding] | int', \ 'mb_substitute_character(': '[mixed substrchar] | mixed', \ 'mb_substr_count(': 'string haystack, string needle [, string encoding] | int', \ 'mb_substr(': 'string str, int start [, int length [, string encoding]] | string', \ 'mcal_append_event(': 'int mcal_stream | int', \ 'mcal_close(': 'int mcal_stream [, int flags] | bool', \ 'mcal_create_calendar(': 'int stream, string calendar | bool', \ 'mcal_date_compare(': 'int a_year, int a_month, int a_day, int b_year, int b_month, int b_day | int', \ 'mcal_date_valid(': 'int year, int month, int day | bool', \ 'mcal_day_of_week(': 'int year, int month, int day | int', \ 'mcal_day_of_year(': 'int year, int month, int day | int', \ 'mcal_days_in_month(': 'int month, int leap_year | int', \ 'mcal_delete_calendar(': 'int stream, string calendar | bool', \ 'mcal_delete_event(': 'int mcal_stream, int event_id | bool', \ 'mcal_event_add_attribute(': 'int stream, string attribute, string value | bool', \ 'mcal_event_init(': 'int stream | void', \ 'mcal_event_set_alarm(': 'int stream, int alarm | void', \ 'mcal_event_set_category(': 'int stream, string category | void', \ 'mcal_event_set_class(': 'int stream, int class | void', \ 'mcal_event_set_description(': 'int stream, string description | void', \ 'mcal_event_set_end(': 'int stream, int year, int month, int day [, int hour [, int min [, int sec]]] | void', \ 'mcal_event_set_recur_daily(': 'int stream, int year, int month, int day, int interval | void', \ 'mcal_event_set_recur_monthly_mday(': 'int stream, int year, int month, int day, int interval | void', \ 'mcal_event_set_recur_monthly_wday(': 'int stream, int year, int month, int day, int interval | void', \ 'mcal_event_set_recur_none(': 'int stream | void', \ 'mcal_event_set_recur_weekly(': 'int stream, int year, int month, int day, int interval, int weekdays | void', \ 'mcal_event_set_recur_yearly(': 'int stream, int year, int month, int day, int interval | void', \ 'mcal_event_set_start(': 'int stream, int year, int month, int day [, int hour [, int min [, int sec]]] | void', \ 'mcal_event_set_title(': 'int stream, string title | void', \ 'mcal_expunge(': 'int stream | bool', \ 'mcal_fetch_current_stream_event(': 'int stream | object', \ 'mcal_fetch_event(': 'int mcal_stream, int event_id [, int options] | object', \ 'mcal_is_leap_year(': 'int year | bool', \ 'mcal_list_alarms(': 'int mcal_stream [, int begin_year, int begin_month, int begin_day, int end_year, int end_month, int end_day] | array', \ 'mcal_list_events(': 'int mcal_stream [, int begin_year, int begin_month, int begin_day, int end_year, int end_month, int end_day] | array', \ 'mcal_next_recurrence(': 'int stream, int weekstart, array next | object', \ 'mcal_open(': 'string calendar, string username, string password [, int options] | int', \ 'mcal_popen(': 'string calendar, string username, string password [, int options] | int', \ 'mcal_rename_calendar(': 'int stream, string old_name, string new_name | bool', \ 'mcal_reopen(': 'int mcal_stream, string calendar [, int options] | bool', \ 'mcal_snooze(': 'int stream_id, int event_id | bool', \ 'mcal_store_event(': 'int mcal_stream | int', \ 'mcal_time_valid(': 'int hour, int minutes, int seconds | bool', \ 'mcal_week_of_year(': 'int day, int month, int year | int', \ 'm_checkstatus(': 'resource conn, int identifier | int', \ 'm_completeauthorizations(': 'resource conn, int &#38;array | int', \ 'm_connect(': 'resource conn | int', \ 'm_connectionerror(': 'resource conn | string', \ 'mcrypt_cbc(': 'int cipher, string key, string data, int mode [, string iv] | string', \ 'mcrypt_cfb(': 'int cipher, string key, string data, int mode, string iv | string', \ 'mcrypt_create_iv(': 'int size [, int source] | string', \ 'mcrypt_decrypt(': 'string cipher, string key, string data, string mode [, string iv] | string', \ 'mcrypt_ecb(': 'int cipher, string key, string data, int mode | string', \ 'mcrypt_enc_get_algorithms_name(': 'resource td | string', \ 'mcrypt_enc_get_block_size(': 'resource td | int', \ 'mcrypt_enc_get_iv_size(': 'resource td | int', \ 'mcrypt_enc_get_key_size(': 'resource td | int', \ 'mcrypt_enc_get_modes_name(': 'resource td | string', \ 'mcrypt_enc_get_supported_key_sizes(': 'resource td | array', \ 'mcrypt_enc_is_block_algorithm(': 'resource td | bool', \ 'mcrypt_enc_is_block_algorithm_mode(': 'resource td | bool', \ 'mcrypt_enc_is_block_mode(': 'resource td | bool', \ 'mcrypt_encrypt(': 'string cipher, string key, string data, string mode [, string iv] | string', \ 'mcrypt_enc_self_test(': 'resource td | int', \ 'mcrypt_generic_deinit(': 'resource td | bool', \ 'mcrypt_generic_end(': 'resource td | bool', \ 'mcrypt_generic(': 'resource td, string data | string', \ 'mcrypt_generic_init(': 'resource td, string key, string iv | int', \ 'mcrypt_get_block_size(': 'int cipher | int', \ 'mcrypt_get_cipher_name(': 'int cipher | string', \ 'mcrypt_get_iv_size(': 'string cipher, string mode | int', \ 'mcrypt_get_key_size(': 'int cipher | int', \ 'mcrypt_list_algorithms(': '[string lib_dir] | array', \ 'mcrypt_list_modes(': '[string lib_dir] | array', \ 'mcrypt_module_close(': 'resource td | bool', \ 'mcrypt_module_get_algo_block_size(': 'string algorithm [, string lib_dir] | int', \ 'mcrypt_module_get_algo_key_size(': 'string algorithm [, string lib_dir] | int', \ 'mcrypt_module_get_supported_key_sizes(': 'string algorithm [, string lib_dir] | array', \ 'mcrypt_module_is_block_algorithm(': 'string algorithm [, string lib_dir] | bool', \ 'mcrypt_module_is_block_algorithm_mode(': 'string mode [, string lib_dir] | bool', \ 'mcrypt_module_is_block_mode(': 'string mode [, string lib_dir] | bool', \ 'mcrypt_module_open(': 'string algorithm, string algorithm_directory, string mode, string mode_directory | resource', \ 'mcrypt_module_self_test(': 'string algorithm [, string lib_dir] | bool', \ 'mcrypt_ofb(': 'int cipher, string key, string data, int mode, string iv | string', \ 'md5_file(': 'string filename [, bool raw_output] | string', \ 'md5(': 'string str [, bool raw_output] | string', \ 'mdecrypt_generic(': 'resource td, string data | string', \ 'm_deletetrans(': 'resource conn, int identifier | bool', \ 'm_destroyconn(': 'resource conn | bool', \ 'm_destroyengine(': 'void | void', \ 'memcache_debug(': 'bool on_off | bool', \ 'memory_get_usage(': 'void | int', \ 'metaphone(': 'string str [, int phones] | string', \ 'method_exists(': 'object object, string method_name | bool', \ 'm_getcellbynum(': 'resource conn, int identifier, int column, int row | string', \ 'm_getcell(': 'resource conn, int identifier, string column, int row | string', \ 'm_getcommadelimited(': 'resource conn, int identifier | string', \ 'm_getheader(': 'resource conn, int identifier, int column_num | string', \ 'mhash_count(': 'void | int', \ 'mhash_get_block_size(': 'int hash | int', \ 'mhash_get_hash_name(': 'int hash | string', \ 'mhash(': 'int hash, string data [, string key] | string', \ 'mhash_keygen_s2k(': 'int hash, string password, string salt, int bytes | string', \ 'microtime(': '[bool get_as_float] | mixed', \ 'mime_content_type(': 'string filename | string', \ 'ming_keypress(': 'string str | int', \ 'ming_setcubicthreshold(': 'int threshold | void', \ 'ming_setscale(': 'int scale | void', \ 'ming_useConstants(': 'int use | void', \ 'ming_useswfversion(': 'int version | void', \ 'min(': 'number arg1, number arg2 [, number ...] | mixed', \ 'm_initconn(': 'void | resource', \ 'm_initengine(': 'string location | int', \ 'm_iscommadelimited(': 'resource conn, int identifier | int', \ 'mkdir(': 'string pathname [, int mode [, bool recursive [, resource context]]] | bool', \ 'mktime(': '[int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] | int', \ 'm_maxconntimeout(': 'resource conn, int secs | bool', \ 'm_monitor(': 'resource conn | int', \ 'm_numcolumns(': 'resource conn, int identifier | int', \ 'm_numrows(': 'resource conn, int identifier | int', \ 'money_format(': 'string format, float number | string', \ 'move_uploaded_file(': 'string filename, string destination | bool', \ 'm_parsecommadelimited(': 'resource conn, int identifier | int', \ 'm_responsekeys(': 'resource conn, int identifier | array', \ 'm_responseparam(': 'resource conn, int identifier, string key | string', \ 'm_returnstatus(': 'resource conn, int identifier | int', \ 'msession_connect(': 'string host, string port | bool', \ 'msession_count(': 'void | int', \ 'msession_create(': 'string session | bool', \ 'msession_destroy(': 'string name | bool', \ 'msession_disconnect(': 'void | void', \ 'msession_find(': 'string name, string value | array', \ 'msession_get_array(': 'string session | array', \ 'msession_get_data(': 'string session | string', \ 'msession_get(': 'string session, string name, string value | string', \ 'msession_inc(': 'string session, string name | string', \ 'msession_list(': 'void | array', \ 'msession_listvar(': 'string name | array', \ 'msession_lock(': 'string name | int', \ 'msession_plugin(': 'string session, string val [, string param] | string', \ 'msession_randstr(': 'int param | string', \ 'msession_set_array(': 'string session, array tuples | void', \ 'msession_set_data(': 'string session, string value | bool', \ 'msession_set(': 'string session, string name, string value | bool', \ 'msession_timeout(': 'string session [, int param] | int', \ 'msession_uniq(': 'int param | string', \ 'msession_unlock(': 'string session, int key | int', \ 'm_setblocking(': 'resource conn, int tf | int', \ 'm_setdropfile(': 'resource conn, string directory | int', \ 'm_setip(': 'resource conn, string host, int port | int', \ 'm_setssl_cafile(': 'resource conn, string cafile | int', \ 'm_setssl_files(': 'resource conn, string sslkeyfile, string sslcertfile | int', \ 'm_setssl(': 'resource conn, string host, int port | int', \ 'm_settimeout(': 'resource conn, int seconds | int', \ 'msg_get_queue(': 'int key [, int perms] | resource', \ 'msg_receive(': 'resource queue, int desiredmsgtype, int &#38;msgtype, int maxsize, mixed &#38;message [, bool unserialize [, int flags [, int &#38;errorcode]]] | bool', \ 'msg_remove_queue(': 'resource queue | bool', \ 'msg_send(': 'resource queue, int msgtype, mixed message [, bool serialize [, bool blocking [, int &#38;errorcode]]] | bool', \ 'msg_set_queue(': 'resource queue, array data | bool', \ 'msg_stat_queue(': 'resource queue | array', \ 'msql_affected_rows(': 'resource result | int', \ 'msql_close(': '[resource link_identifier] | bool', \ 'msql_connect(': '[string hostname] | resource', \ 'msql_create_db(': 'string database_name [, resource link_identifier] | bool', \ 'msql_data_seek(': 'resource result, int row_number | bool', \ 'msql_db_query(': 'string database, string query [, resource link_identifier] | resource', \ 'msql_drop_db(': 'string database_name [, resource link_identifier] | bool', \ 'msql_error(': 'void | string', \ 'msql_fetch_array(': 'resource result [, int result_type] | array', \ 'msql_fetch_field(': 'resource result [, int field_offset] | object', \ 'msql_fetch_object(': 'resource result | object', \ 'msql_fetch_row(': 'resource result | array', \ 'msql_field_flags(': 'resource result, int field_offset | string', \ 'msql_field_len(': 'resource result, int field_offset | int', \ 'msql_field_name(': 'resource result, int field_offset | string', \ 'msql_field_seek(': 'resource result, int field_offset | bool', \ 'msql_field_table(': 'resource result, int field_offset | int', \ 'msql_field_type(': 'resource result, int field_offset | string', \ 'msql_free_result(': 'resource result | bool', \ 'msql_list_dbs(': '[resource link_identifier] | resource', \ 'msql_list_fields(': 'string database, string tablename [, resource link_identifier] | resource', \ 'msql_list_tables(': 'string database [, resource link_identifier] | resource', \ 'msql_num_fields(': 'resource result | int', \ 'msql_num_rows(': 'resource query_identifier | int', \ 'msql_pconnect(': '[string hostname] | resource', \ 'msql_query(': 'string query [, resource link_identifier] | resource', \ 'msql_result(': 'resource result, int row [, mixed field] | string', \ 'msql_select_db(': 'string database_name [, resource link_identifier] | bool', \ 'm_sslcert_gen_hash(': 'string filename | string', \ 'mssql_bind(': 'resource stmt, string param_name, mixed &#38;var, int type [, int is_output [, int is_null [, int maxlen]]] | bool', \ 'mssql_close(': '[resource link_identifier] | bool', \ 'mssql_connect(': '[string servername [, string username [, string password]]] | resource', \ 'mssql_data_seek(': 'resource result_identifier, int row_number | bool', \ 'mssql_execute(': 'resource stmt [, bool skip_results] | mixed', \ 'mssql_fetch_array(': 'resource result [, int result_type] | array', \ 'mssql_fetch_assoc(': 'resource result_id | array', \ 'mssql_fetch_batch(': 'resource result_index | int', \ 'mssql_fetch_field(': 'resource result [, int field_offset] | object', \ 'mssql_fetch_object(': 'resource result | object', \ 'mssql_fetch_row(': 'resource result | array', \ 'mssql_field_length(': 'resource result [, int offset] | int', \ 'mssql_field_name(': 'resource result [, int offset] | string', \ 'mssql_field_seek(': 'resource result, int field_offset | bool', \ 'mssql_field_type(': 'resource result [, int offset] | string', \ 'mssql_free_result(': 'resource result | bool', \ 'mssql_free_statement(': 'resource statement | bool', \ 'mssql_get_last_message(': 'void | string', \ 'mssql_guid_string(': 'string binary [, int short_format] | string', \ 'mssql_init(': 'string sp_name [, resource conn_id] | resource', \ 'mssql_min_error_severity(': 'int severity | void', \ 'mssql_min_message_severity(': 'int severity | void', \ 'mssql_next_result(': 'resource result_id | bool', \ 'mssql_num_fields(': 'resource result | int', \ 'mssql_num_rows(': 'resource result | int', \ 'mssql_pconnect(': '[string servername [, string username [, string password]]] | resource', \ 'mssql_query(': 'string query [, resource link_identifier [, int batch_size]] | mixed', \ 'mssql_result(': 'resource result, int row, mixed field | string', \ 'mssql_rows_affected(': 'resource conn_id | int', \ 'mssql_select_db(': 'string database_name [, resource link_identifier] | bool', \ 'mt_getrandmax(': 'void | int', \ 'mt_rand(': '[int min, int max] | int', \ 'm_transactionssent(': 'resource conn | int', \ 'm_transinqueue(': 'resource conn | int', \ 'm_transkeyval(': 'resource conn, int identifier, string key, string value | int', \ 'm_transnew(': 'resource conn | int', \ 'm_transsend(': 'resource conn, int identifier | int', \ 'mt_srand(': '[int seed] | void', \ 'muscat_close(': 'resource muscat_handle | void', \ 'muscat_get(': 'resource muscat_handle | string', \ 'muscat_give(': 'resource muscat_handle, string string | void', \ 'muscat_setup(': 'int size [, string muscat_dir] | resource', \ 'muscat_setup_net(': 'string muscat_host | resource', \ 'm_uwait(': 'int microsecs | int', \ 'm_validateidentifier(': 'resource conn, int tf | int', \ 'm_verifyconnection(': 'resource conn, int tf | bool', \ 'm_verifysslcert(': 'resource conn, int tf | bool', \ 'mysql_affected_rows(': '[resource link_identifier] | int', \ 'mysql_change_user(': 'string user, string password [, string database [, resource link_identifier]] | int', \ 'mysql_client_encoding(': '[resource link_identifier] | string', \ 'mysql_close(': '[resource link_identifier] | bool', \ 'mysql_connect(': '[string server [, string username [, string password [, bool new_link [, int client_flags]]]]] | resource', \ 'mysql_create_db(': 'string database_name [, resource link_identifier] | bool', \ 'mysql_data_seek(': 'resource result, int row_number | bool', \ 'mysql_db_name(': 'resource result, int row [, mixed field] | string', \ 'mysql_db_query(': 'string database, string query [, resource link_identifier] | resource', \ 'mysql_drop_db(': 'string database_name [, resource link_identifier] | bool', \ 'mysql_errno(': '[resource link_identifier] | int', \ 'mysql_error(': '[resource link_identifier] | string', \ 'mysql_escape_string(': 'string unescaped_string | string', \ 'mysql_fetch_array(': 'resource result [, int result_type] | array', \ 'mysql_fetch_assoc(': 'resource result | array', \ 'mysql_fetch_field(': 'resource result [, int field_offset] | object', \ 'mysql_fetch_lengths(': 'resource result | array', \ 'mysql_fetch_object(': 'resource result | object', \ 'mysql_fetch_row(': 'resource result | array', \ 'mysql_field_flags(': 'resource result, int field_offset | string', \ 'mysql_field_len(': 'resource result, int field_offset | int', \ 'mysql_field_name(': 'resource result, int field_offset | string', \ 'mysql_field_seek(': 'resource result, int field_offset | bool', \ 'mysql_field_table(': 'resource result, int field_offset | string', \ 'mysql_field_type(': 'resource result, int field_offset | string', \ 'mysql_free_result(': 'resource result | bool', \ 'mysql_get_client_info(': 'void | string', \ 'mysql_get_host_info(': '[resource link_identifier] | string', \ 'mysql_get_proto_info(': '[resource link_identifier] | int', \ 'mysql_get_server_info(': '[resource link_identifier] | string', \ 'mysqli_connect_errno(': 'void | int', \ 'mysqli_connect_error(': 'void | string', \ 'mysqli_debug(': 'string debug | bool', \ 'mysqli_disable_rpl_parse(': 'mysqli link | bool', \ 'mysqli_dump_debug_info(': 'mysqli link | bool', \ 'mysqli_embedded_connect(': '[string dbname] | mysqli', \ 'mysqli_enable_reads_from_master(': 'mysqli link | bool', \ 'mysqli_enable_rpl_parse(': 'mysqli link | bool', \ 'mysqli_get_client_info(': 'void | string', \ 'mysqli_get_client_version(': 'void | int', \ 'mysqli_init(': 'void | mysqli', \ 'mysqli_master_query(': 'mysqli link, string query | bool', \ 'mysqli_more_results(': 'mysqli link | bool', \ 'mysqli_next_result(': 'mysqli link | bool', \ 'mysql_info(': '[resource link_identifier] | string', \ 'mysql_insert_id(': '[resource link_identifier] | int', \ 'mysqli_report(': 'int flags | bool', \ 'mysqli_rollback(': 'mysqli link | bool', \ 'mysqli_rpl_parse_enabled(': 'mysqli link | int', \ 'mysqli_rpl_probe(': 'mysqli link | bool', \ 'mysqli_select_db(': 'mysqli link, string dbname | bool', \ 'mysqli_server_end(': 'void | void', \ 'mysqli_server_init(': '[array server [, array groups]] | bool', \ 'mysqli_set_charset(': 'mysqli link, string charset | bool', \ 'mysqli_stmt_sqlstate(': 'mysqli_stmt stmt | string', \ 'mysql_list_dbs(': '[resource link_identifier] | resource', \ 'mysql_list_fields(': 'string database_name, string table_name [, resource link_identifier] | resource', \ 'mysql_list_processes(': '[resource link_identifier] | resource', \ 'mysql_list_tables(': 'string database [, resource link_identifier] | resource', \ 'mysql_num_fields(': 'resource result | int', \ 'mysql_num_rows(': 'resource result | int', \ 'mysql_pconnect(': '[string server [, string username [, string password [, int client_flags]]]] | resource', \ 'mysql_ping(': '[resource link_identifier] | bool', \ 'mysql_query(': 'string query [, resource link_identifier] | resource', \ 'mysql_real_escape_string(': 'string unescaped_string [, resource link_identifier] | string', \ 'mysql_result(': 'resource result, int row [, mixed field] | string', \ 'mysql_select_db(': 'string database_name [, resource link_identifier] | bool', \ 'mysql_stat(': '[resource link_identifier] | string', \ 'mysql_tablename(': 'resource result, int i | string', \ 'mysql_thread_id(': '[resource link_identifier] | int', \ 'mysql_unbuffered_query(': 'string query [, resource link_identifier] | resource', \ 'natcasesort(': 'array &#38;array | bool', \ 'natsort(': 'array &#38;array | bool', \ 'ncurses_addch(': 'int ch | int', \ 'ncurses_addchnstr(': 'string s, int n | int', \ 'ncurses_addchstr(': 'string s | int', \ 'ncurses_addnstr(': 'string s, int n | int', \ 'ncurses_addstr(': 'string text | int', \ 'ncurses_assume_default_colors(': 'int fg, int bg | int', \ 'ncurses_attroff(': 'int attributes | int', \ 'ncurses_attron(': 'int attributes | int', \ 'ncurses_attrset(': 'int attributes | int', \ 'ncurses_baudrate(': 'void | int', \ 'ncurses_beep(': 'void | int', \ 'ncurses_bkgd(': 'int attrchar | int', \ 'ncurses_bkgdset(': 'int attrchar | void', \ 'ncurses_border(': 'int left, int right, int top, int bottom, int tl_corner, int tr_corner, int bl_corner, int br_corner | int', \ 'ncurses_bottom_panel(': 'resource panel | int', \ 'ncurses_can_change_color(': 'void | bool', \ 'ncurses_cbreak(': 'void | bool', \ 'ncurses_clear(': 'void | bool', \ 'ncurses_clrtobot(': 'void | bool', \ 'ncurses_clrtoeol(': 'void | bool', \ 'ncurses_color_content(': 'int color, int &#38;r, int &#38;g, int &#38;b | int', \ 'ncurses_color_set(': 'int pair | int', \ 'ncurses_curs_set(': 'int visibility | int', \ 'ncurses_define_key(': 'string definition, int keycode | int', \ 'ncurses_def_prog_mode(': 'void | bool', \ 'ncurses_def_shell_mode(': 'void | bool', \ 'ncurses_delay_output(': 'int milliseconds | int', \ 'ncurses_delch(': 'void | bool', \ 'ncurses_deleteln(': 'void | bool', \ 'ncurses_del_panel(': 'resource panel | bool', \ 'ncurses_delwin(': 'resource window | bool', \ 'ncurses_doupdate(': 'void | bool', \ 'ncurses_echochar(': 'int character | int', \ 'ncurses_echo(': 'void | bool', \ 'ncurses_end(': 'void | int', \ 'ncurses_erasechar(': 'void | string', \ 'ncurses_erase(': 'void | bool', \ 'ncurses_filter(': 'void | void', \ 'ncurses_flash(': 'void | bool', \ 'ncurses_flushinp(': 'void | bool', \ 'ncurses_getch(': 'void | int', \ 'ncurses_getmaxyx(': 'resource window, int &#38;y, int &#38;x | void', \ 'ncurses_getmouse(': 'array &#38;mevent | bool', \ 'ncurses_getyx(': 'resource window, int &#38;y, int &#38;x | void', \ 'ncurses_halfdelay(': 'int tenth | int', \ 'ncurses_has_colors(': 'void | bool', \ 'ncurses_has_ic(': 'void | bool', \ 'ncurses_has_il(': 'void | bool', \ 'ncurses_has_key(': 'int keycode | int', \ 'ncurses_hide_panel(': 'resource panel | int', \ 'ncurses_hline(': 'int charattr, int n | int', \ 'ncurses_inch(': 'void | string', \ 'ncurses_init_color(': 'int color, int r, int g, int b | int', \ 'ncurses_init(': 'void | void', \ 'ncurses_init_pair(': 'int pair, int fg, int bg | int', \ 'ncurses_insch(': 'int character | int', \ 'ncurses_insdelln(': 'int count | int', \ 'ncurses_insertln(': 'void | bool', \ 'ncurses_insstr(': 'string text | int', \ 'ncurses_instr(': 'string &#38;buffer | int', \ 'ncurses_isendwin(': 'void | bool', \ 'ncurses_keyok(': 'int keycode, bool enable | int', \ 'ncurses_keypad(': 'resource window, bool bf | int', \ 'ncurses_killchar(': 'void | string', \ 'ncurses_longname(': 'void | string', \ 'ncurses_meta(': 'resource window, bool 8bit | int', \ 'ncurses_mouseinterval(': 'int milliseconds | int', \ 'ncurses_mousemask(': 'int newmask, int &#38;oldmask | int', \ 'ncurses_mouse_trafo(': 'int &#38;y, int &#38;x, bool toscreen | bool', \ 'ncurses_move(': 'int y, int x | int', \ 'ncurses_move_panel(': 'resource panel, int startx, int starty | int', \ 'ncurses_mvaddch(': 'int y, int x, int c | int', \ 'ncurses_mvaddchnstr(': 'int y, int x, string s, int n | int', \ 'ncurses_mvaddchstr(': 'int y, int x, string s | int', \ 'ncurses_mvaddnstr(': 'int y, int x, string s, int n | int', \ 'ncurses_mvaddstr(': 'int y, int x, string s | int', \ 'ncurses_mvcur(': 'int old_y, int old_x, int new_y, int new_x | int', \ 'ncurses_mvdelch(': 'int y, int x | int', \ 'ncurses_mvgetch(': 'int y, int x | int', \ 'ncurses_mvhline(': 'int y, int x, int attrchar, int n | int', \ 'ncurses_mvinch(': 'int y, int x | int', \ 'ncurses_mvvline(': 'int y, int x, int attrchar, int n | int', \ 'ncurses_mvwaddstr(': 'resource window, int y, int x, string text | int', \ 'ncurses_napms(': 'int milliseconds | int', \ 'ncurses_newpad(': 'int rows, int cols | resource', \ 'ncurses_new_panel(': 'resource window | resource', \ 'ncurses_newwin(': 'int rows, int cols, int y, int x | resource', \ 'ncurses_nl(': 'void | bool', \ 'ncurses_nocbreak(': 'void | bool', \ 'ncurses_noecho(': 'void | bool', \ 'ncurses_nonl(': 'void | bool', \ 'ncurses_noqiflush(': 'void | void', \ 'ncurses_noraw(': 'void | bool', \ 'ncurses_pair_content(': 'int pair, int &#38;f, int &#38;b | int', \ 'ncurses_panel_above(': 'resource panel | resource', \ 'ncurses_panel_below(': 'resource panel | resource', \ 'ncurses_panel_window(': 'resource panel | resource', \ 'ncurses_pnoutrefresh(': 'resource pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol | int', \ 'ncurses_prefresh(': 'resource pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol | int', \ 'ncurses_putp(': 'string text | int', \ 'ncurses_qiflush(': 'void | void', \ 'ncurses_raw(': 'void | bool', \ 'ncurses_refresh(': 'int ch | int', \ 'ncurses_replace_panel(': 'resource panel, resource window | int', \ 'ncurses_reset_prog_mode(': 'void | int', \ 'ncurses_reset_shell_mode(': 'void | int', \ 'ncurses_resetty(': 'void | bool', \ 'ncurses_savetty(': 'void | bool', \ 'ncurses_scr_dump(': 'string filename | int', \ 'ncurses_scr_init(': 'string filename | int', \ 'ncurses_scrl(': 'int count | int', \ 'ncurses_scr_restore(': 'string filename | int', \ 'ncurses_scr_set(': 'string filename | int', \ 'ncurses_show_panel(': 'resource panel | int', \ 'ncurses_slk_attr(': 'void | bool', \ 'ncurses_slk_attroff(': 'int intarg | int', \ 'ncurses_slk_attron(': 'int intarg | int', \ 'ncurses_slk_attrset(': 'int intarg | int', \ 'ncurses_slk_clear(': 'void | bool', \ 'ncurses_slk_color(': 'int intarg | int', \ 'ncurses_slk_init(': 'int format | bool', \ 'ncurses_slk_noutrefresh(': 'void | bool', \ 'ncurses_slk_refresh(': 'void | bool', \ 'ncurses_slk_restore(': 'void | bool', \ 'ncurses_slk_set(': 'int labelnr, string label, int format | bool', \ 'ncurses_slk_touch(': 'void | bool', \ 'ncurses_standend(': 'void | int', \ 'ncurses_standout(': 'void | int', \ 'ncurses_start_color(': 'void | int', \ 'ncurses_termattrs(': 'void | bool', \ 'ncurses_termname(': 'void | string', \ 'ncurses_timeout(': 'int millisec | void', \ 'ncurses_top_panel(': 'resource panel | int', \ 'ncurses_typeahead(': 'int fd | int', \ 'ncurses_ungetch(': 'int keycode | int', \ 'ncurses_ungetmouse(': 'array mevent | bool', \ 'ncurses_update_panels(': 'void | void', \ 'ncurses_use_default_colors(': 'void | bool', \ 'ncurses_use_env(': 'bool flag | void', \ 'ncurses_use_extended_names(': 'bool flag | int', \ 'ncurses_vidattr(': 'int intarg | int', \ 'ncurses_vline(': 'int charattr, int n | int', \ 'ncurses_waddch(': 'resource window, int ch | int', \ 'ncurses_waddstr(': 'resource window, string str [, int n] | int', \ 'ncurses_wattroff(': 'resource window, int attrs | int', \ 'ncurses_wattron(': 'resource window, int attrs | int', \ 'ncurses_wattrset(': 'resource window, int attrs | int', \ 'ncurses_wborder(': 'resource window, int left, int right, int top, int bottom, int tl_corner, int tr_corner, int bl_corner, int br_corner | int', \ 'ncurses_wclear(': 'resource window | int', \ 'ncurses_wcolor_set(': 'resource window, int color_pair | int', \ 'ncurses_werase(': 'resource window | int', \ 'ncurses_wgetch(': 'resource window | int', \ 'ncurses_whline(': 'resource window, int charattr, int n | int', \ 'ncurses_wmouse_trafo(': 'resource window, int &#38;y, int &#38;x, bool toscreen | bool', \ 'ncurses_wmove(': 'resource window, int y, int x | int', \ 'ncurses_wnoutrefresh(': 'resource window | int', \ 'ncurses_wrefresh(': 'resource window | int', \ 'ncurses_wstandend(': 'resource window | int', \ 'ncurses_wstandout(': 'resource window | int', \ 'ncurses_wvline(': 'resource window, int charattr, int n | int', \ 'newt_bell(': 'void | void', \ 'newt_button_bar(': 'array &#38;buttons | resource', \ 'newt_button(': 'int left, int top, string text | resource', \ 'newt_centered_window(': 'int width, int height [, string title] | int', \ 'newt_checkbox_get_value(': 'resource checkbox | string', \ 'newt_checkbox(': 'int left, int top, string text, string def_value [, string seq] | resource', \ 'newt_checkbox_set_flags(': 'resource checkbox, int flags, int sense | void', \ 'newt_checkbox_set_value(': 'resource checkbox, string value | void', \ 'newt_checkbox_tree_add_item(': 'resource checkboxtree, string text, mixed data, int flags, int index [, int ...] | void', \ 'newt_checkbox_tree_find_item(': 'resource checkboxtree, mixed data | array', \ 'newt_checkbox_tree_get_current(': 'resource checkboxtree | mixed', \ 'newt_checkbox_tree_get_entry_value(': 'resource checkboxtree, mixed data | string', \ 'newt_checkbox_tree_get_multi_selection(': 'resource checkboxtree, string seqnum | array', \ 'newt_checkbox_tree_get_selection(': 'resource checkboxtree | array', \ 'newt_checkbox_tree(': 'int left, int top, int height [, int flags] | resource', \ 'newt_checkbox_tree_multi(': 'int left, int top, int height, string seq [, int flags] | resource', \ 'newt_checkbox_tree_set_current(': 'resource checkboxtree, mixed data | void', \ 'newt_checkbox_tree_set_entry(': 'resource checkboxtree, mixed data, string text | void', \ 'newt_checkbox_tree_set_entry_value(': 'resource checkboxtree, mixed data, string value | void', \ 'newt_checkbox_tree_set_width(': 'resource checkbox_tree, int width | void', \ 'newt_clear_key_buffer(': 'void | void', \ 'newt_cls(': 'void | void', \ 'newt_compact_button(': 'int left, int top, string text | resource', \ 'newt_component_add_callback(': 'resource component, mixed func_name, mixed data | void', \ 'newt_component_takes_focus(': 'resource component, bool takes_focus | void', \ 'newt_create_grid(': 'int cols, int rows | resource', \ 'newt_cursor_off(': 'void | void', \ 'newt_cursor_on(': 'void | void', \ 'newt_delay(': 'int microseconds | void', \ 'newt_draw_form(': 'resource form | void', \ 'newt_draw_root_text(': 'int left, int top, string text | void', \ 'newt_entry_get_value(': 'resource entry | string', \ 'newt_entry(': 'int left, int top, int width [, string init_value [, int flags]] | resource', \ 'newt_entry_set_filter(': 'resource entry, callback filter, mixed data | void', \ 'newt_entry_set_flags(': 'resource entry, int flags, int sense | void', \ 'newt_entry_set(': 'resource entry, string value [, bool cursor_at_end] | void', \ 'newt_finished(': 'void | int', \ 'newt_form_add_component(': 'resource form, resource component | void', \ 'newt_form_add_components(': 'resource form, array components | void', \ 'newt_form_add_host_key(': 'resource form, int key | void', \ 'newt_form_destroy(': 'resource form | void', \ 'newt_form_get_current(': 'resource form | resource', \ 'newt_form(': '[resource vert_bar [, string help [, int flags]]] | resource', \ 'newt_form_run(': 'resource form, array &#38;exit_struct | void', \ 'newt_form_set_background(': 'resource from, int background | void', \ 'newt_form_set_height(': 'resource form, int height | void', \ 'newt_form_set_size(': 'resource form | void', \ 'newt_form_set_timer(': 'resource form, int milliseconds | void', \ 'newt_form_set_width(': 'resource form, int width | void', \ 'newt_form_watch_fd(': 'resource form, resource stream [, int flags] | void', \ 'newt_get_screen_size(': 'int &#38;cols, int &#38;rows | void', \ 'newt_grid_add_components_to_form(': 'resource grid, resource form, bool recurse | void', \ 'newt_grid_basic_window(': 'resource text, resource middle, resource buttons | resource', \ 'newt_grid_free(': 'resource grid, bool recurse | void', \ 'newt_grid_get_size(': 'resouce grid, int &#38;width, int &#38;height | void', \ 'newt_grid_h_close_stacked(': 'int element1_type, resource element1 [, int ... [, resource ...]] | resource', \ 'newt_grid_h_stacked(': 'int element1_type, resource element1 [, int ... [, resource ...]] | resource', \ 'newt_grid_place(': 'resource grid, int left, int top | void', \ 'newt_grid_set_field(': 'resource grid, int col, int row, int type, resource val, int pad_left, int pad_top, int pad_right, int pad_bottom, int anchor [, int flags] | void', \ 'newt_grid_simple_window(': 'resource text, resource middle, resource buttons | resource', \ 'newt_grid_v_close_stacked(': 'int element1_type, resource element1 [, int ... [, resource ...]] | resource', \ 'newt_grid_v_stacked(': 'int element1_type, resource element1 [, int ... [, resource ...]] | resource', \ 'newt_grid_wrapped_window_at(': 'resource grid, string title, int left, int top | void', \ 'newt_grid_wrapped_window(': 'resource grid, string title | void', \ 'newt_init(': 'void | int', \ 'newt_label(': 'int left, int top, string text | resource', \ 'newt_label_set_text(': 'resource label, string text | void', \ 'newt_listbox_append_entry(': 'resource listbox, string text, mixed data | void', \ 'newt_listbox_clear(': 'resource listobx | void', \ 'newt_listbox_clear_selection(': 'resource listbox | void', \ 'newt_listbox_delete_entry(': 'resource listbox, mixed key | void', \ 'newt_listbox_get_current(': 'resource listbox | string', \ 'newt_listbox_get_selection(': 'resource listbox | array', \ 'newt_listbox(': 'int left, int top, int height [, int flags] | resource', \ 'newt_listbox_insert_entry(': 'resource listbox, string text, mixed data, mixed key | void', \ 'newt_listbox_item_count(': 'resource listbox | int', \ 'newt_listbox_select_item(': 'resource listbox, mixed key, int sense | void', \ 'newt_listbox_set_current_by_key(': 'resource listbox, mixed key | void', \ 'newt_listbox_set_current(': 'resource listbox, int num | void', \ 'newt_listbox_set_data(': 'resource listbox, int num, mixed data | void', \ 'newt_listbox_set_entry(': 'resource listbox, int num, string text | void', \ 'newt_listbox_set_width(': 'resource listbox, int width | void', \ 'newt_listitem_get_data(': 'resource item | mixed', \ 'newt_listitem(': 'int left, int top, string text, bool is_default, resouce prev_item, mixed data [, int flags] | resource', \ 'newt_listitem_set(': 'resource item, string text | void', \ 'newt_open_window(': 'int left, int top, int width, int height [, string title] | int', \ 'newt_pop_help_line(': 'void | void', \ 'newt_pop_window(': 'void | void', \ 'newt_push_help_line(': '[string text] | void', \ 'newt_radiobutton(': 'int left, int top, string text, bool is_default [, resource prev_button] | resource', \ 'newt_radio_get_current(': 'resource set_member | resource', \ 'newt_redraw_help_line(': 'void | void', \ 'newt_reflow_text(': 'string text, int width, int flex_down, int flex_up, int &#38;actual_width, int &#38;actual_height | string', \ 'newt_refresh(': 'void | void', \ 'newt_resize_screen(': '[bool redraw] | void', \ 'newt_resume(': 'void | void', \ 'newt_run_form(': 'resource form | resource', \ 'newt_scale(': 'int left, int top, int width, int full_value | resource', \ 'newt_scale_set(': 'resource scale, int amount | void', \ 'newt_scrollbar_set(': 'resource scrollbar, int where, int total | void', \ 'newt_set_help_callback(': 'mixed function | void', \ 'newt_set_suspend_callback(': 'callback function, mixed data | void', \ 'newt_suspend(': 'void | void', \ 'newt_texbox_set_text(': 'resource textbox, string text | void', \ 'newt_textbox_get_num_lines(': 'resource textbox | int', \ 'newt_textbox(': 'int left, int top, int width, int height [, int flags] | resource', \ 'newt_textbox_reflowed(': 'int left, int top, char *text, int width, int flex_down, int flex_up [, int flags] | resource', \ 'newt_textbox_set_height(': 'resource textbox, int height | void', \ 'newt_vertical_scrollbar(': 'int left, int top, int height [, int normal_colorset [, int thumb_colorset]] | resource', \ 'newt_wait_for_key(': 'void | void', \ 'newt_win_choice(': 'string title, string button1_text, string button2_text, string format [, mixed args [, mixed ...]] | int', \ 'newt_win_entries(': 'string title, string text, int suggested_width, int flex_down, int flex_up, int data_width, array &#38;items, string button1 [, string ...] | int', \ 'newt_win_menu(': 'string title, string text, int suggestedWidth, int flexDown, int flexUp, int maxListHeight, array items, int &#38;listItem [, string button1 [, string ...]] | int', \ 'newt_win_message(': 'string title, string button_text, string format [, mixed args [, mixed ...]] | void', \ 'newt_win_messagev(': 'string title, string button_text, string format, array args | void', \ 'newt_win_ternary(': 'string title, string button1_text, string button2_text, string button3_text, string format [, mixed args [, mixed ...]] | int', \ 'next(': 'array &#38;array | mixed', \ 'ngettext(': 'string msgid1, string msgid2, int n | string', \ 'nl2br(': 'string string | string', \ 'nl_langinfo(': 'int item | string', \ 'notes_body(': 'string server, string mailbox, int msg_number | array', \ 'notes_copy_db(': 'string from_database_name, string to_database_name | bool', \ 'notes_create_db(': 'string database_name | bool', \ 'notes_create_note(': 'string database_name, string form_name | bool', \ 'notes_drop_db(': 'string database_name | bool', \ 'notes_find_note(': 'string database_name, string name [, string type] | int', \ 'notes_header_info(': 'string server, string mailbox, int msg_number | object', \ 'notes_list_msgs(': 'string db | bool', \ 'notes_mark_read(': 'string database_name, string user_name, string note_id | bool', \ 'notes_mark_unread(': 'string database_name, string user_name, string note_id | bool', \ 'notes_nav_create(': 'string database_name, string name | bool', \ 'notes_search(': 'string database_name, string keywords | array', \ 'notes_unread(': 'string database_name, string user_name | array', \ 'notes_version(': 'string database_name | float', \ 'nsapi_request_headers(': 'void | array', \ 'nsapi_response_headers(': 'void | array', \ 'nsapi_virtual(': 'string uri | bool', \ 'number_format(': 'float number [, int decimals [, string dec_point, string thousands_sep]] | string', \ 'ob_clean(': 'void | void', \ 'ob_end_clean(': 'void | bool', \ 'ob_end_flush(': 'void | bool', \ 'ob_flush(': 'void | void', \ 'ob_get_clean(': 'void | string', \ 'ob_get_contents(': 'void | string', \ 'ob_get_flush(': 'void | string', \ 'ob_get_length(': 'void | int', \ 'ob_get_level(': 'void | int', \ 'ob_gzhandler(': 'string buffer, int mode | string', \ 'ob_iconv_handler(': 'string contents, int status | string', \ 'ob_implicit_flush(': '[int flag] | void', \ 'ob_list_handlers(': 'void | array', \ 'ob_start(': '[callback output_callback [, int chunk_size [, bool erase]]] | bool', \ 'ob_tidyhandler(': 'string input [, int mode] | string', \ 'oci_bind_by_name(': 'resource stmt, string ph_name, mixed &#38;variable [, int maxlength [, int type]] | bool', \ 'oci_cancel(': 'resource stmt | bool', \ 'oci_close(': 'resource connection | bool', \ 'oci_commit(': 'resource connection | bool', \ 'oci_connect(': 'string username, string password [, string db [, string charset [, int session_mode]]] | resource', \ 'oci_define_by_name(': 'resource statement, string column_name, mixed &#38;variable [, int type] | bool', \ 'oci_error(': '[resource source] | array', \ 'oci_execute(': 'resource stmt [, int mode] | bool', \ 'oci_fetch_all(': 'resource statement, array &#38;output [, int skip [, int maxrows [, int flags]]] | int', \ 'oci_fetch_array(': 'resource statement [, int mode] | array', \ 'oci_fetch_assoc(': 'resource statement | array', \ 'oci_fetch(': 'resource statement | bool', \ 'ocifetchinto(': 'resource statement, array &#38;result [, int mode] | int', \ 'oci_fetch_object(': 'resource statement | object', \ 'oci_fetch_row(': 'resource statement | array', \ 'oci_field_is_null(': 'resource stmt, mixed field | bool', \ 'oci_field_name(': 'resource statement, int field | string', \ 'oci_field_precision(': 'resource statement, int field | int', \ 'oci_field_scale(': 'resource statement, int field | int', \ 'oci_field_size(': 'resource stmt, mixed field | int', \ 'oci_field_type(': 'resource stmt, int field | mixed', \ 'oci_field_type_raw(': 'resource statement, int field | int', \ 'oci_free_statement(': 'resource statement | bool', \ 'oci_internal_debug(': 'int onoff | void', \ 'oci_lob_copy(': 'OCI-Lob lob_to, OCI-Lob lob_from [, int length] | bool', \ 'oci_lob_is_equal(': 'OCI-Lob lob1, OCI-Lob lob2 | bool', \ 'oci_new_collection(': 'resource connection, string tdo [, string schema] | OCI-Collection', \ 'oci_new_connect(': 'string username, string password [, string db [, string charset [, int session_mode]]] | resource', \ 'oci_new_cursor(': 'resource connection | resource', \ 'oci_new_descriptor(': 'resource connection [, int type] | OCI-Lob', \ 'oci_num_fields(': 'resource statement | int', \ 'oci_num_rows(': 'resource stmt | int', \ 'oci_parse(': 'resource connection, string query | resource', \ 'oci_password_change(': 'resource connection, string username, string old_password, string new_password | bool', \ 'oci_pconnect(': 'string username, string password [, string db [, string charset [, int session_mode]]] | resource', \ 'oci_result(': 'resource statement, mixed field | mixed', \ 'oci_rollback(': 'resource connection | bool', \ 'oci_server_version(': 'resource connection | string', \ 'oci_set_prefetch(': 'resource statement [, int rows] | bool', \ 'oci_statement_type(': 'resource statement | string', \ 'octdec(': 'string octal_string | number', \ 'odbc_autocommit(': 'resource connection_id [, bool OnOff] | mixed', \ 'odbc_binmode(': 'resource result_id, int mode | bool', \ 'odbc_close_all(': 'void | void', \ 'odbc_close(': 'resource connection_id | void', \ 'odbc_columnprivileges(': 'resource connection_id, string qualifier, string owner, string table_name, string column_name | resource', \ 'odbc_columns(': 'resource connection_id [, string qualifier [, string schema [, string table_name [, string column_name]]]] | resource', \ 'odbc_commit(': 'resource connection_id | bool', \ 'odbc_connect(': 'string dsn, string user, string password [, int cursor_type] | resource', \ 'odbc_cursor(': 'resource result_id | string', \ 'odbc_data_source(': 'resource connection_id, int fetch_type | array', \ 'odbc_do(': 'resource conn_id, string query | resource', \ 'odbc_error(': '[resource connection_id] | string', \ 'odbc_errormsg(': '[resource connection_id] | string', \ 'odbc_exec(': 'resource connection_id, string query_string [, int flags] | resource', \ 'odbc_execute(': 'resource result_id [, array parameters_array] | bool', \ 'odbc_fetch_array(': 'resource result [, int rownumber] | array', \ 'odbc_fetch_into(': 'resource result_id, array &#38;result_array [, int rownumber] | int', \ 'odbc_fetch_object(': 'resource result [, int rownumber] | object', \ 'odbc_fetch_row(': 'resource result_id [, int row_number] | bool', \ 'odbc_field_len(': 'resource result_id, int field_number | int', \ 'odbc_field_name(': 'resource result_id, int field_number | string', \ 'odbc_field_num(': 'resource result_id, string field_name | int', \ 'odbc_field_precision(': 'resource result_id, int field_number | int', \ 'odbc_field_scale(': 'resource result_id, int field_number | int', \ 'odbc_field_type(': 'resource result_id, int field_number | string', \ 'odbc_foreignkeys(': 'resource connection_id, string pk_qualifier, string pk_owner, string pk_table, string fk_qualifier, string fk_owner, string fk_table | resource', \ 'odbc_free_result(': 'resource result_id | bool', \ 'odbc_gettypeinfo(': 'resource connection_id [, int data_type] | resource', \ 'odbc_longreadlen(': 'resource result_id, int length | bool', \ 'odbc_next_result(': 'resource result_id | bool', \ 'odbc_num_fields(': 'resource result_id | int', \ 'odbc_num_rows(': 'resource result_id | int', \ 'odbc_pconnect(': 'string dsn, string user, string password [, int cursor_type] | resource', \ 'odbc_prepare(': 'resource connection_id, string query_string | resource', \ 'odbc_primarykeys(': 'resource connection_id, string qualifier, string owner, string table | resource', \ 'odbc_procedurecolumns(': 'resource connection_id [, string qualifier, string owner, string proc, string column] | resource', \ 'odbc_procedures(': 'resource connection_id [, string qualifier, string owner, string name] | resource', \ 'odbc_result_all(': 'resource result_id [, string format] | int', \ 'odbc_result(': 'resource result_id, mixed field | mixed', \ 'odbc_rollback(': 'resource connection_id | bool', \ 'odbc_setoption(': 'resource id, int function, int option, int param | bool', \ 'odbc_specialcolumns(': 'resource connection_id, int type, string qualifier, string owner, string table, int scope, int nullable | resource', \ 'odbc_statistics(': 'resource connection_id, string qualifier, string owner, string table_name, int unique, int accuracy | resource', \ 'odbc_tableprivileges(': 'resource connection_id, string qualifier, string owner, string name | resource', \ 'odbc_tables(': 'resource connection_id [, string qualifier [, string owner [, string name [, string types]]]] | resource', \ 'openal_buffer_create(': 'void | resource', \ 'openal_buffer_data(': 'resource buffer, int format, string data, int freq | bool', \ 'openal_buffer_destroy(': 'resource buffer | bool', \ 'openal_buffer_get(': 'resource buffer, int property | int', \ 'openal_buffer_loadwav(': 'resource buffer, string wavfile | bool', \ 'openal_context_create(': 'resource device | resource', \ 'openal_context_current(': 'resource context | bool', \ 'openal_context_destroy(': 'resource context | bool', \ 'openal_context_process(': 'resource context | bool', \ 'openal_context_suspend(': 'resource context | bool', \ 'openal_device_close(': 'resource device | bool', \ 'openal_device_open(': '[string device_desc] | resource', \ 'openal_listener_get(': 'int property | mixed', \ 'openal_listener_set(': 'int property, mixed setting | bool', \ 'openal_source_create(': 'void | resource', \ 'openal_source_destroy(': 'resource source | bool', \ 'openal_source_get(': 'resource source, int property | mixed', \ 'openal_source_pause(': 'resource source | bool', \ 'openal_source_play(': 'resource source | bool', \ 'openal_source_rewind(': 'resource source | bool', \ 'openal_source_set(': 'resource source, int property, mixed setting | bool', \ 'openal_source_stop(': 'resource source | bool', \ 'openal_stream(': 'resource source, int format, int rate | resource', \ 'opendir(': 'string path [, resource context] | resource', \ 'openlog(': 'string ident, int option, int facility | bool', \ 'openssl_csr_export(': 'resource csr, string &#38;out [, bool notext] | bool', \ 'openssl_csr_export_to_file(': 'resource csr, string outfilename [, bool notext] | bool', \ 'openssl_csr_new(': 'array dn, resource &#38;privkey [, array configargs [, array extraattribs]] | mixed', \ 'openssl_csr_sign(': 'mixed csr, mixed cacert, mixed priv_key, int days [, array configargs [, int serial]] | resource', \ 'openssl_error_string(': 'void | string', \ 'openssl_free_key(': 'resource key_identifier | void', \ 'openssl_open(': 'string sealed_data, string &#38;open_data, string env_key, mixed priv_key_id | bool', \ 'openssl_pkcs7_decrypt(': 'string infilename, string outfilename, mixed recipcert [, mixed recipkey] | bool', \ 'openssl_pkcs7_encrypt(': 'string infile, string outfile, mixed recipcerts, array headers [, int flags [, int cipherid]] | bool', \ 'openssl_pkcs7_sign(': 'string infilename, string outfilename, mixed signcert, mixed privkey, array headers [, int flags [, string extracerts]] | bool', \ 'openssl_pkcs7_verify(': 'string filename, int flags [, string outfilename [, array cainfo [, string extracerts]]] | mixed', \ 'openssl_pkey_export(': 'mixed key, string &#38;out [, string passphrase [, array configargs]] | bool', \ 'openssl_pkey_export_to_file(': 'mixed key, string outfilename [, string passphrase [, array configargs]] | bool', \ 'openssl_pkey_free(': 'resource key | void', \ 'openssl_pkey_get_private(': 'mixed key [, string passphrase] | resource', \ 'openssl_pkey_get_public(': 'mixed certificate | resource', \ 'openssl_pkey_new(': '[array configargs] | resource', \ 'openssl_private_decrypt(': 'string data, string &#38;decrypted, mixed key [, int padding] | bool', \ 'openssl_private_encrypt(': 'string data, string &#38;crypted, mixed key [, int padding] | bool', \ 'openssl_public_decrypt(': 'string data, string &#38;decrypted, mixed key [, int padding] | bool', \ 'openssl_public_encrypt(': 'string data, string &#38;crypted, mixed key [, int padding] | bool', \ 'openssl_seal(': 'string data, string &#38;sealed_data, array &#38;env_keys, array pub_key_ids | int', \ 'openssl_sign(': 'string data, string &#38;signature, mixed priv_key_id [, int signature_alg] | bool', \ 'openssl_verify(': 'string data, string signature, mixed pub_key_id | int', \ 'openssl_x509_check_private_key(': 'mixed cert, mixed key | bool', \ 'openssl_x509_checkpurpose(': 'mixed x509cert, int purpose [, array cainfo [, string untrustedfile]] | int', \ 'openssl_x509_export(': 'mixed x509, string &#38;output [, bool notext] | bool', \ 'openssl_x509_export_to_file(': 'mixed x509, string outfilename [, bool notext] | bool', \ 'openssl_x509_free(': 'resource x509cert | void', \ 'openssl_x509_parse(': 'mixed x509cert [, bool shortnames] | array', \ 'openssl_x509_read(': 'mixed x509certdata | resource', \ 'ora_bind(': 'resource cursor, string PHP_variable_name, string SQL_parameter_name, int length [, int type] | bool', \ 'ora_close(': 'resource cursor | bool', \ 'ora_columnname(': 'resource cursor, int column | string', \ 'ora_columnsize(': 'resource cursor, int column | int', \ 'ora_columntype(': 'resource cursor, int column | string', \ 'ora_commit(': 'resource conn | bool', \ 'ora_commitoff(': 'resource conn | bool', \ 'ora_commiton(': 'resource conn | bool', \ 'ora_do(': 'resource conn, string query | resource', \ 'ora_errorcode(': '[resource cursor_or_connection] | int', \ 'ora_error(': '[resource cursor_or_connection] | string', \ 'ora_exec(': 'resource cursor | bool', \ 'ora_fetch(': 'resource cursor | bool', \ 'ora_fetch_into(': 'resource cursor, array &#38;result [, int flags] | int', \ 'ora_getcolumn(': 'resource cursor, int column | string', \ 'ora_logoff(': 'resource connection | bool', \ 'ora_logon(': 'string user, string password | resource', \ 'ora_numcols(': 'resource cursor | int', \ 'ora_numrows(': 'resource cursor | int', \ 'ora_open(': 'resource connection | resource', \ 'ora_parse(': 'resource cursor, string sql_statement [, int defer] | bool', \ 'ora_plogon(': 'string user, string password | resource', \ 'ora_rollback(': 'resource connection | bool', \ 'OrbitEnum(': 'string id | new', \ 'OrbitObject(': 'string ior | new', \ 'OrbitStruct(': 'string id | new', \ 'ord(': 'string string | int', \ 'output_add_rewrite_var(': 'string name, string value | bool', \ 'output_reset_rewrite_vars(': 'void | bool', \ 'overload(': '[string class_name] | void', \ 'override_function(': 'string function_name, string function_args, string function_code | bool', \ 'ovrimos_close(': 'int connection | void', \ 'ovrimos_commit(': 'int connection_id | bool', \ 'ovrimos_connect(': 'string host, string db, string user, string password | int', \ 'ovrimos_cursor(': 'int result_id | string', \ 'ovrimos_exec(': 'int connection_id, string query | int', \ 'ovrimos_execute(': 'int result_id [, array parameters_array] | bool', \ 'ovrimos_fetch_into(': 'int result_id, array &#38;result_array [, string how [, int rownumber]] | bool', \ 'ovrimos_fetch_row(': 'int result_id [, int how [, int row_number]] | bool', \ 'ovrimos_field_len(': 'int result_id, int field_number | int', \ 'ovrimos_field_name(': 'int result_id, int field_number | string', \ 'ovrimos_field_num(': 'int result_id, string field_name | int', \ 'ovrimos_field_type(': 'int result_id, int field_number | int', \ 'ovrimos_free_result(': 'int result_id | bool', \ 'ovrimos_longreadlen(': 'int result_id, int length | bool', \ 'ovrimos_num_fields(': 'int result_id | int', \ 'ovrimos_num_rows(': 'int result_id | int', \ 'ovrimos_prepare(': 'int connection_id, string query | int', \ 'ovrimos_result_all(': 'int result_id [, string format] | int', \ 'ovrimos_result(': 'int result_id, mixed field | string', \ 'ovrimos_rollback(': 'int connection_id | bool', \ 'pack(': 'string format [, mixed args [, mixed ...]] | string', \ 'parse_ini_file(': 'string filename [, bool process_sections] | array', \ 'parsekit_compile_file(': 'string filename [, array &#38;errors [, int options]] | array', \ 'parsekit_compile_string(': 'string phpcode [, array &#38;errors [, int options]] | array', \ 'parsekit_func_arginfo(': 'mixed function | array', \ 'parse_str(': 'string str [, array &#38;arr] | void', \ 'parse_url(': 'string url | array', \ 'passthru(': 'string command [, int &#38;return_var] | void', \ 'pathinfo(': 'string path [, int options] | mixed', \ 'pclose(': 'resource handle | int', \ 'pcntl_alarm(': 'int seconds | int', \ 'pcntl_exec(': 'string path [, array args [, array envs]] | void', \ 'pcntl_fork(': 'void | int', \ 'pcntl_getpriority(': '[int pid [, int process_identifier]] | int', \ 'pcntl_setpriority(': 'int priority [, int pid [, int process_identifier]] | bool', \ 'pcntl_signal(': 'int signo, callback handle [, bool restart_syscalls] | bool', \ 'pcntl_wait(': 'int &#38;status [, int options] | int', \ 'pcntl_waitpid(': 'int pid, int &#38;status [, int options] | int', \ 'pcntl_wexitstatus(': 'int status | int', \ 'pcntl_wifexited(': 'int status | bool', \ 'pcntl_wifsignaled(': 'int status | bool', \ 'pcntl_wifstopped(': 'int status | bool', \ 'pcntl_wstopsig(': 'int status | int', \ 'pcntl_wtermsig(': 'int status | int', \ 'pdf_activate_item(': 'resource pdfdoc, int id | bool', \ 'pdf_add_launchlink(': 'resource pdfdoc, float llx, float lly, float urx, float ury, string filename | bool', \ 'pdf_add_locallink(': 'resource pdfdoc, float lowerleftx, float lowerlefty, float upperrightx, float upperrighty, int page, string dest | bool', \ 'pdf_add_nameddest(': 'resource pdfdoc, string name, string optlist | bool', \ 'pdf_add_note(': 'resource pdfdoc, float llx, float lly, float urx, float ury, string contents, string title, string icon, int open | bool', \ 'pdf_add_pdflink(': 'resource pdfdoc, float bottom_left_x, float bottom_left_y, float up_right_x, float up_right_y, string filename, int page, string dest | bool', \ 'pdf_add_thumbnail(': 'resource pdfdoc, int image | bool', \ 'pdf_add_weblink(': 'resource pdfdoc, float lowerleftx, float lowerlefty, float upperrightx, float upperrighty, string url | bool', \ 'pdf_arc(': 'resource p, float x, float y, float r, float alpha, float beta | bool', \ 'pdf_arcn(': 'resource p, float x, float y, float r, float alpha, float beta | bool', \ 'pdf_attach_file(': 'resource pdfdoc, float llx, float lly, float urx, float ury, string filename, string description, string author, string mimetype, string icon | bool', \ 'pdf_begin_document(': 'resource pdfdoc, string filename, string optlist | int', \ 'pdf_begin_font(': 'resource pdfdoc, string filename, float a, float b, float c, float d, float e, float f, string optlist | bool', \ 'pdf_begin_glyph(': 'resource pdfdoc, string glyphname, float wx, float llx, float lly, float urx, float ury | bool', \ 'pdf_begin_item(': 'resource pdfdoc, string tag, string optlist | int', \ 'pdf_begin_layer(': 'resource pdfdoc, int layer | bool', \ 'pdf_begin_page_ext(': 'resource pdfdoc, float width, float height, string optlist | bool', \ 'pdf_begin_page(': 'resource pdfdoc, float width, float height | bool', \ 'pdf_begin_pattern(': 'resource pdfdoc, float width, float height, float xstep, float ystep, int painttype | int', \ 'pdf_begin_template(': 'resource pdfdoc, float width, float height | int', \ 'pdf_circle(': 'resource pdfdoc, float x, float y, float r | bool', \ 'pdf_clip(': 'resource p | bool', \ 'pdf_close(': 'resource p | bool', \ 'pdf_close_image(': 'resource p, int image | void', \ 'pdf_closepath_fill_stroke(': 'resource p | bool', \ 'pdf_closepath(': 'resource p | bool', \ 'pdf_closepath_stroke(': 'resource p | bool', \ 'pdf_close_pdi(': 'resource p, int doc | bool', \ 'pdf_close_pdi_page(': 'resource p, int page | bool', \ 'pdf_concat(': 'resource p, float a, float b, float c, float d, float e, float f | bool', \ 'pdf_continue_text(': 'resource p, string text | bool', \ 'pdf_create_action(': 'resource pdfdoc, string type, string optlist | int', \ 'pdf_create_annotation(': 'resource pdfdoc, float llx, float lly, float urx, float ury, string type, string optlist | bool', \ 'pdf_create_bookmark(': 'resource pdfdoc, string text, string optlist | int', \ 'pdf_create_fieldgroup(': 'resource pdfdoc, string name, string optlist | bool', \ 'pdf_create_field(': 'resource pdfdoc, float llx, float lly, float urx, float ury, string name, string type, string optlist | bool', \ 'pdf_create_gstate(': 'resource pdfdoc, string optlist | int', \ 'pdf_create_pvf(': 'resource pdfdoc, string filename, string data, string optlist | bool', \ 'pdf_create_textflow(': 'resource pdfdoc, string text, string optlist | int', \ 'pdf_curveto(': 'resource p, float x1, float y1, float x2, float y2, float x3, float y3 | bool', \ 'pdf_define_layer(': 'resource pdfdoc, string name, string optlist | int', \ 'pdf_delete(': 'resource pdfdoc | bool', \ 'pdf_delete_pvf(': 'resource pdfdoc, string filename | int', \ 'pdf_delete_textflow(': 'resource pdfdoc, int textflow | bool', \ 'pdf_encoding_set_char(': 'resource pdfdoc, string encoding, int slot, string glyphname, int uv | bool', \ 'pdf_end_document(': 'resource pdfdoc, string optlist | bool', \ 'pdf_end_font(': 'resource pdfdoc | bool', \ 'pdf_end_glyph(': 'resource pdfdoc | bool', \ 'pdf_end_item(': 'resource pdfdoc, int id | bool', \ 'pdf_end_layer(': 'resource pdfdoc | bool', \ 'pdf_end_page_ext(': 'resource pdfdoc, string optlist | bool', \ 'pdf_end_page(': 'resource p | bool', \ 'pdf_end_pattern(': 'resource p | bool', \ 'pdf_end_template(': 'resource p | bool', \ 'pdf_fill(': 'resource p | bool', \ 'pdf_fill_imageblock(': 'resource pdfdoc, int page, string blockname, int image, string optlist | int', \ 'pdf_fill_pdfblock(': 'resource pdfdoc, int page, string blockname, int contents, string optlist | int', \ 'pdf_fill_stroke(': 'resource p | bool', \ 'pdf_fill_textblock(': 'resource pdfdoc, int page, string blockname, string text, string optlist | int', \ 'pdf_findfont(': 'resource p, string fontname, string encoding, int embed | int', \ 'pdf_fit_image(': 'resource pdfdoc, int image, float x, float y, string optlist | bool', \ 'pdf_fit_pdi_page(': 'resource pdfdoc, int page, float x, float y, string optlist | bool', \ 'pdf_fit_textflow(': 'resource pdfdoc, int textflow, float llx, float lly, float urx, float ury, string optlist | string', \ 'pdf_fit_textline(': 'resource pdfdoc, string text, float x, float y, string optlist | bool', \ 'pdf_get_apiname(': 'resource pdfdoc | string', \ 'pdf_get_buffer(': 'resource p | string', \ 'pdf_get_errmsg(': 'resource pdfdoc | string', \ 'pdf_get_errnum(': 'resource pdfdoc | int', \ 'pdf_get_majorversion(': 'void | int', \ 'pdf_get_minorversion(': 'void | int', \ 'pdf_get_parameter(': 'resource p, string key, float modifier | string', \ 'pdf_get_pdi_parameter(': 'resource p, string key, int doc, int page, int reserved | string', \ 'pdf_get_pdi_value(': 'resource p, string key, int doc, int page, int reserved | float', \ 'pdf_get_value(': 'resource p, string key, float modifier | float', \ 'pdf_info_textflow(': 'resource pdfdoc, int textflow, string keyword | float', \ 'pdf_initgraphics(': 'resource p | bool', \ 'pdf_lineto(': 'resource p, float x, float y | bool', \ 'pdf_load_font(': 'resource pdfdoc, string fontname, string encoding, string optlist | int', \ 'pdf_load_iccprofile(': 'resource pdfdoc, string profilename, string optlist | int', \ 'pdf_load_image(': 'resource pdfdoc, string imagetype, string filename, string optlist | int', \ 'pdf_makespotcolor(': 'resource p, string spotname | int', \ 'pdf_moveto(': 'resource p, float x, float y | bool', \ 'pdf_new(': ' | resource', \ 'pdf_open_ccitt(': 'resource pdfdoc, string filename, int width, int height, int BitReverse, int k, int Blackls1 | int', \ 'pdf_open_file(': 'resource p, string filename | bool', \ 'pdf_open_image_file(': 'resource p, string imagetype, string filename, string stringparam, int intparam | int', \ 'pdf_open_image(': 'resource p, string imagetype, string source, string data, int length, int width, int height, int components, int bpc, string params | int', \ 'pdf_open_memory_image(': 'resource p, resource image | int', \ 'pdf_open_pdi(': 'resource pdfdoc, string filename, string optlist, int len | int', \ 'pdf_open_pdi_page(': 'resource p, int doc, int pagenumber, string optlist | int', \ 'pdf_place_image(': 'resource pdfdoc, int image, float x, float y, float scale | bool', \ 'pdf_place_pdi_page(': 'resource pdfdoc, int page, float x, float y, float sx, float sy | bool', \ 'pdf_process_pdi(': 'resource pdfdoc, int doc, int page, string optlist | int', \ 'pdf_rect(': 'resource p, float x, float y, float width, float height | bool', \ 'pdf_restore(': 'resource p | bool', \ 'pdf_resume_page(': 'resource pdfdoc, string optlist | bool', \ 'pdf_rotate(': 'resource p, float phi | bool', \ 'pdf_save(': 'resource p | bool', \ 'pdf_scale(': 'resource p, float sx, float sy | bool', \ 'pdf_set_border_color(': 'resource p, float red, float green, float blue | bool', \ 'pdf_set_border_dash(': 'resource pdfdoc, float black, float white | bool', \ 'pdf_set_border_style(': 'resource pdfdoc, string style, float width | bool', \ 'pdf_setcolor(': 'resource p, string fstype, string colorspace, float c1, float c2, float c3, float c4 | bool', \ 'pdf_setdash(': 'resource pdfdoc, float b, float w | bool', \ 'pdf_setdashpattern(': 'resource pdfdoc, string optlist | bool', \ 'pdf_setflat(': 'resource pdfdoc, float flatness | bool', \ 'pdf_setfont(': 'resource pdfdoc, int font, float fontsize | bool', \ 'pdf_setgray_fill(': 'resource p, float g | bool', \ 'pdf_setgray(': 'resource p, float g | bool', \ 'pdf_setgray_stroke(': 'resource p, float g | bool', \ 'pdf_set_gstate(': 'resource pdfdoc, int gstate | bool', \ 'pdf_set_info(': 'resource p, string key, string value | bool', \ 'pdf_set_layer_dependency(': 'resource pdfdoc, string type, string optlist | bool', \ 'pdf_setlinecap(': 'resource p, int linecap | bool', \ 'pdf_setlinejoin(': 'resource p, int value | bool', \ 'pdf_setlinewidth(': 'resource p, float width | bool', \ 'pdf_setmatrix(': 'resource p, float a, float b, float c, float d, float e, float f | bool', \ 'pdf_setmiterlimit(': 'resource pdfdoc, float miter | bool', \ 'pdf_set_parameter(': 'resource p, string key, string value | bool', \ 'pdf_setrgbcolor_fill(': 'resource p, float red, float green, float blue | bool', \ 'pdf_setrgbcolor(': 'resource p, float red, float green, float blue | bool', \ 'pdf_setrgbcolor_stroke(': 'resource p, float red, float green, float blue | bool', \ 'pdf_set_text_pos(': 'resource p, float x, float y | bool', \ 'pdf_set_value(': 'resource p, string key, float value | bool', \ 'pdf_shading(': 'resource pdfdoc, string shtype, float x0, float y0, float x1, float y1, float c1, float c2, float c3, float c4, string optlist | int', \ 'pdf_shading_pattern(': 'resource pdfdoc, int shading, string optlist | int', \ 'pdf_shfill(': 'resource pdfdoc, int shading | bool', \ 'pdf_show_boxed(': 'resource p, string text, float left, float top, float width, float height, string mode, string feature | int', \ 'pdf_show(': 'resource pdfdoc, string text | bool', \ 'pdf_show_xy(': 'resource p, string text, float x, float y | bool', \ 'pdf_skew(': 'resource p, float alpha, float beta | bool', \ 'pdf_stringwidth(': 'resource p, string text, int font, float fontsize | float', \ 'pdf_stroke(': 'resource p | bool', \ 'pdf_suspend_page(': 'resource pdfdoc, string optlist | bool', \ 'pdf_translate(': 'resource p, float tx, float ty | bool', \ 'pdf_utf16_to_utf8(': 'resource pdfdoc, string utf16string | string', \ 'pdf_utf8_to_utf16(': 'resource pdfdoc, string utf8string, string ordering | string', \ 'pdf_xshow(': 'resource pdfdoc, string text | bool', \ 'pfpro_cleanup(': 'void | bool', \ 'pfpro_init(': 'void | bool', \ 'pfpro_process(': 'array parameters [, string address [, int port [, int timeout [, string proxy_address [, int proxy_port [, string proxy_logon [, string proxy_password]]]]]]] | array', \ 'pfpro_process_raw(': 'string parameters [, string address [, int port [, int timeout [, string proxy_address [, int proxy_port [, string proxy_logon [, string proxy_password]]]]]]] | string', \ 'pfpro_version(': 'void | string', \ 'pfsockopen(': 'string hostname [, int port [, int &#38;errno [, string &#38;errstr [, float timeout]]]] | resource', \ 'pg_affected_rows(': 'resource result | int', \ 'pg_cancel_query(': 'resource connection | bool', \ 'pg_client_encoding(': '[resource connection] | string', \ 'pg_close(': '[resource connection] | bool', \ 'pg_connect(': 'string connection_string [, int connect_type] | resource', \ 'pg_connection_busy(': 'resource connection | bool', \ 'pg_connection_reset(': 'resource connection | bool', \ 'pg_connection_status(': 'resource connection | int', \ 'pg_convert(': 'resource connection, string table_name, array assoc_array [, int options] | array', \ 'pg_copy_from(': 'resource connection, string table_name, array rows [, string delimiter [, string null_as]] | bool', \ 'pg_copy_to(': 'resource connection, string table_name [, string delimiter [, string null_as]] | array', \ 'pg_dbname(': '[resource connection] | string', \ 'pg_delete(': 'resource connection, string table_name, array assoc_array [, int options] | mixed', \ 'pg_end_copy(': '[resource connection] | bool', \ 'pg_escape_bytea(': 'string data | string', \ 'pg_escape_string(': 'string data | string', \ 'pg_execute(': 'resource connection, string stmtname, array params | resource', \ 'pg_fetch_all_columns(': 'resource result [, int column] | array', \ 'pg_fetch_all(': 'resource result | array', \ 'pg_fetch_array(': 'resource result [, int row [, int result_type]] | array', \ 'pg_fetch_assoc(': 'resource result [, int row] | array', \ 'pg_fetch_object(': 'resource result [, int row [, int result_type]] | object', \ 'pg_fetch_result(': 'resource result, int row, mixed field | string', \ 'pg_fetch_row(': 'resource result [, int row] | array', \ 'pg_field_is_null(': 'resource result, int row, mixed field | int', \ 'pg_field_name(': 'resource result, int field_number | string', \ 'pg_field_num(': 'resource result, string field_name | int', \ 'pg_field_prtlen(': 'resource result, int row_number, mixed field_name_or_number | int', \ 'pg_field_size(': 'resource result, int field_number | int', \ 'pg_field_type(': 'resource result, int field_number | string', \ 'pg_field_type_oid(': 'resource result, int field_number | int', \ 'pg_free_result(': 'resource result | bool', \ 'pg_get_notify(': 'resource connection [, int result_type] | array', \ 'pg_get_pid(': 'resource connection | int', \ 'pg_get_result(': '[resource connection] | resource', \ 'pg_host(': '[resource connection] | string', \ 'pg_insert(': 'resource connection, string table_name, array assoc_array [, int options] | mixed', \ 'pg_last_error(': '[resource connection] | string', \ 'pg_last_notice(': 'resource connection | string', \ 'pg_last_oid(': 'resource result | string', \ 'pg_lo_close(': 'resource large_object | bool', \ 'pg_lo_create(': '[resource connection] | int', \ 'pg_lo_export(': 'resource connection, int oid, string pathname | bool', \ 'pg_lo_import(': 'resource connection, string pathname | int', \ 'pg_lo_open(': 'resource connection, int oid, string mode | resource', \ 'pg_lo_read_all(': 'resource large_object | int', \ 'pg_lo_read(': 'resource large_object [, int len] | string', \ 'pg_lo_seek(': 'resource large_object, int offset [, int whence] | bool', \ 'pg_lo_tell(': 'resource large_object | int', \ 'pg_lo_unlink(': 'resource connection, int oid | bool', \ 'pg_lo_write(': 'resource large_object, string data [, int len] | int', \ 'pg_meta_data(': 'resource connection, string table_name | array', \ 'pg_num_fields(': 'resource result | int', \ 'pg_num_rows(': 'resource result | int', \ 'pg_options(': '[resource connection] | string', \ 'pg_parameter_status(': 'resource connection, string param_name | string', \ 'pg_pconnect(': 'string connection_string [, int connect_type] | resource', \ 'pg_ping(': '[resource connection] | bool', \ 'pg_port(': '[resource connection] | int', \ 'pg_prepare(': 'resource connection, string stmtname, string query | resource', \ 'pg_put_line(': 'string data | bool', \ 'pg_query(': 'string query | resource', \ 'pg_query_params(': 'resource connection, string query, array params | resource', \ 'pg_result_error_field(': 'resource result, int fieldcode | string', \ 'pg_result_error(': 'resource result | string', \ 'pg_result_seek(': 'resource result, int offset | bool', \ 'pg_result_status(': 'resource result [, int type] | mixed', \ 'pg_select(': 'resource connection, string table_name, array assoc_array [, int options] | mixed', \ 'pg_send_execute(': 'resource connection, string stmtname, array params | bool', \ 'pg_send_prepare(': 'resource connection, string stmtname, string query | bool', \ 'pg_send_query(': 'resource connection, string query | bool', \ 'pg_send_query_params(': 'resource connection, string query, array params | bool', \ 'pg_set_client_encoding(': 'string encoding | int', \ 'pg_set_error_verbosity(': 'resource connection, int verbosity | int', \ 'pg_trace(': 'string pathname [, string mode [, resource connection]] | bool', \ 'pg_transaction_status(': 'resource connection | int', \ 'pg_tty(': '[resource connection] | string', \ 'pg_unescape_bytea(': 'string data | string', \ 'pg_untrace(': '[resource connection] | bool', \ 'pg_update(': 'resource connection, string table_name, array data, array condition [, int options] | mixed', \ 'pg_version(': '[resource connection] | array', \ 'php_check_syntax(': 'string file_name [, string &#38;error_message] | bool', \ 'phpcredits(': '[int flag] | bool', \ 'phpinfo(': '[int what] | bool', \ 'php_ini_scanned_files(': 'void | string', \ 'php_logo_guid(': 'void | string', \ 'php_sapi_name(': 'void | string', \ 'php_strip_whitespace(': 'string filename | string', \ 'php_uname(': '[string mode] | string', \ 'phpversion(': '[string extension] | string', \ 'pi(': 'void | float', \ 'png2wbmp(': 'string pngname, string wbmpname, int d_height, int d_width, int threshold | int', \ 'popen(': 'string command, string mode | resource', \ 'posix_access(': 'string file [, int mode] | bool', \ 'posix_ctermid(': 'void | string', \ 'posix_getcwd(': 'void | string', \ 'posix_getegid(': 'void | int', \ 'posix_geteuid(': 'void | int', \ 'posix_getgid(': 'void | int', \ 'posix_getgrgid(': 'int gid | array', \ 'posix_getgrnam(': 'string name | array', \ 'posix_getgroups(': 'void | array', \ 'posix_get_last_error(': 'void | int', \ 'posix_getlogin(': 'void | string', \ 'posix_getpgid(': 'int pid | int', \ 'posix_getpgrp(': 'void | int', \ 'posix_getpid(': 'void | int', \ 'posix_getppid(': 'void | int', \ 'posix_getpwnam(': 'string username | array', \ 'posix_getpwuid(': 'int uid | array', \ 'posix_getrlimit(': 'void | array', \ 'posix_getsid(': 'int pid | int', \ 'posix_getuid(': 'void | int', \ 'posix_isatty(': 'int fd | bool', \ 'posix_kill(': 'int pid, int sig | bool', \ 'posix_mkfifo(': 'string pathname, int mode | bool', \ 'posix_mknod(': 'string pathname, int mode [, int major [, int minor]] | bool', \ 'posix_setegid(': 'int gid | bool', \ 'posix_seteuid(': 'int uid | bool', \ 'posix_setgid(': 'int gid | bool', \ 'posix_setpgid(': 'int pid, int pgid | bool', \ 'posix_setsid(': 'void | int', \ 'posix_setuid(': 'int uid | bool', \ 'posix_strerror(': 'int errno | string', \ 'posix_times(': 'void | array', \ 'posix_ttyname(': 'int fd | string', \ 'posix_uname(': 'void | array', \ 'pow(': 'number base, number exp | number', \ 'preg_grep(': 'string pattern, array input [, int flags] | array', \ 'preg_match_all(': 'string pattern, string subject, array &#38;matches [, int flags [, int offset]] | int', \ 'preg_match(': 'string pattern, string subject [, array &#38;matches [, int flags [, int offset]]] | int', \ 'preg_quote(': 'string str [, string delimiter] | string', \ 'preg_replace_callback(': 'mixed pattern, callback callback, mixed subject [, int limit [, int &#38;count]] | mixed', \ 'preg_replace(': 'mixed pattern, mixed replacement, mixed subject [, int limit [, int &#38;count]] | mixed', \ 'preg_split(': 'string pattern, string subject [, int limit [, int flags]] | array', \ 'prev(': 'array &#38;array | mixed', \ 'printer_abort(': 'resource handle | void', \ 'printer_close(': 'resource handle | void', \ 'printer_create_brush(': 'int style, string color | resource', \ 'printer_create_dc(': 'resource handle | void', \ 'printer_create_font(': 'string face, int height, int width, int font_weight, bool italic, bool underline, bool strikeout, int orientation | resource', \ 'printer_create_pen(': 'int style, int width, string color | resource', \ 'printer_delete_brush(': 'resource handle | void', \ 'printer_delete_dc(': 'resource handle | bool', \ 'printer_delete_font(': 'resource handle | void', \ 'printer_delete_pen(': 'resource handle | void', \ 'printer_draw_bmp(': 'resource handle, string filename, int x, int y [, int width, int height] | bool', \ 'printer_draw_chord(': 'resource handle, int rec_x, int rec_y, int rec_x1, int rec_y1, int rad_x, int rad_y, int rad_x1, int rad_y1 | void', \ 'printer_draw_elipse(': 'resource handle, int ul_x, int ul_y, int lr_x, int lr_y | void', \ 'printer_draw_line(': 'resource printer_handle, int from_x, int from_y, int to_x, int to_y | void', \ 'printer_draw_pie(': 'resource handle, int rec_x, int rec_y, int rec_x1, int rec_y1, int rad1_x, int rad1_y, int rad2_x, int rad2_y | void', \ 'printer_draw_rectangle(': 'resource handle, int ul_x, int ul_y, int lr_x, int lr_y | void', \ 'printer_draw_roundrect(': 'resource handle, int ul_x, int ul_y, int lr_x, int lr_y, int width, int height | void', \ 'printer_draw_text(': 'resource printer_handle, string text, int x, int y | void', \ 'printer_end_doc(': 'resource handle | bool', \ 'printer_end_page(': 'resource handle | bool', \ 'printer_get_option(': 'resource handle, string option | mixed', \ 'printer_list(': 'int enumtype [, string name [, int level]] | array', \ 'printer_logical_fontheight(': 'resource handle, int height | int', \ 'printer_open(': '[string devicename] | resource', \ 'printer_select_brush(': 'resource printer_handle, resource brush_handle | void', \ 'printer_select_font(': 'resource printer_handle, resource font_handle | void', \ 'printer_select_pen(': 'resource printer_handle, resource pen_handle | void', \ 'printer_set_option(': 'resource handle, int option, mixed value | bool', \ 'printer_start_doc(': 'resource handle [, string document] | bool', \ 'printer_start_page(': 'resource handle | bool', \ 'printer_write(': 'resource handle, string content | bool', \ 'printf(': 'string format [, mixed args [, mixed ...]] | int', \ 'print(': 'string arg | int', \ 'print_r(': 'mixed expression [, bool return] | bool', \ 'proc_close(': 'resource process | int', \ 'proc_get_status(': 'resource process | array', \ 'proc_nice(': 'int increment | bool', \ 'proc_open(': 'string cmd, array descriptorspec, array &#38;pipes [, string cwd [, array env [, array other_options]]] | resource', \ 'proc_terminate(': 'resource process [, int signal] | int', \ 'property_exists(': 'mixed class, string property | bool', \ 'ps_add_bookmark(': 'resource psdoc, string text [, int parent [, int open]] | int', \ 'ps_add_launchlink(': 'resource psdoc, float llx, float lly, float urx, float ury, string filename | bool', \ 'ps_add_locallink(': 'resource psdoc, float llx, float lly, float urx, float ury, int page, string dest | bool', \ 'ps_add_note(': 'resource psdoc, float llx, float lly, float urx, float ury, string contents, string title, string icon, int open | bool', \ 'ps_add_pdflink(': 'resource psdoc, float llx, float lly, float urx, float ury, string filename, int page, string dest | bool', \ 'ps_add_weblink(': 'resource psdoc, float llx, float lly, float urx, float ury, string url | bool', \ 'ps_arc(': 'resource psdoc, float x, float y, float radius, float alpha, float beta | bool', \ 'ps_arcn(': 'resource psdoc, float x, float y, float radius, float alpha, float beta | bool', \ 'ps_begin_page(': 'resource psdoc, float width, float height | bool', \ 'ps_begin_pattern(': 'resource psdoc, float width, float height, float xstep, float ystep, int painttype | bool', \ 'ps_begin_template(': 'resource psdoc, float width, float height | bool', \ 'ps_circle(': 'resource psdoc, float x, float y, float radius | bool', \ 'ps_clip(': 'resource psdoc | bool', \ 'ps_close(': 'resource psdoc | bool', \ 'ps_close_image(': 'resource psdoc, int imageid | void', \ 'ps_closepath(': 'resource psdoc | bool', \ 'ps_closepath_stroke(': 'resource psdoc | bool', \ 'ps_continue_text(': 'resource psdoc, string text | bool', \ 'ps_curveto(': 'resource psdoc, float x1, float y1, float x2, float y2, float x3, float y3 | bool', \ 'ps_delete(': 'resource psdoc | bool', \ 'ps_end_page(': 'resource psdoc | bool', \ 'ps_end_pattern(': 'resource psdoc | bool', \ 'ps_end_template(': 'resource psdoc | bool', \ 'ps_fill(': 'resource psdoc | bool', \ 'ps_fill_stroke(': 'resource psdoc | bool', \ 'ps_findfont(': 'resource psdoc, string fontname, string encoding [, bool embed] | int', \ 'ps_get_buffer(': 'resource psdoc | string', \ 'ps_get_parameter(': 'resource psdoc, string name [, float modifier] | string', \ 'ps_get_value(': 'resource psdoc, string name [, float modifier] | float', \ 'ps_hyphenate(': 'resource psdoc, string text | array', \ 'ps_lineto(': 'resource psdoc, float x, float y | bool', \ 'ps_makespotcolor(': 'resource psdoc, string name [, float reserved] | int', \ 'ps_moveto(': 'resource psdoc, float x, float y | bool', \ 'ps_new(': 'void | resource', \ 'ps_open_file(': 'resource psdoc [, string filename] | bool', \ 'ps_open_image_file(': 'resource psdoc, string type, string filename [, string stringparam [, int intparam]] | int', \ 'ps_open_image(': 'resource psdoc, string type, string source, string data, int lenght, int width, int height, int components, int bpc, string params | int', \ 'pspell_add_to_personal(': 'int dictionary_link, string word | bool', \ 'pspell_add_to_session(': 'int dictionary_link, string word | bool', \ 'pspell_check(': 'int dictionary_link, string word | bool', \ 'pspell_clear_session(': 'int dictionary_link | bool', \ 'pspell_config_create(': 'string language [, string spelling [, string jargon [, string encoding]]] | int', \ 'pspell_config_data_dir(': 'int conf, string directory | bool', \ 'pspell_config_dict_dir(': 'int conf, string directory | bool', \ 'pspell_config_ignore(': 'int dictionary_link, int n | bool', \ 'pspell_config_mode(': 'int dictionary_link, int mode | bool', \ 'pspell_config_personal(': 'int dictionary_link, string file | bool', \ 'pspell_config_repl(': 'int dictionary_link, string file | bool', \ 'pspell_config_runtogether(': 'int dictionary_link, bool flag | bool', \ 'pspell_config_save_repl(': 'int dictionary_link, bool flag | bool', \ 'pspell_new_config(': 'int config | int', \ 'pspell_new(': 'string language [, string spelling [, string jargon [, string encoding [, int mode]]]] | int', \ 'pspell_new_personal(': 'string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]] | int', \ 'pspell_save_wordlist(': 'int dictionary_link | bool', \ 'pspell_store_replacement(': 'int dictionary_link, string misspelled, string correct | bool', \ 'pspell_suggest(': 'int dictionary_link, string word | array', \ 'ps_place_image(': 'resource psdoc, int imageid, float x, float y, float scale | bool', \ 'ps_rect(': 'resource psdoc, float x, float y, float width, float height | bool', \ 'ps_restore(': 'resource psdoc | bool', \ 'ps_rotate(': 'resource psdoc, float rot | bool', \ 'ps_save(': 'resource psdoc | bool', \ 'ps_scale(': 'resource psdoc, float x, float y | bool', \ 'ps_set_border_color(': 'resource psdoc, float red, float green, float blue | bool', \ 'ps_set_border_dash(': 'resource psdoc, float black, float white | bool', \ 'ps_set_border_style(': 'resource psdoc, string style, float width | bool', \ 'ps_setcolor(': 'resource psdoc, string type, string colorspace, float c1, float c2, float c3, float c4 | bool', \ 'ps_setdash(': 'resource psdoc, float on, float off | bool', \ 'ps_setflat(': 'resource psdoc, float value | bool', \ 'ps_setfont(': 'resource psdoc, int fontid, float size | bool', \ 'ps_setgray(': 'resource psdoc, float gray | bool', \ 'ps_set_info(': 'resource p, string key, string val | bool', \ 'ps_setlinecap(': 'resource psdoc, int type | bool', \ 'ps_setlinejoin(': 'resource psdoc, int type | bool', \ 'ps_setlinewidth(': 'resource psdoc, float width | bool', \ 'ps_setmiterlimit(': 'resource psdoc, float value | bool', \ 'ps_set_parameter(': 'resource psdoc, string name, string value | bool', \ 'ps_setpolydash(': 'resource psdoc, float arr | bool', \ 'ps_set_text_pos(': 'resource psdoc, float x, float y | bool', \ 'ps_set_value(': 'resource psdoc, string name, float value | bool', \ 'ps_shading(': 'resource psdoc, string type, float x0, float y0, float x1, float y1, float c1, float c2, float c3, float c4, string optlist | int', \ 'ps_shading_pattern(': 'resource psdoc, int shadingid, string optlist | int', \ 'ps_shfill(': 'resource psdoc, int shadingid | bool', \ 'ps_show_boxed(': 'resource psdoc, string text, float left, float bottom, float width, float height, string hmode [, string feature] | int', \ 'ps_show(': 'resource psdoc, string text | bool', \ 'ps_show_xy(': 'resource psdoc, string text, float x, float y | bool', \ 'ps_string_geometry(': 'resource psdoc, string text [, int fontid [, float size]] | array', \ 'ps_stringwidth(': 'resource psdoc, string text [, int fontid [, float size]] | float', \ 'ps_stroke(': 'resource psdoc | bool', \ 'ps_symbol(': 'resource psdoc, int ord | bool', \ 'ps_symbol_name(': 'resource psdoc, int ord [, int fontid] | string', \ 'ps_symbol_width(': 'resource psdoc, int ord [, int fontid [, float size]] | float', \ 'ps_translate(': 'resource psdoc, float x, float y | bool', \ 'putenv(': 'string setting | bool', \ 'px_close(': 'resource pxdoc | bool', \ 'px_create_fp(': 'resource pxdoc, resource file, array fielddesc | bool', \ 'px_date2string(': 'resource pxdoc, int value, string format | string', \ 'px_delete(': 'resource pxdoc | bool', \ 'px_delete_record(': 'resource pxdoc, int num | bool', \ 'px_get_field(': 'resource pxdoc, int fieldno | array', \ 'px_get_info(': 'resource pxdoc | array', \ 'px_get_parameter(': 'resource pxdoc, string name | string', \ 'px_get_record(': 'resource pxdoc, int num [, int mode] | array', \ 'px_get_schema(': 'resource pxdoc [, int mode] | array', \ 'px_get_value(': 'resource pxdoc, string name | float', \ 'px_insert_record(': 'resource pxdoc, array data | int', \ 'px_new(': 'void | resource', \ 'px_numfields(': 'resource pxdoc | int', \ 'px_numrecords(': 'resource pxdoc | int', \ 'px_open_fp(': 'resource pxdoc, resource file | bool', \ 'px_put_record(': 'resource pxdoc, array record [, int recpos] | bool', \ 'px_retrieve_record(': 'resource pxdoc, int num [, int mode] | array', \ 'px_set_blob_file(': 'resource pxdoc, string filename | bool', \ 'px_set_parameter(': 'resource pxdoc, string name, string value | bool', \ 'px_set_tablename(': 'resource pxdoc, string name | void', \ 'px_set_targetencoding(': 'resource pxdoc, string encoding | bool', \ 'px_set_value(': 'resource pxdoc, string name, float value | bool', \ 'px_timestamp2string(': 'resource pxdoc, float value, string format | string', \ 'px_update_record(': 'resource pxdoc, array data, int num | bool', \ 'qdom_error(': 'void | string', \ 'qdom_tree(': 'string doc | QDomDocument', \ 'quoted_printable_decode(': 'string str | string', \ 'quotemeta(': 'string str | string', \ 'rad2deg(': 'float number | float', \ 'radius_acct_open(': 'void | resource', \ 'radius_add_server(': 'resource radius_handle, string hostname, int port, string secret, int timeout, int max_tries | bool', \ 'radius_auth_open(': 'void | resource', \ 'radius_close(': 'resource radius_handle | bool', \ 'radius_config(': 'resource radius_handle, string file | bool', \ 'radius_create_request(': 'resource radius_handle, int type | bool', \ 'radius_cvt_addr(': 'string data | string', \ 'radius_cvt_int(': 'string data | int', \ 'radius_cvt_string(': 'string data | string', \ 'radius_demangle(': 'resource radius_handle, string mangled | string', \ 'radius_demangle_mppe_key(': 'resource radius_handle, string mangled | string', \ 'radius_get_attr(': 'resource radius_handle | mixed', \ 'radius_get_vendor_attr(': 'string data | array', \ 'radius_put_addr(': 'resource radius_handle, int type, string addr | bool', \ 'radius_put_attr(': 'resource radius_handle, int type, string value | bool', \ 'radius_put_int(': 'resource radius_handle, int type, int value | bool', \ 'radius_put_string(': 'resource radius_handle, int type, string value | bool', \ 'radius_put_vendor_addr(': 'resource radius_handle, int vendor, int type, string addr | bool', \ 'radius_put_vendor_attr(': 'resource radius_handle, int vendor, int type, string value | bool', \ 'radius_put_vendor_int(': 'resource radius_handle, int vendor, int type, int value | bool', \ 'radius_put_vendor_string(': 'resource radius_handle, int vendor, int type, string value | bool', \ 'radius_request_authenticator(': 'resource radius_handle | string', \ 'radius_send_request(': 'resource radius_handle | int', \ 'radius_server_secret(': 'resource radius_handle | string', \ 'radius_strerror(': 'resource radius_handle | string', \ 'rand(': '[int min, int max] | int', \ 'range(': 'mixed low, mixed high [, number step] | array', \ 'rar_close(': 'resource rar_file | bool', \ 'rar_entry_get(': 'resource rar_file, string entry_name | RarEntry', \ 'rar_list(': 'resource rar_file | array', \ 'rar_open(': 'string filename [, string password] | resource', \ 'rawurldecode(': 'string str | string', \ 'rawurlencode(': 'string str | string', \ 'readdir(': 'resource dir_handle | string', \ 'readfile(': 'string filename [, bool use_include_path [, resource context]] | int', \ 'readgzfile(': 'string filename [, int use_include_path] | int', \ 'readline_add_history(': 'string line | bool', \ 'readline_callback_handler_install(': 'string prompt, callback callback | bool', \ 'readline_callback_handler_remove(': 'void | bool', \ 'readline_callback_read_char(': 'void | void', \ 'readline_clear_history(': 'void | bool', \ 'readline_completion_function(': 'callback function | bool', \ 'readline(': 'string prompt | string', \ 'readline_info(': '[string varname [, string newvalue]] | mixed', \ 'readline_list_history(': 'void | array', \ 'readline_on_new_line(': 'void | void', \ 'readline_read_history(': '[string filename] | bool', \ 'readline_redisplay(': 'void | void', \ 'readline_write_history(': '[string filename] | bool', \ 'readlink(': 'string path | string', \ 'realpath(': 'string path | string', \ 'recode_file(': 'string request, resource input, resource output | bool', \ 'recode_string(': 'string request, string string | string', \ 'register_shutdown_function(': 'callback function [, mixed parameter [, mixed ...]] | void', \ 'register_tick_function(': 'callback function [, mixed arg [, mixed ...]] | bool', \ 'rename_function(': 'string original_name, string new_name | bool', \ 'rename(': 'string oldname, string newname [, resource context] | bool', \ 'reset(': 'array &#38;array | mixed', \ 'restore_error_handler(': 'void | bool', \ 'restore_exception_handler(': 'void | bool', \ 'restore_include_path(': 'void | void', \ 'rewinddir(': 'resource dir_handle | void', \ 'rewind(': 'resource handle | bool', \ 'rmdir(': 'string dirname [, resource context] | bool', \ 'round(': 'float val [, int precision] | float', \ 'rpm_close(': 'resource rpmr | boolean', \ 'rpm_get_tag(': 'resource rpmr, int tagnum | mixed', \ 'rpm_is_valid(': 'string filename | boolean', \ 'rpm_open(': 'string filename | resource', \ 'rpm_version(': 'void | string', \ 'rsort(': 'array &#38;array [, int sort_flags] | bool', \ 'rtrim(': 'string str [, string charlist] | string', \ 'runkit_class_adopt(': 'string classname, string parentname | bool', \ 'runkit_class_emancipate(': 'string classname | bool', \ 'runkit_constant_add(': 'string constname, mixed value | bool', \ 'runkit_constant_redefine(': 'string constname, mixed newvalue | bool', \ 'runkit_constant_remove(': 'string constname | bool', \ 'runkit_function_add(': 'string funcname, string arglist, string code | bool', \ 'runkit_function_copy(': 'string funcname, string targetname | bool', \ 'runkit_function_redefine(': 'string funcname, string arglist, string code | bool', \ 'runkit_function_remove(': 'string funcname | bool', \ 'runkit_function_rename(': 'string funcname, string newname | bool', \ 'runkit_import(': 'string filename [, int flags] | bool', \ 'runkit_lint_file(': 'string filename | bool', \ 'runkit_lint(': 'string code | bool', \ 'runkit_method_add(': 'string classname, string methodname, string args, string code [, int flags] | bool', \ 'runkit_method_copy(': 'string dClass, string dMethod, string sClass [, string sMethod] | bool', \ 'runkit_method_redefine(': 'string classname, string methodname, string args, string code [, int flags] | bool', \ 'runkit_method_remove(': 'string classname, string methodname | bool', \ 'runkit_method_rename(': 'string classname, string methodname, string newname | bool', \ 'runkit_return_value_used(': 'void | bool', \ 'runkit_sandbox_output_handler(': 'object sandbox [, mixed callback] | mixed', \ 'runkit_superglobals(': 'void | array', \ 'satellite_caught_exception(': 'void | bool', \ 'satellite_exception_id(': 'void | string', \ 'satellite_exception_value(': 'void | OrbitStruct', \ 'satellite_get_repository_id(': 'object obj | int', \ 'satellite_load_idl(': 'string file | bool', \ 'satellite_object_to_string(': 'object obj | string', \ 'scandir(': 'string directory [, int sorting_order [, resource context]] | array', \ 'sem_acquire(': 'resource sem_identifier | bool', \ 'sem_get(': 'int key [, int max_acquire [, int perm [, int auto_release]]] | resource', \ 'sem_release(': 'resource sem_identifier | bool', \ 'sem_remove(': 'resource sem_identifier | bool', \ 'serialize(': 'mixed value | string', \ 'sesam_affected_rows(': 'string result_id | int', \ 'sesam_commit(': 'void | bool', \ 'sesam_connect(': 'string catalog, string schema, string user | bool', \ 'sesam_diagnostic(': 'void | array', \ 'sesam_disconnect(': 'void | bool', \ 'sesam_errormsg(': 'void | string', \ 'sesam_execimm(': 'string query | string', \ 'sesam_fetch_array(': 'string result_id [, int whence [, int offset]] | array', \ 'sesam_fetch_result(': 'string result_id [, int max_rows] | mixed', \ 'sesam_fetch_row(': 'string result_id [, int whence [, int offset]] | array', \ 'sesam_field_array(': 'string result_id | array', \ 'sesam_field_name(': 'string result_id, int index | int', \ 'sesam_free_result(': 'string result_id | int', \ 'sesam_num_fields(': 'string result_id | int', \ 'sesam_query(': 'string query [, bool scrollable] | string', \ 'sesam_rollback(': 'void | bool', \ 'sesam_seek_row(': 'string result_id, int whence [, int offset] | bool', \ 'sesam_settransaction(': 'int isolation_level, int read_only | bool', \ 'session_cache_expire(': '[int new_cache_expire] | int', \ 'session_cache_limiter(': '[string cache_limiter] | string', \ 'session_decode(': 'string data | bool', \ 'session_destroy(': 'void | bool', \ 'session_encode(': 'void | string', \ 'session_get_cookie_params(': 'void | array', \ 'session_id(': '[string id] | string', \ 'session_is_registered(': 'string name | bool', \ 'session_module_name(': '[string module] | string', \ 'session_name(': '[string name] | string', \ 'session_pgsql_add_error(': 'int error_level [, string error_message] | bool', \ 'session_pgsql_get_error(': '[bool with_error_message] | array', \ 'session_pgsql_get_field(': 'void | string', \ 'session_pgsql_reset(': 'void | bool', \ 'session_pgsql_set_field(': 'string value | bool', \ 'session_pgsql_status(': 'void | array', \ 'session_regenerate_id(': '[bool delete_old_session] | bool', \ 'session_register(': 'mixed name [, mixed ...] | bool', \ 'session_save_path(': '[string path] | string', \ 'session_set_cookie_params(': 'int lifetime [, string path [, string domain [, bool secure]]] | void', \ 'session_set_save_handler(': 'callback open, callback close, callback read, callback write, callback destroy, callback gc | bool', \ 'session_start(': 'void | bool', \ 'session_unregister(': 'string name | bool', \ 'session_unset(': 'void | void', \ 'session_write_close(': 'void | void', \ 'setcookie(': 'string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]] | bool', \ 'set_error_handler(': 'callback error_handler [, int error_types] | mixed', \ 'set_exception_handler(': 'callback exception_handler | string', \ 'set_include_path(': 'string new_include_path | string', \ 'setlocale(': 'int category, string locale [, string ...] | string', \ 'set_magic_quotes_runtime(': 'int new_setting | bool', \ 'setrawcookie(': 'string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]] | bool', \ 'set_time_limit(': 'int seconds | void', \ 'settype(': 'mixed &#38;var, string type | bool', \ 'sha1_file(': 'string filename [, bool raw_output] | string', \ 'sha1(': 'string str [, bool raw_output] | string', \ 'shell_exec(': 'string cmd | string', \ 'shm_attach(': 'int key [, int memsize [, int perm]] | int', \ 'shm_detach(': 'int shm_identifier | bool', \ 'shm_get_var(': 'int shm_identifier, int variable_key | mixed', \ 'shmop_close(': 'int shmid | void', \ 'shmop_delete(': 'int shmid | bool', \ 'shmop_open(': 'int key, string flags, int mode, int size | int', \ 'shmop_read(': 'int shmid, int start, int count | string', \ 'shmop_size(': 'int shmid | int', \ 'shmop_write(': 'int shmid, string data, int offset | int', \ 'shm_put_var(': 'int shm_identifier, int variable_key, mixed variable | bool', \ 'shm_remove(': 'int shm_identifier | bool', \ 'shm_remove_var(': 'int shm_identifier, int variable_key | bool', \ 'shuffle(': 'array &#38;array | bool', \ 'similar_text(': 'string first, string second [, float &#38;percent] | int', \ 'SimpleXMLElement-&#62;asXML(': '[string filename] | mixed', \ 'simplexml_element-&#62;attributes(': '[string data] | SimpleXMLElement', \ 'simplexml_element-&#62;children(': '[string nsprefix] | SimpleXMLElement', \ 'SimpleXMLElement-&#62;xpath(': 'string path | array', \ 'simplexml_import_dom(': 'DOMNode node [, string class_name] | SimpleXMLElement', \ 'simplexml_load_file(': 'string filename [, string class_name [, int options]] | object', \ 'simplexml_load_string(': 'string data [, string class_name [, int options]] | object', \ 'sinh(': 'float arg | float', \ 'sin(': 'float arg | float', \ 'sleep(': 'int seconds | int', \ 'snmpget(': 'string hostname, string community, string object_id [, int timeout [, int retries]] | string', \ 'snmpgetnext(': 'string host, string community, string object_id [, int timeout [, int retries]] | string', \ 'snmp_get_quick_print(': 'void | bool', \ 'snmp_get_valueretrieval(': 'void | int', \ 'snmp_read_mib(': 'string filename | bool', \ 'snmprealwalk(': 'string host, string community, string object_id [, int timeout [, int retries]] | array', \ 'snmp_set_enum_print(': 'int enum_print | void', \ 'snmpset(': 'string hostname, string community, string object_id, string type, mixed value [, int timeout [, int retries]] | bool', \ 'snmp_set_oid_numeric_print(': 'int oid_numeric_print | void', \ 'snmp_set_quick_print(': 'bool quick_print | void', \ 'snmp_set_valueretrieval(': 'int method | void', \ 'snmpwalk(': 'string hostname, string community, string object_id [, int timeout [, int retries]] | array', \ 'snmpwalkoid(': 'string hostname, string community, string object_id [, int timeout [, int retries]] | array', \ 'socket_accept(': 'resource socket | resource', \ 'socket_bind(': 'resource socket, string address [, int port] | bool', \ 'socket_clear_error(': '[resource socket] | void', \ 'socket_close(': 'resource socket | void', \ 'socket_connect(': 'resource socket, string address [, int port] | bool', \ 'socket_create(': 'int domain, int type, int protocol | resource', \ 'socket_create_listen(': 'int port [, int backlog] | resource', \ 'socket_create_pair(': 'int domain, int type, int protocol, array &#38;fd | bool', \ 'socket_get_option(': 'resource socket, int level, int optname | mixed', \ 'socket_getpeername(': 'resource socket, string &#38;addr [, int &#38;port] | bool', \ 'socket_getsockname(': 'resource socket, string &#38;addr [, int &#38;port] | bool', \ 'socket_last_error(': '[resource socket] | int', \ 'socket_listen(': 'resource socket [, int backlog] | bool', \ 'socket_read(': 'resource socket, int length [, int type] | string', \ 'socket_recvfrom(': 'resource socket, string &#38;buf, int len, int flags, string &#38;name [, int &#38;port] | int', \ 'socket_recv(': 'resource socket, string &#38;buf, int len, int flags | int', \ 'socket_select(': 'array &#38;read, array &#38;write, array &#38;except, int tv_sec [, int tv_usec] | int', \ 'socket_send(': 'resource socket, string buf, int len, int flags | int', \ 'socket_sendto(': 'resource socket, string buf, int len, int flags, string addr [, int port] | int', \ 'socket_set_block(': 'resource socket | bool', \ 'socket_set_nonblock(': 'resource socket | bool', \ 'socket_set_option(': 'resource socket, int level, int optname, mixed optval | bool', \ 'socket_shutdown(': 'resource socket [, int how] | bool', \ 'socket_strerror(': 'int errno | string', \ 'socket_write(': 'resource socket, string buffer [, int length] | int', \ 'sort(': 'array &#38;array [, int sort_flags] | bool', \ 'soundex(': 'string str | string', \ 'spl_classes(': 'void | array', \ 'split(': 'string pattern, string string [, int limit] | array', \ 'spliti(': 'string pattern, string string [, int limit] | array', \ 'sprintf(': 'string format [, mixed args [, mixed ...]] | string', \ 'sqlite_array_query(': 'resource dbhandle, string query [, int result_type [, bool decode_binary]] | array', \ 'sqlite_busy_timeout(': 'resource dbhandle, int milliseconds | void', \ 'sqlite_changes(': 'resource dbhandle | int', \ 'sqlite_close(': 'resource dbhandle | void', \ 'sqlite_column(': 'resource result, mixed index_or_name [, bool decode_binary] | mixed', \ 'sqlite_create_aggregate(': 'resource dbhandle, string function_name, callback step_func, callback finalize_func [, int num_args] | void', \ 'sqlite_create_function(': 'resource dbhandle, string function_name, callback callback [, int num_args] | void', \ 'sqlite_current(': 'resource result [, int result_type [, bool decode_binary]] | array', \ 'sqlite_error_string(': 'int error_code | string', \ 'sqlite_escape_string(': 'string item | string', \ 'sqlite_exec(': 'resource dbhandle, string query [, string &#38;error_msg] | bool', \ 'sqlite_factory(': 'string filename [, int mode [, string &#38;error_message]] | SQLiteDatabase', \ 'sqlite_fetch_all(': 'resource result [, int result_type [, bool decode_binary]] | array', \ 'sqlite_fetch_array(': 'resource result [, int result_type [, bool decode_binary]] | array', \ 'sqlite_fetch_column_types(': 'string table_name, resource dbhandle [, int result_type] | array', \ 'sqlite_fetch_object(': 'resource result [, string class_name [, array ctor_params [, bool decode_binary]]] | object', \ 'sqlite_fetch_single(': 'resource result [, bool decode_binary] | string', \ 'sqlite_field_name(': 'resource result, int field_index | string', \ 'sqlite_has_more(': 'resource result | bool', \ 'sqlite_has_prev(': 'resource result | bool', \ 'sqlite_key(': 'resource result | int', \ 'sqlite_last_error(': 'resource dbhandle | int', \ 'sqlite_last_insert_rowid(': 'resource dbhandle | int', \ 'sqlite_libencoding(': 'void | string', \ 'sqlite_libversion(': 'void | string', \ 'sqlite_next(': 'resource result | bool', \ 'sqlite_num_fields(': 'resource result | int', \ 'sqlite_num_rows(': 'resource result | int', \ 'sqlite_open(': 'string filename [, int mode [, string &#38;error_message]] | resource', \ 'sqlite_popen(': 'string filename [, int mode [, string &#38;error_message]] | resource', \ 'sqlite_prev(': 'resource result | bool', \ 'sqlite_query(': 'resource dbhandle, string query [, int result_type [, string &#38;error_msg]] | resource', \ 'sqlite_rewind(': 'resource result | bool', \ 'sqlite_seek(': 'resource result, int rownum | bool', \ 'sqlite_single_query(': 'resource db, string query [, bool first_row_only [, bool decode_binary]] | array', \ 'sqlite_udf_decode_binary(': 'string data | string', \ 'sqlite_udf_encode_binary(': 'string data | string', \ 'sqlite_unbuffered_query(': 'resource dbhandle, string query [, int result_type [, string &#38;error_msg]] | resource', \ 'sqlite_valid(': 'resource result | bool', \ 'sql_regcase(': 'string string | string', \ 'sqrt(': 'float arg | float', \ 'srand(': '[int seed] | void', \ 'sscanf(': 'string str, string format [, mixed &#38;...] | mixed', \ 'ssh2_auth_hostbased_file(': 'resource session, string username, string hostname, string pubkeyfile, string privkeyfile [, string passphrase [, string local_username]] | bool', \ 'ssh2_auth_none(': 'resource session, string username | mixed', \ 'ssh2_auth_password(': 'resource session, string username, string password | bool', \ 'ssh2_auth_pubkey_file(': 'resource session, string username, string pubkeyfile, string privkeyfile [, string passphrase] | bool', \ 'ssh2_connect(': 'string host [, int port [, array methods [, array callbacks]]] | resource', \ 'ssh2_exec(': 'resource session, string command [, string pty [, array env [, int width [, int height [, int width_height_type]]]]] | resource', \ 'ssh2_fetch_stream(': 'resource channel, int streamid | resource', \ 'ssh2_fingerprint(': 'resource session [, int flags] | string', \ 'ssh2_methods_negotiated(': 'resource session | array', \ 'ssh2_publickey_add(': 'resource pkey, string algoname, string blob [, bool overwrite [, array attributes]] | bool', \ 'ssh2_publickey_init(': 'resource session | resource', \ 'ssh2_publickey_list(': 'resource pkey | array', \ 'ssh2_publickey_remove(': 'resource pkey, string algoname, string blob | bool', \ 'ssh2_scp_recv(': 'resource session, string remote_file, string local_file | bool', \ 'ssh2_scp_send(': 'resource session, string local_file, string remote_file [, int create_mode] | bool', \ 'ssh2_sftp(': 'resource session | resource', \ 'ssh2_sftp_lstat(': 'resource sftp, string path | array', \ 'ssh2_sftp_mkdir(': 'resource sftp, string dirname [, int mode [, bool recursive]] | bool', \ 'ssh2_sftp_readlink(': 'resource sftp, string link | string', \ 'ssh2_sftp_realpath(': 'resource sftp, string filename | string', \ 'ssh2_sftp_rename(': 'resource sftp, string from, string to | bool', \ 'ssh2_sftp_rmdir(': 'resource sftp, string dirname | bool', \ 'ssh2_sftp_stat(': 'resource sftp, string path | array', \ 'ssh2_sftp_symlink(': 'resource sftp, string target, string link | bool', \ 'ssh2_sftp_unlink(': 'resource sftp, string filename | bool', \ 'ssh2_shell(': 'resource session [, string term_type [, array env [, int width [, int height [, int width_height_type]]]]] | resource', \ 'ssh2_tunnel(': 'resource session, string host, int port | resource', \ 'stat(': 'string filename | array', \ 'stats_absolute_deviation(': 'array a | float', \ 'stats_cdf_beta(': 'float par1, float par2, float par3, int which | float', \ 'stats_cdf_binomial(': 'float par1, float par2, float par3, int which | float', \ 'stats_cdf_cauchy(': 'float par1, float par2, float par3, int which | float', \ 'stats_cdf_chisquare(': 'float par1, float par2, int which | float', \ 'stats_cdf_exponential(': 'float par1, float par2, int which | float', \ 'stats_cdf_f(': 'float par1, float par2, float par3, int which | float', \ 'stats_cdf_gamma(': 'float par1, float par2, float par3, int which | float', \ 'stats_cdf_laplace(': 'float par1, float par2, float par3, int which | float', \ 'stats_cdf_logistic(': 'float par1, float par2, float par3, int which | float', \ 'stats_cdf_negative_binomial(': 'float par1, float par2, float par3, int which | float', \ 'stats_cdf_noncentral_chisquare(': 'float par1, float par2, float par3, int which | float', \ 'stats_cdf_noncentral_f(': 'float par1, float par2, float par3, float par4, int which | float', \ 'stats_cdf_poisson(': 'float par1, float par2, int which | float', \ 'stats_cdf_t(': 'float par1, float par2, int which | float', \ 'stats_cdf_uniform(': 'float par1, float par2, float par3, int which | float', \ 'stats_cdf_weibull(': 'float par1, float par2, float par3, int which | float', \ 'stats_covariance(': 'array a, array b | float', \ 'stats_dens_beta(': 'float x, float a, float b | float', \ 'stats_dens_cauchy(': 'float x, float ave, float stdev | float', \ 'stats_dens_chisquare(': 'float x, float dfr | float', \ 'stats_dens_exponential(': 'float x, float scale | float', \ 'stats_dens_f(': 'float x, float dfr1, float dfr2 | float', \ 'stats_dens_gamma(': 'float x, float shape, float scale | float', \ 'stats_dens_laplace(': 'float x, float ave, float stdev | float', \ 'stats_dens_logistic(': 'float x, float ave, float stdev | float', \ 'stats_dens_negative_binomial(': 'float x, float n, float pi | float', \ 'stats_dens_normal(': 'float x, float ave, float stdev | float', \ 'stats_dens_pmf_binomial(': 'float x, float n, float pi | float', \ 'stats_dens_pmf_hypergeometric(': 'float n1, float n2, float N1, float N2 | float', \ 'stats_dens_pmf_poisson(': 'float x, float lb | float', \ 'stats_dens_t(': 'float x, float dfr | float', \ 'stats_dens_weibull(': 'float x, float a, float b | float', \ 'stats_den_uniform(': 'float x, float a, float b | float', \ 'stats_harmonic_mean(': 'array a | number', \ 'stats_kurtosis(': 'array a | float', \ 'stats_rand_gen_beta(': 'float a, float b | float', \ 'stats_rand_gen_chisquare(': 'float df | float', \ 'stats_rand_gen_exponential(': 'float av | float', \ 'stats_rand_gen_f(': 'float dfn, float dfd | float', \ 'stats_rand_gen_funiform(': 'float low, float high | float', \ 'stats_rand_gen_gamma(': 'float a, float r | float', \ 'stats_rand_gen_ibinomial(': 'int n, float pp | int', \ 'stats_rand_gen_ibinomial_negative(': 'int n, float p | int', \ 'stats_rand_gen_int(': 'void | int', \ 'stats_rand_gen_ipoisson(': 'float mu | int', \ 'stats_rand_gen_iuniform(': 'int low, int high | int', \ 'stats_rand_gen_noncenral_chisquare(': 'float df, float xnonc | float', \ 'stats_rand_gen_noncentral_f(': 'float dfn, float dfd, float xnonc | float', \ 'stats_rand_gen_noncentral_t(': 'float df, float xnonc | float', \ 'stats_rand_gen_normal(': 'float av, float sd | float', \ 'stats_rand_gen_t(': 'float df | float', \ 'stats_rand_get_seeds(': 'void | array', \ 'stats_rand_phrase_to_seeds(': 'string phrase | array', \ 'stats_rand_ranf(': 'void | float', \ 'stats_rand_setall(': 'int iseed1, int iseed2 | void', \ 'stats_skew(': 'array a | float', \ 'stats_standard_deviation(': 'array a [, bool sample] | float', \ 'stats_stat_binomial_coef(': 'int x, int n | float', \ 'stats_stat_correlation(': 'array arr1, array arr2 | float', \ 'stats_stat_gennch(': 'int n | float', \ 'stats_stat_independent_t(': 'array arr1, array arr2 | float', \ 'stats_stat_innerproduct(': 'array arr1, array arr2 | float', \ 'stats_stat_noncentral_t(': 'float par1, float par2, float par3, int which | float', \ 'stats_stat_paired_t(': 'array arr1, array arr2 | float', \ 'stats_stat_percentile(': 'float df, float xnonc | float', \ 'stats_stat_powersum(': 'array arr, float power | float', \ 'stats_variance(': 'array a [, bool sample] | float', \ 'strcasecmp(': 'string str1, string str2 | int', \ 'strcmp(': 'string str1, string str2 | int', \ 'strcoll(': 'string str1, string str2 | int', \ 'strcspn(': 'string str1, string str2 [, int start [, int length]] | int', \ 'stream_bucket_append(': 'resource brigade, resource bucket | void', \ 'stream_bucket_make_writeable(': 'resource brigade | object', \ 'stream_bucket_new(': 'resource stream, string buffer | object', \ 'stream_bucket_prepend(': 'resource brigade, resource bucket | void', \ 'stream_context_create(': '[array options] | resource', \ 'stream_context_get_default(': '[array options] | resource', \ 'stream_context_get_options(': 'resource stream_or_context | array', \ 'stream_context_set_option(': 'resource stream_or_context, string wrapper, string option, mixed value | bool', \ 'stream_context_set_params(': 'resource stream_or_context, array params | bool', \ 'stream_copy_to_stream(': 'resource source, resource dest [, int maxlength [, int offset]] | int', \ 'stream_filter_append(': 'resource stream, string filtername [, int read_write [, mixed params]] | resource', \ 'stream_filter_prepend(': 'resource stream, string filtername [, int read_write [, mixed params]] | resource', \ 'stream_filter_register(': 'string filtername, string classname | bool', \ 'stream_filter_remove(': 'resource stream_filter | bool', \ 'stream_get_contents(': 'resource handle [, int maxlength [, int offset]] | string', \ 'stream_get_filters(': 'void | array', \ 'stream_get_line(': 'resource handle, int length [, string ending] | string', \ 'stream_get_meta_data(': 'resource stream | array', \ 'stream_get_transports(': 'void | array', \ 'stream_get_wrappers(': 'void | array', \ 'stream_select(': 'array &#38;read, array &#38;write, array &#38;except, int tv_sec [, int tv_usec] | int', \ 'stream_set_blocking(': 'resource stream, int mode | bool', \ 'stream_set_timeout(': 'resource stream, int seconds [, int microseconds] | bool', \ 'stream_set_write_buffer(': 'resource stream, int buffer | int', \ 'stream_socket_accept(': 'resource server_socket [, float timeout [, string &#38;peername]] | resource', \ 'stream_socket_client(': 'string remote_socket [, int &#38;errno [, string &#38;errstr [, float timeout [, int flags [, resource context]]]]] | resource', \ 'stream_socket_enable_crypto(': 'resource stream, bool enable [, int crypto_type [, resource session_stream]] | mixed', \ 'stream_socket_get_name(': 'resource handle, bool want_peer | string', \ 'stream_socket_pair(': 'int domain, int type, int protocol | array', \ 'stream_socket_recvfrom(': 'resource socket, int length [, int flags [, string &#38;address]] | string', \ 'stream_socket_sendto(': 'resource socket, string data [, int flags [, string address]] | int', \ 'stream_socket_server(': 'string local_socket [, int &#38;errno [, string &#38;errstr [, int flags [, resource context]]]] | resource', \ 'stream_wrapper_register(': 'string protocol, string classname | bool', \ 'stream_wrapper_restore(': 'string protocol | bool', \ 'stream_wrapper_unregister(': 'string protocol | bool', \ 'strftime(': 'string format [, int timestamp] | string', \ 'stripcslashes(': 'string str | string', \ 'stripos(': 'string haystack, string needle [, int offset] | int', \ 'stripslashes(': 'string str | string', \ 'strip_tags(': 'string str [, string allowable_tags] | string', \ 'str_ireplace(': 'mixed search, mixed replace, mixed subject [, int &#38;count] | mixed', \ 'stristr(': 'string haystack, string needle | string', \ 'strlen(': 'string string | int', \ 'strnatcasecmp(': 'string str1, string str2 | int', \ 'strnatcmp(': 'string str1, string str2 | int', \ 'strncasecmp(': 'string str1, string str2, int len | int', \ 'strncmp(': 'string str1, string str2, int len | int', \ 'str_pad(': 'string input, int pad_length [, string pad_string [, int pad_type]] | string', \ 'strpbrk(': 'string haystack, string char_list | string', \ 'strpos(': 'string haystack, mixed needle [, int offset] | int', \ 'strptime(': 'string date, string format | array', \ 'strrchr(': 'string haystack, string needle | string', \ 'str_repeat(': 'string input, int multiplier | string', \ 'str_replace(': 'mixed search, mixed replace, mixed subject [, int &#38;count] | mixed', \ 'strrev(': 'string string | string', \ 'strripos(': 'string haystack, string needle [, int offset] | int', \ 'str_rot13(': 'string str | string', \ 'strrpos(': 'string haystack, string needle [, int offset] | int', \ 'str_shuffle(': 'string str | string', \ 'str_split(': 'string string [, int split_length] | array', \ 'strspn(': 'string str1, string str2 [, int start [, int length]] | int', \ 'strstr(': 'string haystack, string needle | string', \ 'strtok(': 'string str, string token | string', \ 'strtolower(': 'string str | string', \ 'strtotime(': 'string time [, int now] | int', \ 'strtoupper(': 'string string | string', \ 'strtr(': 'string str, string from, string to | string', \ 'strval(': 'mixed var | string', \ 'str_word_count(': 'string string [, int format [, string charlist]] | mixed', \ 'substr_compare(': 'string main_str, string str, int offset [, int length [, bool case_insensitivity]] | int', \ 'substr_count(': 'string haystack, string needle [, int offset [, int length]] | int', \ 'substr(': 'string string, int start [, int length] | string', \ 'substr_replace(': 'mixed string, string replacement, int start [, int length] | mixed', \ 'swf_actiongeturl(': 'string url, string target | void', \ 'swf_actiongotoframe(': 'int framenumber | void', \ 'swf_actiongotolabel(': 'string label | void', \ 'swfaction(': 'string script | SWFAction', \ 'swf_actionnextframe(': 'void | void', \ 'swf_actionplay(': 'void | void', \ 'swf_actionprevframe(': 'void | void', \ 'swf_actionsettarget(': 'string target | void', \ 'swf_actionstop(': 'void | void', \ 'swf_actiontogglequality(': 'void | void', \ 'swf_actionwaitforframe(': 'int framenumber, int skipcount | void', \ 'swf_addbuttonrecord(': 'int states, int shapeid, int depth | void', \ 'swf_addcolor(': 'float r, float g, float b, float a | void', \ 'swfbitmap-&#62;getheight(': 'void | float', \ 'swfbitmap-&#62;getwidth(': 'void | float', \ 'swfbitmap(': 'mixed file [, mixed alphafile] | SWFBitmap', \ 'swfbutton-&#62;addaction(': 'resource action, int flags | void', \ 'swfbutton-&#62;addshape(': 'resource shape, int flags | void', \ 'swfbutton(': 'void | SWFButton', \ 'swfbutton-&#62;setaction(': 'resource action | void', \ 'swfbutton-&#62;setdown(': 'resource shape | void', \ 'swfbutton-&#62;sethit(': 'resource shape | void', \ 'swfbutton-&#62;setover(': 'resource shape | void', \ 'swfbutton-&#62;setup(': 'resource shape | void', \ 'swf_closefile(': '[int return_file] | void', \ 'swf_definebitmap(': 'int objid, string image_name | void', \ 'swf_definefont(': 'int fontid, string fontname | void', \ 'swf_defineline(': 'int objid, float x1, float y1, float x2, float y2, float width | void', \ 'swf_definepoly(': 'int objid, array coords, int npoints, float width | void', \ 'swf_definerect(': 'int objid, float x1, float y1, float x2, float y2, float width | void', \ 'swf_definetext(': 'int objid, string str, int docenter | void', \ 'swfdisplayitem-&#62;addcolor(': 'int red, int green, int blue [, int a] | void', \ 'swfdisplayitem-&#62;move(': 'int dx, int dy | void', \ 'swfdisplayitem-&#62;moveto(': 'int x, int y | void', \ 'swfdisplayitem-&#62;multcolor(': 'int red, int green, int blue [, int a] | void', \ 'swfdisplayitem-&#62;remove(': 'void | void', \ 'swfdisplayitem-&#62;rotate(': 'float ddegrees | void', \ 'swfdisplayitem-&#62;rotateto(': 'float degrees | void', \ 'swfdisplayitem-&#62;scale(': 'int dx, int dy | void', \ 'swfdisplayitem-&#62;scaleto(': 'int x [, int y] | void', \ 'swfdisplayitem-&#62;setdepth(': 'float depth | void', \ 'swfdisplayitem-&#62;setname(': 'string name | void', \ 'swfdisplayitem-&#62;setratio(': 'float ratio | void', \ 'swfdisplayitem-&#62;skewx(': 'float ddegrees | void', \ 'swfdisplayitem-&#62;skewxto(': 'float degrees | void', \ 'swfdisplayitem-&#62;skewy(': 'float ddegrees | void', \ 'swfdisplayitem-&#62;skewyto(': 'float degrees | void', \ 'swf_endbutton(': 'void | void', \ 'swf_enddoaction(': 'void | void', \ 'swf_endshape(': 'void | void', \ 'swf_endsymbol(': 'void | void', \ 'swffill(': 'void | SWFFill', \ 'swffill-&#62;moveto(': 'int x, int y | void', \ 'swffill-&#62;rotateto(': 'float degrees | void', \ 'swffill-&#62;scaleto(': 'int x [, int y] | void', \ 'swffill-&#62;skewxto(': 'float x | void', \ 'swffill-&#62;skewyto(': 'float y | void', \ 'swffont-&#62;getwidth(': 'string string | float', \ 'swffont(': 'string filename | SWFFont', \ 'swf_fontsize(': 'float size | void', \ 'swf_fontslant(': 'float slant | void', \ 'swf_fonttracking(': 'float tracking | void', \ 'swf_getbitmapinfo(': 'int bitmapid | array', \ 'swf_getfontinfo(': 'void | array', \ 'swf_getframe(': 'void | int', \ 'swfgradient-&#62;addentry(': 'float ratio, int red, int green, int blue [, int a] | void', \ 'swfgradient(': 'void | SWFGradient', \ 'swf_labelframe(': 'string name | void', \ 'swf_lookat(': 'float view_x, float view_y, float view_z, float reference_x, float reference_y, float reference_z, float twist | void', \ 'swf_modifyobject(': 'int depth, int how | void', \ 'swfmorph-&#62;getshape1(': 'void | mixed', \ 'swfmorph-&#62;getshape2(': 'void | mixed', \ 'swfmorph(': 'void | SWFMorph', \ 'swfmovie-&#62;add(': 'resource instance | void', \ 'swfmovie(': 'void | SWFMovie', \ 'swfmovie-&#62;nextframe(': 'void | void', \ 'swfmovie-&#62;output(': '[int compression] | int', \ 'swfmovie-&#62;remove(': 'resource instance | void', \ 'swfmovie-&#62;save(': 'string filename [, int compression] | int', \ 'swfmovie-&#62;setbackground(': 'int red, int green, int blue | void', \ 'swfmovie-&#62;setdimension(': 'int width, int height | void', \ 'swfmovie-&#62;setframes(': 'string numberofframes | void', \ 'swfmovie-&#62;setrate(': 'int rate | void', \ 'swfmovie-&#62;streammp3(': 'mixed mp3File | void', \ 'swf_mulcolor(': 'float r, float g, float b, float a | void', \ 'swf_nextid(': 'void | int', \ 'swf_oncondition(': 'int transition | void', \ 'swf_openfile(': 'string filename, float width, float height, float framerate, float r, float g, float b | void', \ 'swf_ortho2(': 'float xmin, float xmax, float ymin, float ymax | void', \ 'swf_ortho(': 'float xmin, float xmax, float ymin, float ymax, float zmin, float zmax | void', \ 'swf_perspective(': 'float fovy, float aspect, float near, float far | void', \ 'swf_placeobject(': 'int objid, int depth | void', \ 'swf_polarview(': 'float dist, float azimuth, float incidence, float twist | void', \ 'swf_popmatrix(': 'void | void', \ 'swf_posround(': 'int round | void', \ 'SWFPrebuiltClip(': '[string file] | SWFPrebuiltClip', \ 'swf_pushmatrix(': 'void | void', \ 'swf_removeobject(': 'int depth | void', \ 'swf_rotate(': 'float angle, string axis | void', \ 'swf_scale(': 'float x, float y, float z | void', \ 'swf_setfont(': 'int fontid | void', \ 'swf_setframe(': 'int framenumber | void', \ 'SWFShape-&#62;addFill(': 'int red, int green, int blue [, int a] | SWFFill', \ 'swf_shapearc(': 'float x, float y, float r, float ang1, float ang2 | void', \ 'swf_shapecurveto3(': 'float x1, float y1, float x2, float y2, float x3, float y3 | void', \ 'swf_shapecurveto(': 'float x1, float y1, float x2, float y2 | void', \ 'swfshape-&#62;drawcurve(': 'int controldx, int controldy, int anchordx, int anchordy [, int targetdx, int targetdy] | int', \ 'swfshape-&#62;drawcurveto(': 'int controlx, int controly, int anchorx, int anchory [, int targetx, int targety] | int', \ 'swfshape-&#62;drawline(': 'int dx, int dy | void', \ 'swfshape-&#62;drawlineto(': 'int x, int y | void', \ 'swf_shapefillbitmapclip(': 'int bitmapid | void', \ 'swf_shapefillbitmaptile(': 'int bitmapid | void', \ 'swf_shapefilloff(': 'void | void', \ 'swf_shapefillsolid(': 'float r, float g, float b, float a | void', \ 'swfshape(': 'void | SWFShape', \ 'swf_shapelinesolid(': 'float r, float g, float b, float a, float width | void', \ 'swf_shapelineto(': 'float x, float y | void', \ 'swfshape-&#62;movepen(': 'int dx, int dy | void', \ 'swfshape-&#62;movepento(': 'int x, int y | void', \ 'swf_shapemoveto(': 'float x, float y | void', \ 'swfshape-&#62;setleftfill(': 'swfgradient fill | void', \ 'swfshape-&#62;setline(': 'swfshape shape | void', \ 'swfshape-&#62;setrightfill(': 'swfgradient fill | void', \ 'swf_showframe(': 'void | void', \ 'SWFSound(': 'string filename, int flags | SWFSound', \ 'swfsprite-&#62;add(': 'resource object | void', \ 'swfsprite(': 'void | SWFSprite', \ 'swfsprite-&#62;nextframe(': 'void | void', \ 'swfsprite-&#62;remove(': 'resource object | void', \ 'swfsprite-&#62;setframes(': 'int numberofframes | void', \ 'swf_startbutton(': 'int objid, int type | void', \ 'swf_startdoaction(': 'void | void', \ 'swf_startshape(': 'int objid | void', \ 'swf_startsymbol(': 'int objid | void', \ 'swftext-&#62;addstring(': 'string string | void', \ 'swftextfield-&#62;addstring(': 'string string | void', \ 'swftextfield-&#62;align(': 'int alignement | void', \ 'swftextfield(': '[int flags] | SWFTextField', \ 'swftextfield-&#62;setbounds(': 'int width, int height | void', \ 'swftextfield-&#62;setcolor(': 'int red, int green, int blue [, int a] | void', \ 'swftextfield-&#62;setfont(': 'string font | void', \ 'swftextfield-&#62;setheight(': 'int height | void', \ 'swftextfield-&#62;setindentation(': 'int width | void', \ 'swftextfield-&#62;setleftmargin(': 'int width | void', \ 'swftextfield-&#62;setlinespacing(': 'int height | void', \ 'swftextfield-&#62;setmargins(': 'int left, int right | void', \ 'swftextfield-&#62;setname(': 'string name | void', \ 'swftextfield-&#62;setrightmargin(': 'int width | void', \ 'swftext-&#62;getwidth(': 'string string | float', \ 'swftext(': 'void | SWFText', \ 'swftext-&#62;moveto(': 'int x, int y | void', \ 'swftext-&#62;setcolor(': 'int red, int green, int blue [, int a] | void', \ 'swftext-&#62;setfont(': 'string font | void', \ 'swftext-&#62;setheight(': 'int height | void', \ 'swftext-&#62;setspacing(': 'float spacing | void', \ 'swf_textwidth(': 'string str | float', \ 'swf_translate(': 'float x, float y, float z | void', \ 'SWFVideoStream(': '[string file] | SWFVideoStream', \ 'swf_viewport(': 'float xmin, float xmax, float ymin, float ymax | void', \ 'sybase_affected_rows(': '[resource link_identifier] | int', \ 'sybase_close(': '[resource link_identifier] | bool', \ 'sybase_connect(': '[string servername [, string username [, string password [, string charset [, string appname]]]]] | resource', \ 'sybase_data_seek(': 'resource result_identifier, int row_number | bool', \ 'sybase_deadlock_retry_count(': 'int retry_count | void', \ 'sybase_fetch_array(': 'resource result | array', \ 'sybase_fetch_assoc(': 'resource result | array', \ 'sybase_fetch_field(': 'resource result [, int field_offset] | object', \ 'sybase_fetch_object(': 'resource result [, mixed object] | object', \ 'sybase_fetch_row(': 'resource result | array', \ 'sybase_field_seek(': 'resource result, int field_offset | bool', \ 'sybase_free_result(': 'resource result | bool', \ 'sybase_get_last_message(': 'void | string', \ 'sybase_min_client_severity(': 'int severity | void', \ 'sybase_min_error_severity(': 'int severity | void', \ 'sybase_min_message_severity(': 'int severity | void', \ 'sybase_min_server_severity(': 'int severity | void', \ 'sybase_num_fields(': 'resource result | int', \ 'sybase_num_rows(': 'resource result | int', \ 'sybase_pconnect(': '[string servername [, string username [, string password [, string charset [, string appname]]]]] | resource', \ 'sybase_query(': 'string query [, resource link_identifier] | mixed', \ 'sybase_result(': 'resource result, int row, mixed field | string', \ 'sybase_select_db(': 'string database_name [, resource link_identifier] | bool', \ 'sybase_set_message_handler(': 'callback handler [, resource connection] | bool', \ 'sybase_unbuffered_query(': 'string query, resource link_identifier [, bool store_result] | resource', \ 'symlink(': 'string target, string link | bool', \ 'sys_getloadavg(': 'void | array', \ 'syslog(': 'int priority, string message | bool', \ 'system(': 'string command [, int &#38;return_var] | string', \ 'tanh(': 'float arg | float', \ 'tan(': 'float arg | float', \ 'tcpwrap_check(': 'string daemon, string address [, string user [, bool nodns]] | bool', \ 'tempnam(': 'string dir, string prefix | string', \ 'textdomain(': 'string text_domain | string', \ 'tidy_access_count(': 'tidy object | int', \ 'tidy_config_count(': 'tidy object | int', \ 'tidy_error_count(': 'tidy object | int', \ 'tidy_get_output(': 'tidy object | string', \ 'tidy_load_config(': 'string filename, string encoding | void', \ 'tidy_node-&#62;get_attr(': 'int attrib_id | tidy_attr', \ 'tidy_node-&#62;get_nodes(': 'int node_id | array', \ 'tidyNode-&#62;hasChildren(': 'void | bool', \ 'tidyNode-&#62;hasSiblings(': 'void | bool', \ 'tidyNode-&#62;isAsp(': 'void | bool', \ 'tidyNode-&#62;isComment(': 'void | bool', \ 'tidyNode-&#62;isHtml(': 'void | bool', \ 'tidyNode-&#62;isJste(': 'void | bool', \ 'tidyNode-&#62;isPhp(': 'void | bool', \ 'tidyNode-&#62;isText(': 'void | bool', \ 'tidy_node-&#62;next(': 'void | tidy_node', \ 'tidy_node-&#62;prev(': 'void | tidy_node', \ 'tidy_repair_file(': 'string filename [, mixed config [, string encoding [, bool use_include_path]]] | string', \ 'tidy_repair_string(': 'string data [, mixed config [, string encoding]] | string', \ 'tidy_reset_config(': 'void | bool', \ 'tidy_save_config(': 'string filename | bool', \ 'tidy_set_encoding(': 'string encoding | bool', \ 'tidy_setopt(': 'string option, mixed value | bool', \ 'tidy_warning_count(': 'tidy object | int', \ 'time(': 'void | int', \ 'time_nanosleep(': 'int seconds, int nanoseconds | mixed', \ 'time_sleep_until(': 'float timestamp | bool', \ 'tmpfile(': 'void | resource', \ 'token_get_all(': 'string source | array', \ 'token_name(': 'int token | string', \ 'touch(': 'string filename [, int time [, int atime]] | bool', \ 'trigger_error(': 'string error_msg [, int error_type] | bool', \ 'trim(': 'string str [, string charlist] | string', \ 'uasort(': 'array &#38;array, callback cmp_function | bool', \ 'ucfirst(': 'string str | string', \ 'ucwords(': 'string str | string', \ 'udm_add_search_limit(': 'resource agent, int var, string val | bool', \ 'udm_alloc_agent_array(': 'array databases | resource', \ 'udm_alloc_agent(': 'string dbaddr [, string dbmode] | resource', \ 'udm_api_version(': 'void | int', \ 'udm_cat_list(': 'resource agent, string category | array', \ 'udm_cat_path(': 'resource agent, string category | array', \ 'udm_check_charset(': 'resource agent, string charset | bool', \ 'udm_check_stored(': 'resource agent, int link, string doc_id | int', \ 'udm_clear_search_limits(': 'resource agent | bool', \ 'udm_close_stored(': 'resource agent, int link | int', \ 'udm_crc32(': 'resource agent, string str | int', \ 'udm_errno(': 'resource agent | int', \ 'udm_error(': 'resource agent | string', \ 'udm_find(': 'resource agent, string query | resource', \ 'udm_free_agent(': 'resource agent | int', \ 'udm_free_ispell_data(': 'int agent | bool', \ 'udm_free_res(': 'resource res | bool', \ 'udm_get_doc_count(': 'resource agent | int', \ 'udm_get_res_field(': 'resource res, int row, int field | string', \ 'udm_get_res_param(': 'resource res, int param | string', \ 'udm_hash32(': 'resource agent, string str | int', \ 'udm_load_ispell_data(': 'resource agent, int var, string val1, string val2, int flag | bool', \ 'udm_open_stored(': 'resource agent, string storedaddr | int', \ 'udm_set_agent_param(': 'resource agent, int var, string val | bool', \ 'uksort(': 'array &#38;array, callback cmp_function | bool', \ 'umask(': '[int mask] | int', \ 'unicode_encode(': 'unicode input, string encoding | string', \ 'unicode_semantics(': 'void | bool', \ 'uniqid(': '[string prefix [, bool more_entropy]] | string', \ 'unixtojd(': '[int timestamp] | int', \ 'unlink(': 'string filename [, resource context] | bool', \ 'unpack(': 'string format, string data | array', \ 'unregister_tick_function(': 'string function_name | void', \ 'unserialize(': 'string str | mixed', \ 'unset(': 'mixed var [, mixed var [, mixed ...]] | void', \ 'urldecode(': 'string str | string', \ 'urlencode(': 'string str | string', \ 'use_soap_error_handler(': '[bool handler] | bool', \ 'usleep(': 'int micro_seconds | void', \ 'usort(': 'array &#38;array, callback cmp_function | bool', \ 'utf8_decode(': 'string data | string', \ 'utf8_encode(': 'string data | string', \ 'var_dump(': 'mixed expression [, mixed expression [, ...]] | void', \ 'var_export(': 'mixed expression [, bool return] | mixed', \ 'variant_abs(': 'mixed val | mixed', \ 'variant_add(': 'mixed left, mixed right | mixed', \ 'variant_and(': 'mixed left, mixed right | mixed', \ 'variant_cast(': 'variant variant, int type | variant', \ 'variant_cat(': 'mixed left, mixed right | mixed', \ 'variant_cmp(': 'mixed left, mixed right [, int lcid [, int flags]] | int', \ 'variant_date_from_timestamp(': 'int timestamp | variant', \ 'variant_date_to_timestamp(': 'variant variant | int', \ 'variant_div(': 'mixed left, mixed right | mixed', \ 'variant_eqv(': 'mixed left, mixed right | mixed', \ 'variant_fix(': 'mixed variant | mixed', \ 'variant_get_type(': 'variant variant | int', \ 'variant_idiv(': 'mixed left, mixed right | mixed', \ 'variant_imp(': 'mixed left, mixed right | mixed', \ 'variant_int(': 'mixed variant | mixed', \ 'variant_mod(': 'mixed left, mixed right | mixed', \ 'variant_mul(': 'mixed left, mixed right | mixed', \ 'variant_neg(': 'mixed variant | mixed', \ 'variant_not(': 'mixed variant | mixed', \ 'variant_or(': 'mixed left, mixed right | mixed', \ 'variant_pow(': 'mixed left, mixed right | mixed', \ 'variant_round(': 'mixed variant, int decimals | mixed', \ 'variant_set(': 'variant variant, mixed value | void', \ 'variant_set_type(': 'variant variant, int type | void', \ 'variant_sub(': 'mixed left, mixed right | mixed', \ 'variant_xor(': 'mixed left, mixed right | mixed', \ 'version_compare(': 'string version1, string version2 [, string operator] | mixed', \ 'vfprintf(': 'resource handle, string format, array args | int', \ 'virtual(': 'string filename | bool', \ 'vpopmail_add_alias_domain_ex(': 'string olddomain, string newdomain | bool', \ 'vpopmail_add_alias_domain(': 'string domain, string aliasdomain | bool', \ 'vpopmail_add_domain_ex(': 'string domain, string passwd [, string quota [, string bounce [, bool apop]]] | bool', \ 'vpopmail_add_domain(': 'string domain, string dir, int uid, int gid | bool', \ 'vpopmail_add_user(': 'string user, string domain, string password [, string gecos [, bool apop]] | bool', \ 'vpopmail_alias_add(': 'string user, string domain, string alias | bool', \ 'vpopmail_alias_del_domain(': 'string domain | bool', \ 'vpopmail_alias_del(': 'string user, string domain | bool', \ 'vpopmail_alias_get_all(': 'string domain | array', \ 'vpopmail_alias_get(': 'string alias, string domain | array', \ 'vpopmail_auth_user(': 'string user, string domain, string password [, string apop] | bool', \ 'vpopmail_del_domain_ex(': 'string domain | bool', \ 'vpopmail_del_domain(': 'string domain | bool', \ 'vpopmail_del_user(': 'string user, string domain | bool', \ 'vpopmail_error(': 'void | string', \ 'vpopmail_passwd(': 'string user, string domain, string password [, bool apop] | bool', \ 'vpopmail_set_user_quota(': 'string user, string domain, string quota | bool', \ 'vprintf(': 'string format, array args | int', \ 'vsprintf(': 'string format, array args | string', \ 'w32api_deftype(': 'string typename, string member1_type, string member1_name [, string ... [, string ...]] | bool', \ 'w32api_init_dtype(': 'string typename, mixed value [, mixed ...] | resource', \ 'w32api_invoke_function(': 'string funcname, mixed argument [, mixed ...] | mixed', \ 'w32api_register_function(': 'string library, string function_name, string return_type | bool', \ 'w32api_set_call_method(': 'int method | void', \ 'wddx_add_vars(': 'int packet_id, mixed name_var [, mixed ...] | bool', \ 'wddx_packet_end(': 'resource packet_id | string', \ 'wddx_packet_start(': '[string comment] | resource', \ 'wddx_serialize_value(': 'mixed var [, string comment] | string', \ 'wddx_serialize_vars(': 'mixed var_name [, mixed ...] | string', \ 'wddx_unserialize(': 'string packet | mixed', \ 'win32_create_service(': 'array details [, string machine] | int', \ 'win32_delete_service(': 'string servicename [, string machine] | int', \ 'win32_get_last_control_message(': 'void | int', \ 'win32_ps_list_procs(': 'void | array', \ 'win32_ps_stat_mem(': 'void | array', \ 'win32_ps_stat_proc(': '[int pid] | array', \ 'win32_query_service_status(': 'string servicename [, string machine] | mixed', \ 'win32_set_service_status(': 'int status | bool', \ 'win32_start_service_ctrl_dispatcher(': 'string name | bool', \ 'win32_start_service(': 'string servicename [, string machine] | int', \ 'win32_stop_service(': 'string servicename [, string machine] | int', \ 'wordwrap(': 'string str [, int width [, string break [, bool cut]]] | string', \ 'xattr_get(': 'string filename, string name [, int flags] | string', \ 'xattr_list(': 'string filename [, int flags] | array', \ 'xattr_remove(': 'string filename, string name [, int flags] | bool', \ 'xattr_set(': 'string filename, string name, string value [, int flags] | bool', \ 'xattr_supported(': 'string filename [, int flags] | bool', \ 'xdiff_file_diff_binary(': 'string file1, string file2, string dest | bool', \ 'xdiff_file_diff(': 'string file1, string file2, string dest [, int context [, bool minimal]] | bool', \ 'xdiff_file_merge3(': 'string file1, string file2, string file3, string dest | mixed', \ 'xdiff_file_patch_binary(': 'string file, string patch, string dest | bool', \ 'xdiff_file_patch(': 'string file, string patch, string dest [, int flags] | mixed', \ 'xdiff_string_diff_binary(': 'string str1, string str2 | string', \ 'xdiff_string_diff(': 'string str1, string str2 [, int context [, bool minimal]] | string', \ 'xdiff_string_merge3(': 'string str1, string str2, string str3 [, string &#38;error] | mixed', \ 'xdiff_string_patch_binary(': 'string str, string patch | string', \ 'xdiff_string_patch(': 'string str, string patch [, int flags [, string &#38;error]] | string', \ 'xml_error_string(': 'int code | string', \ 'xml_get_current_byte_index(': 'resource parser | int', \ 'xml_get_current_column_number(': 'resource parser | int', \ 'xml_get_current_line_number(': 'resource parser | int', \ 'xml_get_error_code(': 'resource parser | int', \ 'xml_parse(': 'resource parser, string data [, bool is_final] | int', \ 'xml_parse_into_struct(': 'resource parser, string data, array &#38;values [, array &#38;index] | int', \ 'xml_parser_create(': '[string encoding] | resource', \ 'xml_parser_create_ns(': '[string encoding [, string separator]] | resource', \ 'xml_parser_free(': 'resource parser | bool', \ 'xml_parser_get_option(': 'resource parser, int option | mixed', \ 'xml_parser_set_option(': 'resource parser, int option, mixed value | bool', \ 'xmlrpc_decode(': 'string xml [, string encoding] | array', \ 'xmlrpc_decode_request(': 'string xml, string &#38;method [, string encoding] | array', \ 'xmlrpc_encode(': 'mixed value | string', \ 'xmlrpc_encode_request(': 'string method, mixed params [, array output_options] | string', \ 'xmlrpc_get_type(': 'mixed value | string', \ 'xmlrpc_is_fault(': 'array arg | bool', \ 'xmlrpc_parse_method_descriptions(': 'string xml | array', \ 'xmlrpc_server_add_introspection_data(': 'resource server, array desc | int', \ 'xmlrpc_server_call_method(': 'resource server, string xml, mixed user_data [, array output_options] | string', \ 'xmlrpc_server_create(': 'void | resource', \ 'xmlrpc_server_destroy(': 'resource server | int', \ 'xmlrpc_server_register_introspection_callback(': 'resource server, string function | bool', \ 'xmlrpc_server_register_method(': 'resource server, string method_name, string function | bool', \ 'xmlrpc_set_type(': 'string &#38;value, string type | bool', \ 'xml_set_character_data_handler(': 'resource parser, callback handler | bool', \ 'xml_set_default_handler(': 'resource parser, callback handler | bool', \ 'xml_set_element_handler(': 'resource parser, callback start_element_handler, callback end_element_handler | bool', \ 'xml_set_end_namespace_decl_handler(': 'resource parser, callback handler | bool', \ 'xml_set_external_entity_ref_handler(': 'resource parser, callback handler | bool', \ 'xml_set_notation_decl_handler(': 'resource parser, callback handler | bool', \ 'xml_set_object(': 'resource parser, object &#38;object | bool', \ 'xml_set_processing_instruction_handler(': 'resource parser, callback handler | bool', \ 'xml_set_start_namespace_decl_handler(': 'resource parser, callback handler | bool', \ 'xml_set_unparsed_entity_decl_handler(': 'resource parser, callback handler | bool', \ 'xmlwriter_end_attribute(': 'resource xmlwriter | bool', \ 'xmlwriter_end_cdata(': 'resource xmlwriter | bool', \ 'xmlwriter_end_comment(': 'resource xmlwriter | bool', \ 'xmlwriter_end_document(': 'resource xmlwriter | bool', \ 'xmlwriter_end_dtd_attlist(': 'resource xmlwriter | bool', \ 'xmlwriter_end_dtd_element(': 'resource xmlwriter | bool', \ 'xmlwriter_end_dtd_entity(': 'resource xmlwriter | bool', \ 'xmlwriter_end_dtd(': 'resource xmlwriter | bool', \ 'xmlwriter_end_element(': 'resource xmlwriter | bool', \ 'xmlwriter_end_pi(': 'resource xmlwriter | bool', \ 'xmlwriter_flush(': 'resource xmlwriter [, bool empty] | mixed', \ 'xmlwriter_full_end_element(': 'resource xmlwriter | bool', \ 'xmlwriter_open_memory(': 'void | resource', \ 'xmlwriter_open_uri(': 'string source | resource', \ 'xmlwriter_output_memory(': 'resource xmlwriter [, bool flush] | string', \ 'xmlwriter_set_indent(': 'resource xmlwriter, bool indent | bool', \ 'xmlwriter_set_indent_string(': 'resource xmlwriter, string indentString | bool', \ 'xmlwriter_start_attribute(': 'resource xmlwriter, string name | bool', \ 'xmlwriter_start_attribute_ns(': 'resource xmlwriter, string prefix, string name, string uri | bool', \ 'xmlwriter_start_cdata(': 'resource xmlwriter | bool', \ 'xmlwriter_start_comment(': 'resource xmlwriter | bool', \ 'xmlwriter_start_document(': 'resource xmlwriter [, string version [, string encoding [, string standalone]]] | bool', \ 'xmlwriter_start_dtd_attlist(': 'resource xmlwriter, string name | bool', \ 'xmlwriter_start_dtd_element(': 'resource xmlwriter, string name | bool', \ 'xmlwriter_start_dtd_entity(': 'resource xmlwriter, string name, bool isparam | bool', \ 'xmlwriter_start_dtd(': 'resource xmlwriter, string name [, string pubid [, string sysid]] | bool', \ 'xmlwriter_start_element(': 'resource xmlwriter, string name | bool', \ 'xmlwriter_start_element_ns(': 'resource xmlwriter, string prefix, string name, string uri | bool', \ 'xmlwriter_start_pi(': 'resource xmlwriter, string target | bool', \ 'xmlwriter_text(': 'resource xmlwriter, string content | bool', \ 'xmlwriter_write_attribute(': 'resource xmlwriter, string name, string content | bool', \ 'xmlwriter_write_attribute_ns(': 'resource xmlwriter, string prefix, string name, string uri, string content | bool', \ 'xmlwriter_write_cdata(': 'resource xmlwriter, string content | bool', \ 'xmlwriter_write_comment(': 'resource xmlwriter, string content | bool', \ 'xmlwriter_write_dtd_attlist(': 'resource xmlwriter, string name, string content | bool', \ 'xmlwriter_write_dtd_element(': 'resource xmlwriter, string name, string content | bool', \ 'xmlwriter_write_dtd_entity(': 'resource xmlwriter, string name, string content | bool', \ 'xmlwriter_write_dtd(': 'resource xmlwriter, string name [, string pubid [, string sysid [, string subset]]] | bool', \ 'xmlwriter_write_element(': 'resource xmlwriter, string name, string content | bool', \ 'xmlwriter_write_element_ns(': 'resource xmlwriter, string prefix, string name, string uri, string content | bool', \ 'xmlwriter_write_pi(': 'resource xmlwriter, string target, string content | bool', \ 'xmlwriter_write_raw(': 'resource xmlwriter, string content | bool', \ 'xpath_new_context(': 'domdocument dom_document | XPathContext', \ 'xpath_register_ns_auto(': 'XPathContext xpath_context [, object context_node] | bool', \ 'xpath_register_ns(': 'XPathContext xpath_context, string prefix, string uri | bool', \ 'xptr_new_context(': 'void | XPathContext', \ 'xslt_backend_info(': 'void | string', \ 'xslt_backend_name(': 'void | string', \ 'xslt_backend_version(': 'void | string', \ 'xslt_create(': 'void | resource', \ 'xslt_errno(': 'resource xh | int', \ 'xslt_error(': 'resource xh | string', \ 'xslt_free(': 'resource xh | void', \ 'xslt_getopt(': 'resource processor | int', \ 'xslt_process(': 'resource xh, string xmlcontainer, string xslcontainer [, string resultcontainer [, array arguments [, array parameters]]] | mixed', \ 'xslt_set_base(': 'resource xh, string uri | void', \ 'xslt_set_encoding(': 'resource xh, string encoding | void', \ 'xslt_set_error_handler(': 'resource xh, mixed handler | void', \ 'xslt_set_log(': 'resource xh [, mixed log] | void', \ 'xslt_set_object(': 'resource processor, object &#38;obj | bool', \ 'xslt_setopt(': 'resource processor, int newmask | mixed', \ 'xslt_set_sax_handler(': 'resource xh, array handlers | void', \ 'xslt_set_sax_handlers(': 'resource processor, array handlers | void', \ 'xslt_set_scheme_handler(': 'resource xh, array handlers | void', \ 'xslt_set_scheme_handlers(': 'resource processor, array handlers | void', \ 'yaz_addinfo(': 'resource id | string', \ 'yaz_ccl_conf(': 'resource id, array config | void', \ 'yaz_ccl_parse(': 'resource id, string query, array &#38;result | bool', \ 'yaz_close(': 'resource id | bool', \ 'yaz_connect(': 'string zurl [, mixed options] | mixed', \ 'yaz_database(': 'resource id, string databases | bool', \ 'yaz_element(': 'resource id, string elementset | bool', \ 'yaz_errno(': 'resource id | int', \ 'yaz_error(': 'resource id | string', \ 'yaz_es_result(': 'resource id | array', \ 'yaz_get_option(': 'resource id, string name | string', \ 'yaz_hits(': 'resource id [, array searchresult] | int', \ 'yaz_itemorder(': 'resource id, array args | void', \ 'yaz_present(': 'resource id | bool', \ 'yaz_range(': 'resource id, int start, int number | void', \ 'yaz_record(': 'resource id, int pos, string type | string', \ 'yaz_scan(': 'resource id, string type, string startterm [, array flags] | void', \ 'yaz_scan_result(': 'resource id [, array &#38;result] | array', \ 'yaz_schema(': 'resource id, string schema | void', \ 'yaz_search(': 'resource id, string type, string query | bool', \ 'yaz_set_option(': 'resource id, string name, string value | void', \ 'yaz_sort(': 'resource id, string criteria | void', \ 'yaz_syntax(': 'resource id, string syntax | void', \ 'yaz_wait(': '[array &#38;options] | mixed', \ 'yp_all(': 'string domain, string map, string callback | void', \ 'yp_cat(': 'string domain, string map | array', \ 'yp_errno(': 'void | int', \ 'yp_err_string(': 'int errorcode | string', \ 'yp_first(': 'string domain, string map | array', \ 'yp_get_default_domain(': 'void | string', \ 'yp_master(': 'string domain, string map | string', \ 'yp_match(': 'string domain, string map, string key | string', \ 'yp_next(': 'string domain, string map, string key | array', \ 'yp_order(': 'string domain, string map | int', \ 'zend_logo_guid(': 'void | string', \ 'zend_version(': 'void | string', \ 'zip_close(': 'resource zip | void', \ 'zip_entry_close(': 'resource zip_entry | void', \ 'zip_entry_compressedsize(': 'resource zip_entry | int', \ 'zip_entry_compressionmethod(': 'resource zip_entry | string', \ 'zip_entry_filesize(': 'resource zip_entry | int', \ 'zip_entry_name(': 'resource zip_entry | string', \ 'zip_entry_open(': 'resource zip, resource zip_entry [, string mode] | bool', \ 'zip_entry_read(': 'resource zip_entry [, int length] | string', \ 'zip_open(': 'string filename | resource', \ 'zip_read(': 'resource zip | resource', \ 'zlib_get_coding_type(': 'void | string' \ } " }}} " built-in object functions {{{ let g:php_builtin_object_functions = { \ 'ArrayIterator::current(': 'void | mixed', \ 'ArrayIterator::key(': 'void | mixed', \ 'ArrayIterator::next(': 'void | void', \ 'ArrayIterator::rewind(': 'void | void', \ 'ArrayIterator::seek(': 'int position | void', \ 'ArrayIterator::valid(': 'void | bool', \ 'ArrayObject::append(': 'mixed newval | void', \ 'ArrayObject::__construct(': 'mixed input | ArrayObject', \ 'ArrayObject::count(': 'void | int', \ 'ArrayObject::getIterator(': 'void | ArrayIterator', \ 'ArrayObject::offsetExists(': 'mixed index | bool', \ 'ArrayObject::offsetGet(': 'mixed index | bool', \ 'ArrayObject::offsetSet(': 'mixed index, mixed newval | void', \ 'ArrayObject::offsetUnset(': 'mixed index | void', \ 'CachingIterator::hasNext(': 'void | bool', \ 'CachingIterator::next(': 'void | void', \ 'CachingIterator::rewind(': 'void | void', \ 'CachingIterator::__toString(': 'void | string', \ 'CachingIterator::valid(': 'void | bool', \ 'CachingRecursiveIterator::getChildren(': 'void | CachingRecursiveIterator', \ 'CachingRecursiveIterator::hasChildren(': 'void | bolean', \ 'DirectoryIterator::__construct(': 'string path | DirectoryIterator', \ 'DirectoryIterator::current(': 'void | DirectoryIterator', \ 'DirectoryIterator::getATime(': 'void | int', \ 'DirectoryIterator::getChildren(': 'void | RecursiveDirectoryIterator', \ 'DirectoryIterator::getCTime(': 'void | int', \ 'DirectoryIterator::getFilename(': 'void | string', \ 'DirectoryIterator::getGroup(': 'void | int', \ 'DirectoryIterator::getInode(': 'void | int', \ 'DirectoryIterator::getMTime(': 'void | int', \ 'DirectoryIterator::getOwner(': 'void | int', \ 'DirectoryIterator::getPath(': 'void | string', \ 'DirectoryIterator::getPathname(': 'void | string', \ 'DirectoryIterator::getPerms(': 'void | int', \ 'DirectoryIterator::getSize(': 'void | int', \ 'DirectoryIterator::getType(': 'void | string', \ 'DirectoryIterator::isDir(': 'void | bool', \ 'DirectoryIterator::isDot(': 'void | bool', \ 'DirectoryIterator::isExecutable(': 'void | bool', \ 'DirectoryIterator::isFile(': 'void | bool', \ 'DirectoryIterator::isLink(': 'void | bool', \ 'DirectoryIterator::isReadable(': 'void | bool', \ 'DirectoryIterator::isWritable(': 'void | bool', \ 'DirectoryIterator::key(': 'void | string', \ 'DirectoryIterator::next(': 'void | void', \ 'DirectoryIterator::rewind(': 'void | void', \ 'DirectoryIterator::valid(': 'void | string', \ 'FilterIterator::current(': 'void | mixed', \ 'FilterIterator::getInnerIterator(': 'void | Iterator', \ 'FilterIterator::key(': 'void | mixed', \ 'FilterIterator::next(': 'void | void', \ 'FilterIterator::rewind(': 'void | void', \ 'FilterIterator::valid(': 'void | bool', \ 'LimitIterator::getPosition(': 'void | int', \ 'LimitIterator::next(': 'void | void', \ 'LimitIterator::rewind(': 'void | void', \ 'LimitIterator::seek(': 'int position | void', \ 'LimitIterator::valid(': 'void | bool', \ 'Memcache::add(': 'string key, mixed var [, int flag [, int expire]] | bool', \ 'Memcache::addServer(': 'string host [, int port [, bool persistent [, int weight [, int timeout [, int retry_interval]]]]] | bool', \ 'Memcache::close(': 'void | bool', \ 'Memcache::connect(': 'string host [, int port [, int timeout]] | bool', \ 'Memcache::decrement(': 'string key [, int value] | int', \ 'Memcache::delete(': 'string key [, int timeout] | bool', \ 'Memcache::flush(': 'void | bool', \ 'Memcache::getExtendedStats(': 'void | array', \ 'Memcache::get(': 'string key | string', \ 'Memcache::getStats(': 'void | array', \ 'Memcache::getVersion(': 'void | string', \ 'Memcache::increment(': 'string key [, int value] | int', \ 'Memcache::pconnect(': 'string host [, int port [, int timeout]] | bool', \ 'Memcache::replace(': 'string key, mixed var [, int flag [, int expire]] | bool', \ 'Memcache::setCompressThreshold(': 'int threshold [, float min_savings] | bool', \ 'Memcache::set(': 'string key, mixed var [, int flag [, int expire]] | bool', \ 'ParentIterator::getChildren(': 'void | ParentIterator', \ 'ParentIterator::hasChildren(': 'void | bool', \ 'ParentIterator::next(': 'void | void', \ 'ParentIterator::rewind(': 'void | void', \ 'PDO::beginTransaction(': 'void | bool', \ 'PDO::commit(': 'void | bool', \ 'PDO::__construct(': 'string dsn [, string username [, string password [, array driver_options]]] | PDO', \ 'PDO::errorCode(': 'void | string', \ 'PDO::errorInfo(': 'void | array', \ 'PDO::exec(': 'string statement | int', \ 'PDO::getAttribute(': 'int attribute | mixed', \ 'PDO::getAvailableDrivers(': 'void | array', \ 'PDO::lastInsertId(': '[string name] | string', \ 'PDO::prepare(': 'string statement [, array driver_options] | PDOStatement', \ 'PDO::query(': 'string statement | PDOStatement', \ 'PDO::quote(': 'string string [, int parameter_type] | string', \ 'PDO::rollBack(': 'void | bool', \ 'PDO::setAttribute(': 'int attribute, mixed value | bool', \ 'PDO::sqliteCreateAggregate(': 'string function_name, callback step_func, callback finalize_func [, int num_args] | bool', \ 'PDO::sqliteCreateFunction(': 'string function_name, callback callback [, int num_args] | bool', \ 'PDOStatement::bindColumn(': 'mixed column, mixed &#38;param [, int type] | bool', \ 'PDOStatement::bindParam(': 'mixed parameter, mixed &#38;variable [, int data_type [, int length [, mixed driver_options]]] | bool', \ 'PDOStatement::bindValue(': 'mixed parameter, mixed value [, int data_type] | bool', \ 'PDOStatement::closeCursor(': 'void | bool', \ 'PDOStatement::columnCount(': 'void | int', \ 'PDOStatement::errorCode(': 'void | string', \ 'PDOStatement::errorInfo(': 'void | array', \ 'PDOStatement::execute(': '[array input_parameters] | bool', \ 'PDOStatement::fetchAll(': '[int fetch_style [, int column_index]] | array', \ 'PDOStatement::fetchColumn(': '[int column_number] | string', \ 'PDOStatement::fetch(': '[int fetch_style [, int cursor_orientation [, int cursor_offset]]] | mixed', \ 'PDOStatement::fetchObject(': '[string class_name [, array ctor_args]] | mixed', \ 'PDOStatement::getAttribute(': 'int attribute | mixed', \ 'PDOStatement::getColumnMeta(': 'int column | mixed', \ 'PDOStatement::nextRowset(': 'void | bool', \ 'PDOStatement::rowCount(': 'void | int', \ 'PDOStatement::setAttribute(': 'int attribute, mixed value | bool', \ 'PDOStatement::setFetchMode(': 'int mode | bool', \ 'Rar::extract(': 'string dir [, string filepath] | bool', \ 'Rar::getAttr(': 'void | int', \ 'Rar::getCrc(': 'void | int', \ 'Rar::getFileTime(': 'void | string', \ 'Rar::getHostOs(': 'void | int', \ 'Rar::getMethod(': 'void | int', \ 'Rar::getName(': 'void | string', \ 'Rar::getPackedSize(': 'void | int', \ 'Rar::getUnpackedSize(': 'void | int', \ 'Rar::getVersion(': 'void | int', \ 'RecursiveDirectoryIterator::getChildren(': 'void | object', \ 'RecursiveDirectoryIterator::hasChildren(': '[bool allow_links] | bool', \ 'RecursiveDirectoryIterator::key(': 'void | string', \ 'RecursiveDirectoryIterator::next(': 'void | void', \ 'RecursiveDirectoryIterator::rewind(': 'void | void', \ 'RecursiveIteratorIterator::current(': 'void | mixed', \ 'RecursiveIteratorIterator::getDepth(': 'void | int', \ 'RecursiveIteratorIterator::getSubIterator(': 'void | RecursiveIterator', \ 'RecursiveIteratorIterator::key(': 'void | mixed', \ 'RecursiveIteratorIterator::next(': 'void | void', \ 'RecursiveIteratorIterator::rewind(': 'void | void', \ 'RecursiveIteratorIterator::valid(': 'void | bolean', \ 'SDO_DAS_ChangeSummary::beginLogging(': 'void | void', \ 'SDO_DAS_ChangeSummary::endLogging(': 'void | void', \ 'SDO_DAS_ChangeSummary::getChangedDataObjects(': 'void | SDO_List', \ 'SDO_DAS_ChangeSummary::getChangeType(': 'SDO_DataObject dataObject | int', \ 'SDO_DAS_ChangeSummary::getOldContainer(': 'SDO_DataObject data_object | SDO_DataObject', \ 'SDO_DAS_ChangeSummary::getOldValues(': 'SDO_DataObject data_object | SDO_List', \ 'SDO_DAS_ChangeSummary::isLogging(': 'void | bool', \ 'SDO_DAS_DataFactory::addPropertyToType(': 'string parent_type_namespace_uri, string parent_type_name, string property_name, string type_namespace_uri, string type_name [, array options] | void', \ 'SDO_DAS_DataFactory::addType(': 'string type_namespace_uri, string type_name [, array options] | void', \ 'SDO_DAS_DataFactory::getDataFactory(': 'void | SDO_DAS_DataFactory', \ 'SDO_DAS_DataObject::getChangeSummary(': 'void | SDO_DAS_ChangeSummary', \ 'SDO_DAS_Relational::applyChanges(': 'PDO database_handle, SDODataObject root_data_object | void', \ 'SDO_DAS_Relational::__construct(': 'array database_metadata [, string application_root_type [, array SDO_containment_references_metadata]] | SDO_DAS_Relational', \ 'SDO_DAS_Relational::createRootDataObject(': 'void | SDODataObject', \ 'SDO_DAS_Relational::executePreparedQuery(': 'PDO database_handle, PDOStatement prepared_statement, array value_list [, array column_specifier] | SDODataObject', \ 'SDO_DAS_Relational::executeQuery(': 'PDO database_handle, string SQL_statement [, array column_specifier] | SDODataObject', \ 'SDO_DAS_Setting::getListIndex(': 'void | int', \ 'SDO_DAS_Setting::getPropertyIndex(': 'void | int', \ 'SDO_DAS_Setting::getPropertyName(': 'void | string', \ 'SDO_DAS_Setting::getValue(': 'void | mixed', \ 'SDO_DAS_Setting::isSet(': 'void | bool', \ 'SDO_DAS_XML::addTypes(': 'string xsd_file | void', \ 'SDO_DAS_XML::createDataObject(': 'string namespace_uri, string type_name | SDO_DataObject', \ 'SDO_DAS_XML::createDocument(': '[string document_element_name] | SDO_DAS_XML_Document', \ 'SDO_DAS_XML::create(': '[string xsd_file] | SDO_DAS_XML', \ 'SDO_DAS_XML_Document::getRootDataObject(': 'void | SDO_DataObject', \ 'SDO_DAS_XML_Document::getRootElementName(': 'void | string', \ 'SDO_DAS_XML_Document::getRootElementURI(': 'void | string', \ 'SDO_DAS_XML_Document::setEncoding(': 'string encoding | void', \ 'SDO_DAS_XML_Document::setXMLDeclaration(': 'bool xmlDeclatation | void', \ 'SDO_DAS_XML_Document::setXMLVersion(': 'string xmlVersion | void', \ 'SDO_DAS_XML::loadFile(': 'string xml_file | SDO_XMLDocument', \ 'SDO_DAS_XML::loadString(': 'string xml_string | SDO_DAS_XML_Document', \ 'SDO_DAS_XML::saveFile(': 'SDO_XMLDocument xdoc, string xml_file [, int indent] | void', \ 'SDO_DAS_XML::saveString(': 'SDO_XMLDocument xdoc [, int indent] | string', \ 'SDO_DataFactory::create(': 'string type_namespace_uri, string type_name | void', \ 'SDO_DataObject::clear(': 'void | void', \ 'SDO_DataObject::createDataObject(': 'mixed identifier | SDO_DataObject', \ 'SDO_DataObject::getContainer(': 'void | SDO_DataObject', \ 'SDO_DataObject::getSequence(': 'void | SDO_Sequence', \ 'SDO_DataObject::getTypeName(': 'void | string', \ 'SDO_DataObject::getTypeNamespaceURI(': 'void | string', \ 'SDO_Exception::getCause(': 'void | mixed', \ 'SDO_List::insert(': 'mixed value [, int index] | void', \ 'SDO_Model_Property::getContainingType(': 'void | SDO_Model_Type', \ 'SDO_Model_Property::getDefault(': 'void | mixed', \ 'SDO_Model_Property::getName(': 'void | string', \ 'SDO_Model_Property::getType(': 'void | SDO_Model_Type', \ 'SDO_Model_Property::isContainment(': 'void | bool', \ 'SDO_Model_Property::isMany(': 'void | bool', \ 'SDO_Model_ReflectionDataObject::__construct(': 'SDO_DataObject data_object | SDO_Model_ReflectionDataObject', \ 'SDO_Model_ReflectionDataObject::export(': 'SDO_Model_ReflectionDataObject rdo [, bool return] | mixed', \ 'SDO_Model_ReflectionDataObject::getContainmentProperty(': 'void | SDO_Model_Property', \ 'SDO_Model_ReflectionDataObject::getInstanceProperties(': 'void | array', \ 'SDO_Model_ReflectionDataObject::getType(': 'void | SDO_Model_Type', \ 'SDO_Model_Type::getBaseType(': 'void | SDO_Model_Type', \ 'SDO_Model_Type::getName(': 'void | string', \ 'SDO_Model_Type::getNamespaceURI(': 'void | string', \ 'SDO_Model_Type::getProperties(': 'void | array', \ 'SDO_Model_Type::getProperty(': 'mixed identifier | SDO_Model_Property', \ 'SDO_Model_Type::isAbstractType(': 'void | bool', \ 'SDO_Model_Type::isDataType(': 'void | bool', \ 'SDO_Model_Type::isInstance(': 'SDO_DataObject data_object | bool', \ 'SDO_Model_Type::isOpenType(': 'void | bool', \ 'SDO_Model_Type::isSequencedType(': 'void | bool', \ 'SDO_Sequence::getProperty(': 'int sequence_index | SDO_Model_Property', \ 'SDO_Sequence::insert(': 'mixed value [, int sequenceIndex [, mixed propertyIdentifier]] | void', \ 'SDO_Sequence::move(': 'int toIndex, int fromIndex | void', \ 'SimpleXMLIterator::current(': 'void | mixed', \ 'SimpleXMLIterator::getChildren(': 'void | object', \ 'SimpleXMLIterator::hasChildren(': 'void | bool', \ 'SimpleXMLIterator::key(': 'void | mixed', \ 'SimpleXMLIterator::next(': 'void | void', \ 'SimpleXMLIterator::rewind(': 'void | void', \ 'SimpleXMLIterator::valid(': 'void | bool', \ 'SWFButton::addASound(': 'SWFSound sound, int flags | SWFSoundInstance', \ 'SWFButton::setMenu(': 'int flag | void', \ 'SWFDisplayItem::addAction(': 'SWFAction action, int flags | void', \ 'SWFDisplayItem::endMask(': 'void | void', \ 'SWFDisplayItem::getRot(': 'void | float', \ 'SWFDisplayItem::getX(': 'void | float', \ 'SWFDisplayItem::getXScale(': 'void | float', \ 'SWFDisplayItem::getXSkew(': 'void | float', \ 'SWFDisplayItem::getY(': 'void | float', \ 'SWFDisplayItem::getYScale(': 'void | float', \ 'SWFDisplayItem::getYSkew(': 'void | float', \ 'SWFDisplayItem::setMaskLevel(': 'int level | void', \ 'SWFDisplayItem::setMatrix(': 'float a, float b, float c, float d, float x, float y | void', \ 'SWFFontChar::addChars(': 'string char | void', \ 'SWFFontChar::addUTF8Chars(': 'string char | void', \ 'SWFFont::getAscent(': 'void | float', \ 'SWFFont::getDescent(': 'void | float', \ 'SWFFont::getLeading(': 'void | float', \ 'SWFFont::getShape(': 'int code | string', \ 'SWFFont::getUTF8Width(': 'string string | float', \ 'SWFMovie::addExport(': 'SWFCharacter char, string name | void', \ 'SWFMovie::addFont(': 'SWFFont font | SWFFontChar', \ 'SWFMovie::importChar(': 'string libswf, string name | SWFSprite', \ 'SWFMovie::importFont(': 'string libswf, string name | SWFFontChar', \ 'SWFMovie::labelFrame(': 'string label | void', \ 'SWFMovie::saveToFile(': 'stream x [, int compression] | int', \ 'SWFMovie::startSound(': 'SWFSound sound | SWFSoundInstance', \ 'SWFMovie::stopSound(': 'SWFSound sound | void', \ 'SWFMovie::writeExports(': 'void | void', \ 'SWFShape::drawArc(': 'float r, float startAngle, float endAngle | void', \ 'SWFShape::drawCircle(': 'float r | void', \ 'SWFShape::drawCubic(': 'float bx, float by, float cx, float cy, float dx, float dy | int', \ 'SWFShape::drawCubicTo(': 'float bx, float by, float cx, float cy, float dx, float dy | int', \ 'SWFShape::drawGlyph(': 'SWFFont font, string character [, int size] | void', \ 'SWFSoundInstance::loopCount(': 'int point | void', \ 'SWFSoundInstance::loopInPoint(': 'int point | void', \ 'SWFSoundInstance::loopOutPoint(': 'int point | void', \ 'SWFSoundInstance::noMultiple(': 'void | void', \ 'SWFSprite::labelFrame(': 'string label | void', \ 'SWFSprite::startSound(': 'SWFSound sound | SWFSoundInstance', \ 'SWFSprite::stopSound(': 'SWFSound sound | void', \ 'SWFText::addUTF8String(': 'string text | void', \ 'SWFTextField::addChars(': 'string chars | void', \ 'SWFTextField::setPadding(': 'float padding | void', \ 'SWFText::getAscent(': 'void | float', \ 'SWFText::getDescent(': 'void | float', \ 'SWFText::getLeading(': 'void | float', \ 'SWFText::getUTF8Width(': 'string string | float', \ 'SWFVideoStream::getNumFrames(': 'void | int', \ 'SWFVideoStream::setDimension(': 'int x, int y | void', \ 'tidy::__construct(': '[string filename [, mixed config [, string encoding [, bool use_include_path]]]] | tidy' \ } " }}} " Add control structures (they are outside regular pattern of PHP functions) let php_control = { \ 'include(': 'string filename | resource', \ 'include_once(': 'string filename | resource', \ 'require(': 'string filename | resource', \ 'require_once(': 'string filename | resource', \ } call extend(g:php_builtin_functions, php_control) endfunction " }}} " vim:set foldmethod=marker:
zyz2011-vim
runtime/autoload/phpcomplete.vim
Vim Script
gpl2
293,810
" tar.vim: Handles browsing tarfiles " AUTOLOAD PORTION " Date: Jan 17, 2012 " Version: 28 " Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM> " License: Vim License (see vim's :help license) " " Contains many ideas from Michael Toren's <tar.vim> " " Copyright: Copyright (C) 2005-2011 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, " tar.vim and tarPlugin.vim are provided *as is* and comes " with no warranty of any kind, either expressed or implied. " By using this plugin, you agree that in no event will the " copyright holder be liable for any damages resulting from " the use of this software. " call inputsave()|call input("Press <cr> to continue")|call inputrestore() " --------------------------------------------------------------------- " Load Once: {{{1 if &cp || exists("g:loaded_tar") finish endif let g:loaded_tar= "v28" if v:version < 702 echohl WarningMsg echo "***warning*** this version of tar needs vim 7.2" echohl Normal finish endif let s:keepcpo= &cpo set cpo&vim "call Decho("loading autoload/tar.vim") " --------------------------------------------------------------------- " Default Settings: {{{1 if !exists("g:tar_browseoptions") let g:tar_browseoptions= "Ptf" endif if !exists("g:tar_readoptions") let g:tar_readoptions= "OPxf" endif if !exists("g:tar_cmd") let g:tar_cmd= "tar" endif if !exists("g:tar_writeoptions") let g:tar_writeoptions= "uf" endif if !exists("g:netrw_cygwin") if has("win32") || has("win95") || has("win64") || has("win16") if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$' let g:netrw_cygwin= 1 else let g:netrw_cygwin= 0 endif else let g:netrw_cygwin= 0 endif endif if !exists("g:tar_copycmd") if !exists("g:netrw_localcopycmd") if has("win32") || has("win95") || has("win64") || has("win16") if g:netrw_cygwin let g:netrw_localcopycmd= "cp" else let g:netrw_localcopycmd= "copy" endif elseif has("unix") || has("macunix") let g:netrw_localcopycmd= "cp" else let g:netrw_localcopycmd= "" endif endif let g:tar_copycmd= g:netrw_localcopycmd endif if !exists("g:tar_extractcmd") let g:tar_extractcmd= "tar -xf" endif " set up shell quoting character if !exists("g:tar_shq") if exists("&shq") && &shq != "" let g:tar_shq= &shq elseif has("win32") || has("win95") || has("win64") || has("win16") if exists("g:netrw_cygwin") && g:netrw_cygwin let g:tar_shq= "'" else let g:tar_shq= '"' endif else let g:tar_shq= "'" endif " call Decho("g:tar_shq<".g:tar_shq.">") endif " ---------------- " Functions: {{{1 " ---------------- " --------------------------------------------------------------------- " tar#Browse: {{{2 fun! tar#Browse(tarfile) " call Dfunc("tar#Browse(tarfile<".a:tarfile.">)") let repkeep= &report set report=10 " sanity checks if !executable(g:tar_cmd) redraw! echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system' let &report= repkeep " call Dret("tar#Browse") return endif if !filereadable(a:tarfile) " call Decho('a:tarfile<'.a:tarfile.'> not filereadable') if a:tarfile !~# '^\a\+://' " if its an url, don't complain, let url-handlers such as vim do its thing redraw! echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None endif let &report= repkeep " call Dret("tar#Browse : file<".a:tarfile."> not readable") return endif if &ma != 1 set ma endif let b:tarfile= a:tarfile setlocal noswapfile setlocal buftype=nofile setlocal bufhidden=hide setlocal nobuflisted setlocal nowrap set ft=tar " give header " call Decho("printing header") let lastline= line("$") call setline(lastline+1,'" tar.vim version '.g:loaded_tar) call setline(lastline+2,'" Browsing tarfile '.a:tarfile) call setline(lastline+3,'" Select a file with cursor and press ENTER') keepj $put ='' keepj sil! 0d keepj $ let tarfile= a:tarfile if has("win32") && executable("cygpath") " assuming cygwin let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e') endif let curlast= line("$") if tarfile =~# '\.\(gz\|tgz\)$' " call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.lrp' " call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ") exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.\(bz2\|tbz\|tb2\)$' " call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.\(lzma\|tlz\)$' " call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.\(xz\|txz\)$' " call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " else if tarfile =~ '^\s*-' " A file name starting with a dash is taken as an option. Prepend ./ to avoid that. let tarfile = substitute(tarfile, '-', './-', '') endif " call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,0)) exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1) endif if v:shell_error != 0 redraw! echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">" " call Dret("tar#Browse : a:tarfile<".a:tarfile.">") return endif if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~ '\c\%(warning\|error\|inappropriate\|unrecognized\)') redraw! echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None keepj sil! %d let eikeep= &ei set ei=BufReadCmd,FileReadCmd exe "r ".fnameescape(a:tarfile) let &ei= eikeep keepj sil! 1d " call Dret("tar#Browse : a:tarfile<".a:tarfile.">") return endif setlocal noma nomod ro noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr> let &report= repkeep " call Dret("tar#Browse : b:tarfile<".b:tarfile.">") endfun " --------------------------------------------------------------------- " TarBrowseSelect: {{{2 fun! s:TarBrowseSelect() " call Dfunc("TarBrowseSelect() b:tarfile<".b:tarfile."> curfile<".expand("%").">") let repkeep= &report set report=10 let fname= getline(".") " call Decho("fname<".fname.">") if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-' redraw! echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"' " call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"') return endif " sanity check if fname =~ '^"' let &report= repkeep " call Dret("TarBrowseSelect") return endif " about to make a new window, need to use b:tarfile let tarfile= b:tarfile let curfile= expand("%") if has("win32") && executable("cygpath") " assuming cygwin let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e') endif new if !exists("g:tar_nomax") || g:tar_nomax == 0 wincmd _ endif let s:tblfile_{winnr()}= curfile call tar#Read("tarfile:".tarfile.'::'.fname,1) filetype detect let &report= repkeep " call Dret("TarBrowseSelect : s:tblfile_".winnr()."<".s:tblfile_{winnr()}.">") endfun " --------------------------------------------------------------------- " tar#Read: {{{2 fun! tar#Read(fname,mode) " call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")") let repkeep= &report set report=10 let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','') let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','') if has("win32") && executable("cygpath") " assuming cygwin let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e') endif " call Decho("tarfile<".tarfile.">") " call Decho("fname<".fname.">") if fname =~ '\.bz2$' && executable("bzcat") let decmp= "|bzcat" let doro = 1 elseif fname =~ '\.gz$' && executable("zcat") let decmp= "|zcat" let doro = 1 elseif fname =~ '\.lzma$' && executable("lzcat") let decmp= "|lzcat" let doro = 1 elseif fname =~ '\.xz$' && executable("xzcat") let decmp= "|xzcat" let doro = 1 else let decmp="" let doro = 0 if fname =~ '\.bz2$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$' setlocal bin endif endif if exists("g:tar_secure") let tar_secure= " -- " else let tar_secure= " " endif if tarfile =~# '\.bz2$' " call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp elseif tarfile =~# '\.\(gz\|tgz\)$' " call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1)) exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp elseif tarfile =~# '\.lrp$' " call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp elseif tarfile =~# '\.lzma$' " call Decho("7: exe silent r! lzma -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp elseif tarfile =~# '\.\(xz\|txz\)$' " call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp else if tarfile =~ '^\s*-' " A file name starting with a dash is taken as an option. Prepend ./ to avoid that. let tarfile = substitute(tarfile, '-', './-', '') endif " call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions.tar_secure.shellescape(tarfile,1)." ".shellescape(fname,1).decmp) exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".tar_secure.shellescape(fname,1).decmp endif if doro " because the reverse process of compressing changed files back into the tarball is not currently supported setlocal ro endif let b:tarfile= a:fname exe "file tarfile::".fnameescape(fname) " cleanup keepj sil! 0d set nomod let &report= repkeep " call Dret("tar#Read : b:tarfile<".b:tarfile.">") endfun " --------------------------------------------------------------------- " tar#Write: {{{2 fun! tar#Write(fname) " call Dfunc("tar#Write(fname<".a:fname.">) b:tarfile<".b:tarfile."> tblfile_".winnr()."<".s:tblfile_{winnr()}.">") let repkeep= &report set report=10 if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-' redraw! echohl WarningMsg | echo '***warning*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"' " call Dret('tar#Write : rejecting tarfile member<'.fname.'> because of embedded "-"') return endif " sanity checks if !executable(g:tar_cmd) redraw! echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system' let &report= repkeep " call Dret("tar#Write") return endif if !exists("*mkdir") redraw! echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None let &report= repkeep " call Dret("tar#Write") return endif let curdir= getcwd() let tmpdir= tempname() " call Decho("orig tempname<".tmpdir.">") if tmpdir =~ '\.' let tmpdir= substitute(tmpdir,'\.[^.]*$','','e') endif " call Decho("tmpdir<".tmpdir.">") call mkdir(tmpdir,"p") " attempt to change to the indicated directory try exe "cd ".fnameescape(tmpdir) catch /^Vim\%((\a\+)\)\=:E344/ redraw! echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None let &report= repkeep " call Dret("tar#Write") return endtry " call Decho("current directory now: ".getcwd()) " place temporary files under .../_ZIPVIM_/ if isdirectory("_ZIPVIM_") call s:Rmdir("_ZIPVIM_") endif call mkdir("_ZIPVIM_") cd _ZIPVIM_ " call Decho("current directory now: ".getcwd()) let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','') let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','') " handle compressed archives if tarfile =~# '\.bz2' call system("bzip2 -d -- ".shellescape(tarfile,0)) let tarfile = substitute(tarfile,'\.bz2','','e') let compress= "bzip2 -- ".shellescape(tarfile,0) " call Decho("compress<".compress.">") elseif tarfile =~# '\.gz' call system("gzip -d -- ".shellescape(tarfile,0)) let tarfile = substitute(tarfile,'\.gz','','e') let compress= "gzip -- ".shellescape(tarfile,0) " call Decho("compress<".compress.">") elseif tarfile =~# '\.tgz' call system("gzip -d -- ".shellescape(tarfile,0)) let tarfile = substitute(tarfile,'\.tgz','.tar','e') let compress= "gzip -- ".shellescape(tarfile,0) let tgz = 1 " call Decho("compress<".compress.">") elseif tarfile =~# '\.xz' call system("xz -d -- ".shellescape(tarfile,0)) let tarfile = substitute(tarfile,'\.xz','','e') let compress= "xz -- ".shellescape(tarfile,0) " call Decho("compress<".compress.">") elseif tarfile =~# '\.lzma' call system("lzma -d -- ".shellescape(tarfile,0)) let tarfile = substitute(tarfile,'\.lzma','','e') let compress= "lzma -- ".shellescape(tarfile,0) " call Decho("compress<".compress.">") endif " call Decho("tarfile<".tarfile.">") if v:shell_error != 0 redraw! echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None else " call Decho("tarfile<".tarfile."> fname<".fname.">") if fname =~ '/' let dirpath = substitute(fname,'/[^/]\+$','','e') if executable("cygpath") let dirpath = substitute(system("cygpath ".shellescape(dirpath, 0)),'\n','','e') endif call mkdir(dirpath,"p") endif if tarfile !~ '/' let tarfile= curdir.'/'.tarfile endif if tarfile =~ '^\s*-' " A file name starting with a dash may be taken as an option. Prepend ./ to avoid that. let tarfile = substitute(tarfile, '-', './-', '') endif " call Decho("tarfile<".tarfile."> fname<".fname.">") if exists("g:tar_secure") let tar_secure= " -- " else let tar_secure= " " endif exe "w! ".fnameescape(fname) if executable("cygpath") let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e') endif " delete old file from tarfile " call Decho("system(".g:tar_cmd." --delete -f ".shellescape(tarfile,0)." -- ".shellescape(fname,0).")") call system(g:tar_cmd." --delete -f ".shellescape(tarfile,0).tar_secure.shellescape(fname,0)) if v:shell_error != 0 redraw! echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None else " update tarfile with new file " call Decho(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0)) call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0)) if v:shell_error != 0 redraw! echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None elseif exists("compress") " call Decho("call system(".compress.")") call system(compress) if exists("tgz") " call Decho("rename(".tarfile.".gz,".substitute(tarfile,'\.tar$','.tgz','e').")") call rename(tarfile.".gz",substitute(tarfile,'\.tar$','.tgz','e')) endif endif endif " support writing tarfiles across a network if s:tblfile_{winnr()} =~ '^\a\+://' " call Decho("handle writing <".tarfile."> across network to <".s:tblfile_{winnr()}.">") let tblfile= s:tblfile_{winnr()} 1split|enew let binkeep= &l:binary let eikeep = &ei set binary ei=all exe "e! ".fnameescape(tarfile) call netrw#NetWrite(tblfile) let &ei = eikeep let &l:binary = binkeep q! unlet s:tblfile_{winnr()} endif endif " cleanup and restore current directory cd .. call s:Rmdir("_ZIPVIM_") exe "cd ".fnameescape(curdir) setlocal nomod let &report= repkeep " call Dret("tar#Write") endfun " --------------------------------------------------------------------- " s:Rmdir: {{{2 fun! s:Rmdir(fname) " call Dfunc("Rmdir(fname<".a:fname.">)") if has("unix") call system("/bin/rm -rf -- ".shellescape(a:fname,0)) elseif has("win32") || has("win95") || has("win64") || has("win16") if &shell =~? "sh$" call system("/bin/rm -rf -- ".shellescape(a:fname,0)) else call system("del /S ".shellescape(a:fname,0)) endif endif " call Dret("Rmdir") endfun " --------------------------------------------------------------------- " tar#Vimuntar: installs a tarball in the user's .vim / vimfiles directory {{{2 fun! tar#Vimuntar(...) " call Dfunc("tar#Vimuntar() a:0=".a:0." a:1<".(exists("a:1")? a:1 : "-n/a-").">") let tarball = expand("%") " call Decho("tarball<".tarball.">") let tarbase = substitute(tarball,'\..*$','','') " call Decho("tarbase<".tarbase.">") let tarhome = expand("%:p") if has("win32") || has("win95") || has("win64") || has("win16") let tarhome= substitute(tarhome,'\\','/','g') endif let tarhome= substitute(tarhome,'/[^/]*$','','') " call Decho("tarhome<".tarhome.">") let tartail = expand("%:t") " call Decho("tartail<".tartail.">") let curdir = getcwd() " call Decho("curdir <".curdir.">") " set up vimhome if a:0 > 0 && a:1 != "" let vimhome= a:1 else let vimhome= vimball#VimballHome() endif " call Decho("vimhome<".vimhome.">") " call Decho("curdir<".curdir."> vimhome<".vimhome.">") if simplify(curdir) != simplify(vimhome) " copy (possibly compressed) tarball to .vim/vimfiles " call Decho(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome)) call system(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome)) " call Decho("exe cd ".fnameescape(vimhome)) exe "cd ".fnameescape(vimhome) endif " call Decho("getcwd<".getcwd().">") " if necessary, decompress the tarball; then, extract it if tartail =~ '\.tgz' if executable("gunzip") silent exe "!gunzip ".shellescape(tartail) elseif executable("gzip") silent exe "!gzip -d ".shellescape(tartail) else echoerr "unable to decompress<".tartail."> on this sytem" if simplify(curdir) != simplify(tarhome) " remove decompressed tarball, restore directory " call Decho("delete(".tartail.".tar)") call delete(tartail.".tar") " call Decho("exe cd ".fnameescape(curdir)) exe "cd ".fnameescape(curdir) endif " call Dret("tar#Vimuntar") return endif else call vimball#Decompress(tartail,0) endif let extractcmd= netrw#WinPath(g:tar_extractcmd) " call Decho("system(".extractcmd." ".shellescape(tarbase.".tar").")") call system(extractcmd." ".shellescape(tarbase.".tar")) " set up help if filereadable("doc/".tarbase.".txt") " call Decho("exe helptags ".getcwd()."/doc") exe "helptags ".getcwd()."/doc" endif if simplify(tarhome) != simplify(vimhome) " remove decompressed tarball, restore directory call delete(vimhome."/".tarbase.".tar") exe "cd ".fnameescape(curdir) endif " call Dret("tar#Vimuntar") endfun " ===================================================================== " Modelines And Restoration: {{{1 let &cpo= s:keepcpo unlet s:keepcpo " vim:ts=8 fdm=marker
zyz2011-vim
runtime/autoload/tar.vim
Vim Script
gpl2
21,195
" netrwFileHandlers: contains various extension-based file handlers for " netrw's browsers' x command ("eXecute launcher") " Author: Charles E. Campbell, Jr. " Date: Mar 14, 2012 " Version: 11a " Copyright: Copyright (C) 1999-2012 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, " netrwFileHandlers.vim is provided *as is* and comes with no " warranty of any kind, either expressed or implied. In no " event will the copyright holder be liable for any damages " resulting from the use of this software. " " Rom 6:23 (WEB) For the wages of sin is death, but the free gift of God {{{1 " is eternal life in Christ Jesus our Lord. " --------------------------------------------------------------------- " Load Once: {{{1 if exists("g:loaded_netrwFileHandlers") || &cp finish endif let g:loaded_netrwFileHandlers= "v11a" 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 " --------------------------------------------------------------------- " netrwFileHandlers#Invoke: {{{1 fun! netrwFileHandlers#Invoke(exten,fname) " call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)") let fname= a:fname " list of supported special characters. Consider rcs,v --- that can be " supported with a NFH_rcsCOMMAv() handler if a:fname =~ '[@:,$!=\-+%?;~]' let specials= { \ '@' : 'AT', \ ':' : 'COLON', \ ',' : 'COMMA', \ '$' : 'DOLLAR', \ '!' : 'EXCLAMATION', \ '=' : 'EQUAL', \ '-' : 'MINUS', \ '+' : 'PLUS', \ '%' : 'PERCENT', \ '?' : 'QUESTION', \ ';' : 'SEMICOLON', \ '~' : 'TILDE'} let fname= substitute(a:fname,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge') " call Decho('fname<'.fname.'> done with dictionary') endif if a:exten != "" && exists("*NFH_".a:exten) " support user NFH_*() functions " call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")') exe "let ret= NFH_".a:exten.'("'.fname.'")' elseif a:exten != "" && exists("*s:NFH_".a:exten) " use builtin-NFH_*() functions " call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")') exe "let ret= s:NFH_".a:exten.'("'.fname.'")' endif " call Dret("netrwFileHandlers#Invoke 0 : ret=".ret) return 0 endfun " --------------------------------------------------------------------- " s:NFH_html: handles html when the user hits "x" when the {{{1 " cursor is atop a *.html file fun! s:NFH_html(pagefile) " call Dfunc("s:NFH_html(".a:pagefile.")") let page= substitute(a:pagefile,'^','file://','') if executable("mozilla") " call Decho("executing !mozilla ".page) exe "!mozilla ".shellescape(page,1) elseif executable("netscape") " call Decho("executing !netscape ".page) exe "!netscape ".shellescape(page,1) else " call Dret("s:NFH_html 0") return 0 endif " call Dret("s:NFH_html 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_htm: handles html when the user hits "x" when the {{{1 " cursor is atop a *.htm file fun! s:NFH_htm(pagefile) " call Dfunc("s:NFH_htm(".a:pagefile.")") let page= substitute(a:pagefile,'^','file://','') if executable("mozilla") " call Decho("executing !mozilla ".page) exe "!mozilla ".shellescape(page,1) elseif executable("netscape") " call Decho("executing !netscape ".page) exe "!netscape ".shellescape(page,1) else " call Dret("s:NFH_htm 0") return 0 endif " call Dret("s:NFH_htm 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_jpg: {{{1 fun! s:NFH_jpg(jpgfile) " call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)") if executable("gimp") 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 ".shellescape(a:jpgfile,1) else " call Dret("s:NFH_jpg 0") return 0 endif " call Dret("s:NFH_jpg 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_gif: {{{1 fun! s:NFH_gif(giffile) " call Dfunc("s:NFH_gif(giffile<".a:giffile.">)") if executable("gimp") exe "silent! !gimp -s ".shellescape(a:giffile,1) elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE") exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:giffile,1) else " call Dret("s:NFH_gif 0") return 0 endif " call Dret("s:NFH_gif 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_png: {{{1 fun! s:NFH_png(pngfile) " call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)") if executable("gimp") exe "silent! !gimp -s ".shellescape(a:pngfile,1) elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE") exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pngfile,1) else " call Dret("s:NFH_png 0") return 0 endif " call Dret("s:NFH_png 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_pnm: {{{1 fun! s:NFH_pnm(pnmfile) " call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)") if executable("gimp") exe "silent! !gimp -s ".shellescape(a:pnmfile,1) elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE") exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pnmfile,1) else " call Dret("s:NFH_pnm 0") return 0 endif " call Dret("s:NFH_pnm 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_bmp: visualize bmp files {{{1 fun! s:NFH_bmp(bmpfile) " call Dfunc("s:NFH_bmp(bmpfile<".a:bmpfile.">)") if executable("gimp") exe "silent! !gimp -s ".a:bmpfile elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE") exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:bmpfile,1) else " call Dret("s:NFH_bmp 0") return 0 endif " call Dret("s:NFH_bmp 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_pdf: visualize pdf files {{{1 fun! s:NFH_pdf(pdf) " call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)") if executable("gs") exe 'silent! !gs '.shellescape(a:pdf,1) elseif executable("pdftotext") exe 'silent! pdftotext -nopgbrk '.shellescape(a:pdf,1) else " call Dret("s:NFH_pdf 0") return 0 endif " call Dret("s:NFH_pdf 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_doc: visualize doc files {{{1 fun! s:NFH_doc(doc) " call Dfunc("s:NFH_doc(doc<".a:doc.">)") if executable("oowriter") exe 'silent! !oowriter '.shellescape(a:doc,1) redraw! else " call Dret("s:NFH_doc 0") return 0 endif " call Dret("s:NFH_doc 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_sxw: visualize sxw files {{{1 fun! s:NFH_sxw(sxw) " call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)") if executable("oowriter") exe 'silent! !oowriter '.shellescape(a:sxw,1) redraw! else " call Dret("s:NFH_sxw 0") return 0 endif " call Dret("s:NFH_sxw 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_xls: visualize xls files {{{1 fun! s:NFH_xls(xls) " call Dfunc("s:NFH_xls(xls<".a:xls.">)") if executable("oocalc") exe 'silent! !oocalc '.shellescape(a:xls,1) redraw! else " call Dret("s:NFH_xls 0") return 0 endif " call Dret("s:NFH_xls 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_ps: handles PostScript files {{{1 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 ".shellescape(a:ps,1) redraw! elseif executable("ghostscript") " call Decho("exe silent! !ghostscript ".a:ps) exe "silent! !ghostscript ".shellescape(a:ps,1) redraw! elseif executable("gswin32") " call Decho("exe silent! !gswin32 ".shellescape(a:ps,1)) exe "silent! !gswin32 ".shellescape(a:ps,1) redraw! else " call Dret("s:NFH_ps 0") return 0 endif " call Dret("s:NFH_ps 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_eps: handles encapsulated PostScript files {{{1 fun! s:NFH_eps(eps) " call Dfunc("s:NFH_eps()") if executable("gs") exe "silent! !gs ".shellescape(a:eps,1) redraw! elseif executable("ghostscript") exe "silent! !ghostscript ".shellescape(a:eps,1) redraw! elseif executable("ghostscript") exe "silent! !ghostscript ".shellescape(a:eps,1) redraw! elseif executable("gswin32") exe "silent! !gswin32 ".shellescape(a:eps,1) redraw! else " call Dret("s:NFH_eps 0") return 0 endif " call Dret("s:NFH_eps 0") return 1 endfun " --------------------------------------------------------------------- " s:NFH_fig: handles xfig files {{{1 fun! s:NFH_fig(fig) " call Dfunc("s:NFH_fig()") if executable("xfig") exe "silent! !xfig ".a:fig redraw! else " call Dret("s:NFH_fig 0") return 0 endif " call Dret("s:NFH_fig 1") return 1 endfun " --------------------------------------------------------------------- " s:NFH_obj: handles tgif's obj files {{{1 fun! s:NFH_obj(obj) " call Dfunc("s:NFH_obj()") if has("unix") && executable("tgif") exe "silent! !tgif ".a:obj redraw! else " call Dret("s:NFH_obj 0") return 0 endif " call Dret("s:NFH_obj 1") return 1 endfun let &cpo= s:keepcpo unlet s:keepcpo " --------------------------------------------------------------------- " Modelines: {{{1 " vim: fdm=marker
zyz2011-vim
runtime/autoload/netrwFileHandlers.vim
Vim Script
gpl2
10,146
"------------------------------------------------------------------------------ " Description: Vim Ada omnicompletion file " Language: Ada (2005) " $Id: adacomplete.vim 887 2008-07-08 14:29:01Z krischik $ " Maintainer: Martin Krischik " $Author: krischik $ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ " Version: 4.6 " $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. " 16.07.2006 MK Ada-Mode as vim-ball " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested agaist using setlocal omnifunc " 05.11.2006 MK Bram suggested to save on spaces " Help Page: ft-ada-omni "------------------------------------------------------------------------------ if version < 700 finish endif " Section: adacomplete#Complete () {{{1 " " This function is used for the 'omnifunc' option. " function! adacomplete#Complete (findstart, base) if a:findstart == 1 return ada#User_Complete (a:findstart, a:base) else " " look up matches " if exists ("g:ada_omni_with_keywords") call ada#User_Complete (a:findstart, a:base) endif " " search tag file for matches " let l:Pattern = '^' . a:base . '.*$' let l:Tag_List = taglist (l:Pattern) " " add symbols " for Tag_Item in l:Tag_List if l:Tag_Item['kind'] == '' " " Tag created by gnat xref " let l:Match_Item = { \ 'word': l:Tag_Item['name'], \ 'menu': l:Tag_Item['filename'], \ 'info': "Symbol from file " . l:Tag_Item['filename'] . " line " . l:Tag_Item['cmd'], \ 'kind': 's', \ 'icase': 1} else " " Tag created by ctags " let l:Info = 'Symbol : ' . l:Tag_Item['name'] . "\n" let l:Info .= 'Of type : ' . g:ada#Ctags_Kinds[l:Tag_Item['kind']][1] . "\n" let l:Info .= 'Defined in File : ' . l:Tag_Item['filename'] . "\n" if has_key( l:Tag_Item, 'package') let l:Info .= 'Package : ' . l:Tag_Item['package'] . "\n" let l:Menu = l:Tag_Item['package'] elseif has_key( l:Tag_Item, 'separate') let l:Info .= 'Separate from Package : ' . l:Tag_Item['separate'] . "\n" let l:Menu = l:Tag_Item['separate'] elseif has_key( l:Tag_Item, 'packspec') let l:Info .= 'Package Specification : ' . l:Tag_Item['packspec'] . "\n" let l:Menu = l:Tag_Item['packspec'] elseif has_key( l:Tag_Item, 'type') let l:Info .= 'Datetype : ' . l:Tag_Item['type'] . "\n" let l:Menu = l:Tag_Item['type'] else let l:Menu = l:Tag_Item['filename'] endif let l:Match_Item = { \ 'word': l:Tag_Item['name'], \ 'menu': l:Menu, \ 'info': l:Info, \ 'kind': l:Tag_Item['kind'], \ 'icase': 1} endif if complete_add (l:Match_Item) == 0 return [] endif if complete_check () return [] endif endfor return [] endif endfunction adacomplete#Complete finish " 1}}} "------------------------------------------------------------------------------ " Copyright (C) 2006 Martin Krischik " " Vim is Charityware - see ":help license" or uganda.txt for licence details. "------------------------------------------------------------------------------ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker
zyz2011-vim
runtime/autoload/adacomplete.vim
Vim Script
gpl2
3,669
"python3complete.vim - Omni Completion for python " Maintainer: Aaron Griffin <aaronmgriffin@gmail.com> " Version: 0.9 " Last Updated: 18 Jun 2009 " " Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim " " Changes " TODO: " 'info' item output can use some formatting work " Add an "unsafe eval" mode, to allow for return type evaluation " Complete basic syntax along with import statements " i.e. "import url<c-x,c-o>" " Continue parsing on invalid line?? " " v 0.9 " * Fixed docstring parsing for classes and functions " * Fixed parsing of *args and **kwargs type arguments " * Better function param parsing to handle things like tuples and " lambda defaults args " " v 0.8 " * Fixed an issue where the FIRST assignment was always used instead of " using a subsequent assignment for a variable " * Fixed a scoping issue when working inside a parameterless function " " " v 0.7 " * Fixed function list sorting (_ and __ at the bottom) " * Removed newline removal from docs. It appears vim handles these better in " recent patches " " v 0.6: " * Fixed argument completion " * Removed the 'kind' completions, as they are better indicated " with real syntax " * Added tuple assignment parsing (whoops, that was forgotten) " * Fixed import handling when flattening scope " " v 0.5: " Yeah, I skipped a version number - 0.4 was never public. " It was a bugfix version on top of 0.3. This is a complete " rewrite. " if !has('python3') echo "Error: Required vim compiled with +python3" finish endif function! python3complete#Complete(findstart, base) "findstart = 1 when we need to get the text length if a:findstart == 1 let line = getline('.') let idx = col('.') while idx > 0 let idx -= 1 let c = line[idx] if c =~ '\w' continue elseif ! c =~ '\.' let idx = -1 break else break endif endwhile return idx "findstart = 0 when we need to return the list of completions else "vim no longer moves the cursor upon completion... fix that let line = getline('.') let idx = col('.') let cword = '' while idx > 0 let idx -= 1 let c = line[idx] if c =~ '\w' || c =~ '\.' let cword = c . cword continue elseif strlen(cword) > 0 || idx == 0 break endif endwhile execute "py3 vimpy3complete('" . cword . "', '" . a:base . "')" return g:python3complete_completions endif endfunction function! s:DefPython() py3 << PYTHONEOF import sys, tokenize, io, types from token import NAME, DEDENT, NEWLINE, STRING debugstmts=[] def dbg(s): debugstmts.append(s) def showdbg(): for d in debugstmts: print("DBG: %s " % d) def vimpy3complete(context,match): global debugstmts debugstmts = [] try: import vim cmpl = Completer() cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')")) all = cmpl.get_completions(context,match) all.sort(key=lambda x:x['abbr'].replace('_','z')) dictstr = '[' # have to do this for double quoting for cmpl in all: dictstr += '{' for x in cmpl: dictstr += '"%s":"%s",' % (x,cmpl[x]) dictstr += '"icase":0},' if dictstr[-1] == ',': dictstr = dictstr[:-1] dictstr += ']' #dbg("dict: %s" % dictstr) vim.command("silent let g:python3complete_completions = %s" % dictstr) #dbg("Completion dict:\n%s" % all) except vim.error: dbg("VIM Error: %s" % vim.error) class Completer(object): def __init__(self): self.compldict = {} self.parser = PyParser() def evalsource(self,text,line=0): sc = self.parser.parse(text,line) src = sc.get_code() dbg("source: %s" % src) try: exec(src,self.compldict) except: dbg("parser: %s, %s" % (sys.exc_info()[0],sys.exc_info()[1])) for l in sc.locals: try: exec(l,self.compldict) except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l)) def _cleanstr(self,doc): return doc.replace('"',' ').replace("'",' ') def get_arguments(self,func_obj): def _ctor(class_ob): try: return class_ob.__init__ except AttributeError: for base in class_ob.__bases__: rc = _ctor(base) if rc is not None: return rc return None arg_offset = 1 if type(func_obj) == type: func_obj = _ctor(func_obj) elif type(func_obj) == types.MethodType: arg_offset = 1 else: arg_offset = 0 arg_text='' if type(func_obj) in [types.FunctionType, types.LambdaType,types.MethodType]: try: cd = func_obj.__code__ real_args = cd.co_varnames[arg_offset:cd.co_argcount] defaults = func_obj.__defaults__ or [] defaults = ["=%s" % name for name in defaults] defaults = [""] * (len(real_args)-len(defaults)) + defaults items = [a+d for a,d in zip(real_args,defaults)] if func_obj.__code__.co_flags & 0x4: items.append("...") if func_obj.__code__.co_flags & 0x8: items.append("***") arg_text = (','.join(items)) + ')' except: dbg("arg completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1])) pass if len(arg_text) == 0: # The doc string sometimes contains the function signature # this works for alot of C modules that are part of the # standard library doc = func_obj.__doc__ if doc: doc = doc.lstrip() pos = doc.find('\n') if pos > 0: sigline = doc[:pos] lidx = sigline.find('(') ridx = sigline.find(')') if lidx > 0 and ridx > 0: arg_text = sigline[lidx+1:ridx] + ')' if len(arg_text) == 0: arg_text = ')' return arg_text def get_completions(self,context,match): #dbg("get_completions('%s','%s')" % (context,match)) stmt = '' if context: stmt += str(context) if match: stmt += str(match) try: result = None all = {} ridx = stmt.rfind('.') if len(stmt) > 0 and stmt[-1] == '(': result = eval(_sanitize(stmt[:-1]), self.compldict) doc = result.__doc__ if doc is None: doc = '' args = self.get_arguments(result) return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}] elif ridx == -1: match = stmt all = self.compldict else: match = stmt[ridx+1:] stmt = _sanitize(stmt[:ridx]) result = eval(stmt, self.compldict) all = dir(result) dbg("completing: stmt:%s" % stmt) completions = [] try: maindoc = result.__doc__ except: maindoc = ' ' if maindoc is None: maindoc = ' ' for m in all: if m == "_PyCmplNoType": continue #this is internal try: dbg('possible completion: %s' % m) if m.find(match) == 0: if result is None: inst = all[m] else: inst = getattr(result,m) try: doc = inst.__doc__ except: doc = maindoc typestr = str(inst) if doc is None or doc == '': doc = maindoc wrd = m[len(match):] c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)} if "function" in typestr: c['word'] += '(' c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst)) elif "method" in typestr: c['word'] += '(' c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst)) elif "module" in typestr: c['word'] += '.' elif "type" in typestr: c['word'] += '(' c['abbr'] += '(' completions.append(c) except: i = sys.exc_info() dbg("inner completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt)) return completions except: i = sys.exc_info() dbg("completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt)) return [] class Scope(object): def __init__(self,name,indent,docstr=''): self.subscopes = [] self.docstr = docstr self.locals = [] self.parent = None self.name = name self.indent = indent def add(self,sub): #print('push scope: [%s@%s]' % (sub.name,sub.indent)) sub.parent = self self.subscopes.append(sub) return sub def doc(self,str): """ Clean up a docstring """ d = str.replace('\n',' ') d = d.replace('\t',' ') while d.find(' ') > -1: d = d.replace(' ',' ') while d[0] in '"\'\t ': d = d[1:] while d[-1] in '"\'\t ': d = d[:-1] dbg("Scope(%s)::docstr = %s" % (self,d)) self.docstr = d def local(self,loc): self._checkexisting(loc) self.locals.append(loc) def copy_decl(self,indent=0): """ Copy a scope's declaration only, at the specified indent level - not local variables """ return Scope(self.name,indent,self.docstr) def _checkexisting(self,test): "Convienance function... keep out duplicates" if test.find('=') > -1: var = test.split('=')[0].strip() for l in self.locals: if l.find('=') > -1 and var == l.split('=')[0].strip(): self.locals.remove(l) def get_code(self): str = "" if len(self.docstr) > 0: str += '"""'+self.docstr+'"""\n' for l in self.locals: if l.startswith('import'): str += l+'\n' str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n' for sub in self.subscopes: str += sub.get_code() for l in self.locals: if not l.startswith('import'): str += l+'\n' return str def pop(self,indent): #print('pop scope: [%s] to [%s]' % (self.indent,indent)) outer = self while outer.parent != None and outer.indent >= indent: outer = outer.parent return outer def currentindent(self): #print('parse current indent: %s' % self.indent) return ' '*self.indent def childindent(self): #print('parse child indent: [%s]' % (self.indent+1)) return ' '*(self.indent+1) class Class(Scope): def __init__(self, name, supers, indent, docstr=''): Scope.__init__(self,name,indent, docstr) self.supers = supers def copy_decl(self,indent=0): c = Class(self.name,self.supers,indent, self.docstr) for s in self.subscopes: c.add(s.copy_decl(indent+1)) return c def get_code(self): str = '%sclass %s' % (self.currentindent(),self.name) if len(self.supers) > 0: str += '(%s)' % ','.join(self.supers) str += ':\n' if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n' if len(self.subscopes) > 0: for s in self.subscopes: str += s.get_code() else: str += '%spass\n' % self.childindent() return str class Function(Scope): def __init__(self, name, params, indent, docstr=''): Scope.__init__(self,name,indent, docstr) self.params = params def copy_decl(self,indent=0): return Function(self.name,self.params,indent, self.docstr) def get_code(self): str = "%sdef %s(%s):\n" % \ (self.currentindent(),self.name,','.join(self.params)) if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n' str += "%spass\n" % self.childindent() return str class PyParser: def __init__(self): self.top = Scope('global',0) self.scope = self.top def _parsedotname(self,pre=None): #returns (dottedname, nexttoken) name = [] if pre is None: tokentype, token, indent = self.donext() if tokentype != NAME and token != '*': return ('', token) else: token = pre name.append(token) while True: tokentype, token, indent = self.donext() if token != '.': break tokentype, token, indent = self.donext() if tokentype != NAME: break name.append(token) return (".".join(name), token) def _parseimportlist(self): imports = [] while True: name, token = self._parsedotname() if not name: break name2 = '' if token == 'as': name2, token = self._parsedotname() imports.append((name, name2)) while token != "," and "\n" not in token: tokentype, token, indent = self.donext() if token != ",": break return imports def _parenparse(self): name = '' names = [] level = 1 while True: tokentype, token, indent = self.donext() if token in (')', ',') and level == 1: if '=' not in name: name = name.replace(' ', '') names.append(name.strip()) name = '' if token == '(': level += 1 name += "(" elif token == ')': level -= 1 if level == 0: break else: name += ")" elif token == ',' and level == 1: pass else: name += "%s " % str(token) return names def _parsefunction(self,indent): self.scope=self.scope.pop(indent) tokentype, fname, ind = self.donext() if tokentype != NAME: return None tokentype, open, ind = self.donext() if open != '(': return None params=self._parenparse() tokentype, colon, ind = self.donext() if colon != ':': return None return Function(fname,params,indent) def _parseclass(self,indent): self.scope=self.scope.pop(indent) tokentype, cname, ind = self.donext() if tokentype != NAME: return None super = [] tokentype, thenext, ind = self.donext() if thenext == '(': super=self._parenparse() elif thenext != ':': return None return Class(cname,super,indent) def _parseassignment(self): assign='' tokentype, token, indent = self.donext() if tokentype == tokenize.STRING or token == 'str': return '""' elif token == '(' or token == 'tuple': return '()' elif token == '[' or token == 'list': return '[]' elif token == '{' or token == 'dict': return '{}' elif tokentype == tokenize.NUMBER: return '0' elif token == 'open' or token == 'file': return 'file' elif token == 'None': return '_PyCmplNoType()' elif token == 'type': return 'type(_PyCmplNoType)' #only for method resolution else: assign += token level = 0 while True: tokentype, token, indent = self.donext() if token in ('(','{','['): level += 1 elif token in (']','}',')'): level -= 1 if level == 0: break elif level == 0: if token in (';','\n'): break assign += token return "%s" % assign def donext(self): type, token, (lineno, indent), end, self.parserline = next(self.gen) if lineno == self.curline: #print('line found [%s] scope=%s' % (line.replace('\n',''),self.scope.name)) self.currentscope = self.scope return (type, token, indent) def _adjustvisibility(self): newscope = Scope('result',0) scp = self.currentscope while scp != None: if type(scp) == Function: slice = 0 #Handle 'self' params if scp.parent != None and type(scp.parent) == Class: slice = 1 newscope.local('%s = %s' % (scp.params[0],scp.parent.name)) for p in scp.params[slice:]: i = p.find('=') if len(p) == 0: continue pvar = '' ptype = '' if i == -1: pvar = p ptype = '_PyCmplNoType()' else: pvar = p[:i] ptype = _sanitize(p[i+1:]) if pvar.startswith('**'): pvar = pvar[2:] ptype = '{}' elif pvar.startswith('*'): pvar = pvar[1:] ptype = '[]' newscope.local('%s = %s' % (pvar,ptype)) for s in scp.subscopes: ns = s.copy_decl(0) newscope.add(ns) for l in scp.locals: newscope.local(l) scp = scp.parent self.currentscope = newscope return self.currentscope #p.parse(vim.current.buffer[:],vim.eval("line('.')")) def parse(self,text,curline=0): self.curline = int(curline) buf = io.StringIO(''.join(text) + '\n') self.gen = tokenize.generate_tokens(buf.readline) self.currentscope = self.scope try: freshscope=True while True: tokentype, token, indent = self.donext() #dbg( 'main: token=[%s] indent=[%s]' % (token,indent)) if tokentype == DEDENT or token == "pass": self.scope = self.scope.pop(indent) elif token == 'def': func = self._parsefunction(indent) if func is None: print("function: syntax error...") continue dbg("new scope: function") freshscope = True self.scope = self.scope.add(func) elif token == 'class': cls = self._parseclass(indent) if cls is None: print("class: syntax error...") continue freshscope = True dbg("new scope: class") self.scope = self.scope.add(cls) elif token == 'import': imports = self._parseimportlist() for mod, alias in imports: loc = "import %s" % mod if len(alias) > 0: loc += " as %s" % alias self.scope.local(loc) freshscope = False elif token == 'from': mod, token = self._parsedotname() if not mod or token != "import": print("from: syntax error...") continue names = self._parseimportlist() for name, alias in names: loc = "from %s import %s" % (mod,name) if len(alias) > 0: loc += " as %s" % alias self.scope.local(loc) freshscope = False elif tokentype == STRING: if freshscope: self.scope.doc(token) elif tokentype == NAME: name,token = self._parsedotname(token) if token == '=': stmt = self._parseassignment() dbg("parseassignment: %s = %s" % (name, stmt)) if stmt != None: self.scope.local("%s = %s" % (name,stmt)) freshscope = False except StopIteration: #thrown on EOF pass except: dbg("parse error: %s, %s @ %s" % (sys.exc_info()[0], sys.exc_info()[1], self.parserline)) return self._adjustvisibility() def _sanitize(str): val = '' level = 0 for c in str: if c in ('(','{','['): level += 1 elif c in (']','}',')'): level -= 1 elif level == 0: val += c return val sys.path.extend(['.','..']) PYTHONEOF endfunction call s:DefPython()
zyz2011-vim
runtime/autoload/python3complete.vim
Vim Script
gpl2
21,507
"pythoncomplete.vim - Omni Completion for python " Maintainer: Aaron Griffin <aaronmgriffin@gmail.com> " Version: 0.9 " Last Updated: 18 Jun 2009 " " Changes " TODO: " 'info' item output can use some formatting work " Add an "unsafe eval" mode, to allow for return type evaluation " Complete basic syntax along with import statements " i.e. "import url<c-x,c-o>" " Continue parsing on invalid line?? " " v 0.9 " * Fixed docstring parsing for classes and functions " * Fixed parsing of *args and **kwargs type arguments " * Better function param parsing to handle things like tuples and " lambda defaults args " " v 0.8 " * Fixed an issue where the FIRST assignment was always used instead of " using a subsequent assignment for a variable " * Fixed a scoping issue when working inside a parameterless function " " " v 0.7 " * Fixed function list sorting (_ and __ at the bottom) " * Removed newline removal from docs. It appears vim handles these better in " recent patches " " v 0.6: " * Fixed argument completion " * Removed the 'kind' completions, as they are better indicated " with real syntax " * Added tuple assignment parsing (whoops, that was forgotten) " * Fixed import handling when flattening scope " " v 0.5: " Yeah, I skipped a version number - 0.4 was never public. " It was a bugfix version on top of 0.3. This is a complete " rewrite. " if !has('python') echo "Error: Required vim compiled with +python" finish endif function! pythoncomplete#Complete(findstart, base) "findstart = 1 when we need to get the text length if a:findstart == 1 let line = getline('.') let idx = col('.') while idx > 0 let idx -= 1 let c = line[idx] if c =~ '\w' continue elseif ! c =~ '\.' let idx = -1 break else break endif endwhile return idx "findstart = 0 when we need to return the list of completions else "vim no longer moves the cursor upon completion... fix that let line = getline('.') let idx = col('.') let cword = '' while idx > 0 let idx -= 1 let c = line[idx] if c =~ '\w' || c =~ '\.' let cword = c . cword continue elseif strlen(cword) > 0 || idx == 0 break endif endwhile execute "python vimcomplete('" . cword . "', '" . a:base . "')" return g:pythoncomplete_completions endif endfunction function! s:DefPython() python << PYTHONEOF import sys, tokenize, cStringIO, types from token import NAME, DEDENT, NEWLINE, STRING debugstmts=[] def dbg(s): debugstmts.append(s) def showdbg(): for d in debugstmts: print "DBG: %s " % d def vimcomplete(context,match): global debugstmts debugstmts = [] try: import vim def complsort(x,y): try: xa = x['abbr'] ya = y['abbr'] if xa[0] == '_': if xa[1] == '_' and ya[0:2] == '__': return xa > ya elif ya[0:2] == '__': return -1 elif y[0] == '_': return xa > ya else: return 1 elif ya[0] == '_': return -1 else: return xa > ya except: return 0 cmpl = Completer() cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')")) all = cmpl.get_completions(context,match) all.sort(complsort) dictstr = '[' # have to do this for double quoting for cmpl in all: dictstr += '{' for x in cmpl: dictstr += '"%s":"%s",' % (x,cmpl[x]) dictstr += '"icase":0},' if dictstr[-1] == ',': dictstr = dictstr[:-1] dictstr += ']' #dbg("dict: %s" % dictstr) vim.command("silent let g:pythoncomplete_completions = %s" % dictstr) #dbg("Completion dict:\n%s" % all) except vim.error: dbg("VIM Error: %s" % vim.error) class Completer(object): def __init__(self): self.compldict = {} self.parser = PyParser() def evalsource(self,text,line=0): sc = self.parser.parse(text,line) src = sc.get_code() dbg("source: %s" % src) try: exec(src) in self.compldict except: dbg("parser: %s, %s" % (sys.exc_info()[0],sys.exc_info()[1])) for l in sc.locals: try: exec(l) in self.compldict except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l)) def _cleanstr(self,doc): return doc.replace('"',' ').replace("'",' ') def get_arguments(self,func_obj): def _ctor(obj): try: return class_ob.__init__.im_func except AttributeError: for base in class_ob.__bases__: rc = _find_constructor(base) if rc is not None: return rc return None arg_offset = 1 if type(func_obj) == types.ClassType: func_obj = _ctor(func_obj) elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func else: arg_offset = 0 arg_text='' if type(func_obj) in [types.FunctionType, types.LambdaType]: try: cd = func_obj.func_code real_args = cd.co_varnames[arg_offset:cd.co_argcount] defaults = func_obj.func_defaults or '' defaults = map(lambda name: "=%s" % name, defaults) defaults = [""] * (len(real_args)-len(defaults)) + defaults items = map(lambda a,d: a+d, real_args, defaults) if func_obj.func_code.co_flags & 0x4: items.append("...") if func_obj.func_code.co_flags & 0x8: items.append("***") arg_text = (','.join(items)) + ')' except: dbg("arg completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1])) pass if len(arg_text) == 0: # The doc string sometimes contains the function signature # this works for alot of C modules that are part of the # standard library doc = func_obj.__doc__ if doc: doc = doc.lstrip() pos = doc.find('\n') if pos > 0: sigline = doc[:pos] lidx = sigline.find('(') ridx = sigline.find(')') if lidx > 0 and ridx > 0: arg_text = sigline[lidx+1:ridx] + ')' if len(arg_text) == 0: arg_text = ')' return arg_text def get_completions(self,context,match): dbg("get_completions('%s','%s')" % (context,match)) stmt = '' if context: stmt += str(context) if match: stmt += str(match) try: result = None all = {} ridx = stmt.rfind('.') if len(stmt) > 0 and stmt[-1] == '(': result = eval(_sanitize(stmt[:-1]), self.compldict) doc = result.__doc__ if doc is None: doc = '' args = self.get_arguments(result) return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}] elif ridx == -1: match = stmt all = self.compldict else: match = stmt[ridx+1:] stmt = _sanitize(stmt[:ridx]) result = eval(stmt, self.compldict) all = dir(result) dbg("completing: stmt:%s" % stmt) completions = [] try: maindoc = result.__doc__ except: maindoc = ' ' if maindoc is None: maindoc = ' ' for m in all: if m == "_PyCmplNoType": continue #this is internal try: dbg('possible completion: %s' % m) if m.find(match) == 0: if result is None: inst = all[m] else: inst = getattr(result,m) try: doc = inst.__doc__ except: doc = maindoc typestr = str(inst) if doc is None or doc == '': doc = maindoc wrd = m[len(match):] c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)} if "function" in typestr: c['word'] += '(' c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst)) elif "method" in typestr: c['word'] += '(' c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst)) elif "module" in typestr: c['word'] += '.' elif "class" in typestr: c['word'] += '(' c['abbr'] += '(' completions.append(c) except: i = sys.exc_info() dbg("inner completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt)) return completions except: i = sys.exc_info() dbg("completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt)) return [] class Scope(object): def __init__(self,name,indent,docstr=''): self.subscopes = [] self.docstr = docstr self.locals = [] self.parent = None self.name = name self.indent = indent def add(self,sub): #print 'push scope: [%s@%s]' % (sub.name,sub.indent) sub.parent = self self.subscopes.append(sub) return sub def doc(self,str): """ Clean up a docstring """ d = str.replace('\n',' ') d = d.replace('\t',' ') while d.find(' ') > -1: d = d.replace(' ',' ') while d[0] in '"\'\t ': d = d[1:] while d[-1] in '"\'\t ': d = d[:-1] dbg("Scope(%s)::docstr = %s" % (self,d)) self.docstr = d def local(self,loc): self._checkexisting(loc) self.locals.append(loc) def copy_decl(self,indent=0): """ Copy a scope's declaration only, at the specified indent level - not local variables """ return Scope(self.name,indent,self.docstr) def _checkexisting(self,test): "Convienance function... keep out duplicates" if test.find('=') > -1: var = test.split('=')[0].strip() for l in self.locals: if l.find('=') > -1 and var == l.split('=')[0].strip(): self.locals.remove(l) def get_code(self): str = "" if len(self.docstr) > 0: str += '"""'+self.docstr+'"""\n' for l in self.locals: if l.startswith('import'): str += l+'\n' str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n' for sub in self.subscopes: str += sub.get_code() for l in self.locals: if not l.startswith('import'): str += l+'\n' return str def pop(self,indent): #print 'pop scope: [%s] to [%s]' % (self.indent,indent) outer = self while outer.parent != None and outer.indent >= indent: outer = outer.parent return outer def currentindent(self): #print 'parse current indent: %s' % self.indent return ' '*self.indent def childindent(self): #print 'parse child indent: [%s]' % (self.indent+1) return ' '*(self.indent+1) class Class(Scope): def __init__(self, name, supers, indent, docstr=''): Scope.__init__(self,name,indent, docstr) self.supers = supers def copy_decl(self,indent=0): c = Class(self.name,self.supers,indent, self.docstr) for s in self.subscopes: c.add(s.copy_decl(indent+1)) return c def get_code(self): str = '%sclass %s' % (self.currentindent(),self.name) if len(self.supers) > 0: str += '(%s)' % ','.join(self.supers) str += ':\n' if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n' if len(self.subscopes) > 0: for s in self.subscopes: str += s.get_code() else: str += '%spass\n' % self.childindent() return str class Function(Scope): def __init__(self, name, params, indent, docstr=''): Scope.__init__(self,name,indent, docstr) self.params = params def copy_decl(self,indent=0): return Function(self.name,self.params,indent, self.docstr) def get_code(self): str = "%sdef %s(%s):\n" % \ (self.currentindent(),self.name,','.join(self.params)) if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n' str += "%spass\n" % self.childindent() return str class PyParser: def __init__(self): self.top = Scope('global',0) self.scope = self.top def _parsedotname(self,pre=None): #returns (dottedname, nexttoken) name = [] if pre is None: tokentype, token, indent = self.next() if tokentype != NAME and token != '*': return ('', token) else: token = pre name.append(token) while True: tokentype, token, indent = self.next() if token != '.': break tokentype, token, indent = self.next() if tokentype != NAME: break name.append(token) return (".".join(name), token) def _parseimportlist(self): imports = [] while True: name, token = self._parsedotname() if not name: break name2 = '' if token == 'as': name2, token = self._parsedotname() imports.append((name, name2)) while token != "," and "\n" not in token: tokentype, token, indent = self.next() if token != ",": break return imports def _parenparse(self): name = '' names = [] level = 1 while True: tokentype, token, indent = self.next() if token in (')', ',') and level == 1: if '=' not in name: name = name.replace(' ', '') names.append(name.strip()) name = '' if token == '(': level += 1 name += "(" elif token == ')': level -= 1 if level == 0: break else: name += ")" elif token == ',' and level == 1: pass else: name += "%s " % str(token) return names def _parsefunction(self,indent): self.scope=self.scope.pop(indent) tokentype, fname, ind = self.next() if tokentype != NAME: return None tokentype, open, ind = self.next() if open != '(': return None params=self._parenparse() tokentype, colon, ind = self.next() if colon != ':': return None return Function(fname,params,indent) def _parseclass(self,indent): self.scope=self.scope.pop(indent) tokentype, cname, ind = self.next() if tokentype != NAME: return None super = [] tokentype, next, ind = self.next() if next == '(': super=self._parenparse() elif next != ':': return None return Class(cname,super,indent) def _parseassignment(self): assign='' tokentype, token, indent = self.next() if tokentype == tokenize.STRING or token == 'str': return '""' elif token == '(' or token == 'tuple': return '()' elif token == '[' or token == 'list': return '[]' elif token == '{' or token == 'dict': return '{}' elif tokentype == tokenize.NUMBER: return '0' elif token == 'open' or token == 'file': return 'file' elif token == 'None': return '_PyCmplNoType()' elif token == 'type': return 'type(_PyCmplNoType)' #only for method resolution else: assign += token level = 0 while True: tokentype, token, indent = self.next() if token in ('(','{','['): level += 1 elif token in (']','}',')'): level -= 1 if level == 0: break elif level == 0: if token in (';','\n'): break assign += token return "%s" % assign def next(self): type, token, (lineno, indent), end, self.parserline = self.gen.next() if lineno == self.curline: #print 'line found [%s] scope=%s' % (line.replace('\n',''),self.scope.name) self.currentscope = self.scope return (type, token, indent) def _adjustvisibility(self): newscope = Scope('result',0) scp = self.currentscope while scp != None: if type(scp) == Function: slice = 0 #Handle 'self' params if scp.parent != None and type(scp.parent) == Class: slice = 1 newscope.local('%s = %s' % (scp.params[0],scp.parent.name)) for p in scp.params[slice:]: i = p.find('=') if len(p) == 0: continue pvar = '' ptype = '' if i == -1: pvar = p ptype = '_PyCmplNoType()' else: pvar = p[:i] ptype = _sanitize(p[i+1:]) if pvar.startswith('**'): pvar = pvar[2:] ptype = '{}' elif pvar.startswith('*'): pvar = pvar[1:] ptype = '[]' newscope.local('%s = %s' % (pvar,ptype)) for s in scp.subscopes: ns = s.copy_decl(0) newscope.add(ns) for l in scp.locals: newscope.local(l) scp = scp.parent self.currentscope = newscope return self.currentscope #p.parse(vim.current.buffer[:],vim.eval("line('.')")) def parse(self,text,curline=0): self.curline = int(curline) buf = cStringIO.StringIO(''.join(text) + '\n') self.gen = tokenize.generate_tokens(buf.readline) self.currentscope = self.scope try: freshscope=True while True: tokentype, token, indent = self.next() #dbg( 'main: token=[%s] indent=[%s]' % (token,indent)) if tokentype == DEDENT or token == "pass": self.scope = self.scope.pop(indent) elif token == 'def': func = self._parsefunction(indent) if func is None: print "function: syntax error..." continue dbg("new scope: function") freshscope = True self.scope = self.scope.add(func) elif token == 'class': cls = self._parseclass(indent) if cls is None: print "class: syntax error..." continue freshscope = True dbg("new scope: class") self.scope = self.scope.add(cls) elif token == 'import': imports = self._parseimportlist() for mod, alias in imports: loc = "import %s" % mod if len(alias) > 0: loc += " as %s" % alias self.scope.local(loc) freshscope = False elif token == 'from': mod, token = self._parsedotname() if not mod or token != "import": print "from: syntax error..." continue names = self._parseimportlist() for name, alias in names: loc = "from %s import %s" % (mod,name) if len(alias) > 0: loc += " as %s" % alias self.scope.local(loc) freshscope = False elif tokentype == STRING: if freshscope: self.scope.doc(token) elif tokentype == NAME: name,token = self._parsedotname(token) if token == '=': stmt = self._parseassignment() dbg("parseassignment: %s = %s" % (name, stmt)) if stmt != None: self.scope.local("%s = %s" % (name,stmt)) freshscope = False except StopIteration: #thrown on EOF pass except: dbg("parse error: %s, %s @ %s" % (sys.exc_info()[0], sys.exc_info()[1], self.parserline)) return self._adjustvisibility() def _sanitize(str): val = '' level = 0 for c in str: if c in ('(','{','['): level += 1 elif c in (']','}',')'): level -= 1 elif level == 0: val += c return val sys.path.extend(['.','..']) PYTHONEOF endfunction call s:DefPython() " vim: set et ts=4:
zyz2011-vim
runtime/autoload/pythoncomplete.vim
Vim Script
gpl2
22,019
" Vim completion script " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2011 Dec 30 let s:cpo_save = &cpo set cpo&vim " This function is used for the 'omnifunc' option. function! ccomplete#Complete(findstart, base) if a:findstart " Locate the start of the item, including ".", "->" and "[...]". let line = getline('.') let start = col('.') - 1 let lastword = -1 while start > 0 if line[start - 1] =~ '\w' let start -= 1 elseif line[start - 1] =~ '\.' if lastword == -1 let lastword = start endif let start -= 1 elseif start > 1 && line[start - 2] == '-' && line[start - 1] == '>' if lastword == -1 let lastword = start endif let start -= 2 elseif line[start - 1] == ']' " Skip over [...]. let n = 0 let start -= 1 while start > 0 let start -= 1 if line[start] == '[' if n == 0 break endif let n -= 1 elseif line[start] == ']' " nested [] let n += 1 endif endwhile else break endif endwhile " Return the column of the last word, which is going to be changed. " Remember the text that comes before it in s:prepended. if lastword == -1 let s:prepended = '' return start endif let s:prepended = strpart(line, start, lastword - start) return lastword endif " Return list of matches. let base = s:prepended . a:base " Don't do anything for an empty base, would result in all the tags in the " tags file. if base == '' return [] endif " init cache for vimgrep to empty let s:grepCache = {} " Split item in words, keep empty word after "." or "->". " "aa" -> ['aa'], "aa." -> ['aa', ''], "aa.bb" -> ['aa', 'bb'], etc. " We can't use split, because we need to skip nested [...]. let items = [] let s = 0 while 1 let e = match(base, '\.\|->\|\[', s) if e < 0 if s == 0 || base[s - 1] != ']' call add(items, strpart(base, s)) endif break endif if s == 0 || base[s - 1] != ']' call add(items, strpart(base, s, e - s)) endif if base[e] == '.' let s = e + 1 " skip over '.' elseif base[e] == '-' let s = e + 2 " skip over '->' else " Skip over [...]. let n = 0 let s = e let e += 1 while e < len(base) if base[e] == ']' if n == 0 break endif let n -= 1 elseif base[e] == '[' " nested [...] let n += 1 endif let e += 1 endwhile let e += 1 call add(items, strpart(base, s, e - s)) let s = e endif endwhile " Find the variable items[0]. " 1. in current function (like with "gd") " 2. in tags file(s) (like with ":tag") " 3. in current file (like with "gD") let res = [] if searchdecl(items[0], 0, 1) == 0 " Found, now figure out the type. " TODO: join previous line if it makes sense let line = getline('.') let col = col('.') if stridx(strpart(line, 0, col), ';') != -1 " Handle multiple declarations on the same line. let col2 = col - 1 while line[col2] != ';' let col2 -= 1 endwhile let line = strpart(line, col2 + 1) let col -= col2 endif if stridx(strpart(line, 0, col), ',') != -1 " Handle multiple declarations on the same line in a function " declaration. let col2 = col - 1 while line[col2] != ',' let col2 -= 1 endwhile if strpart(line, col2 + 1, col - col2 - 1) =~ ' *[^ ][^ ]* *[^ ]' let line = strpart(line, col2 + 1) let col -= col2 endif endif if len(items) == 1 " Completing one word and it's a local variable: May add '[', '.' or " '->'. let match = items[0] let kind = 'v' if match(line, '\<' . match . '\s*\[') > 0 let match .= '[' else let res = s:Nextitem(strpart(line, 0, col), [''], 0, 1) if len(res) > 0 " There are members, thus add "." or "->". if match(line, '\*[ \t(]*' . match . '\>') > 0 let match .= '->' else let match .= '.' endif endif endif let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}] else " Completing "var.", "var.something", etc. let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1) endif endif if len(items) == 1 " Only one part, no "." or "->": complete from tags file. let tags = taglist('^' . base) " Remove members, these can't appear without something in front. call filter(tags, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1') " Remove static matches in other files. call filter(tags, '!has_key(v:val, "static") || !v:val["static"] || bufnr("%") == bufnr(v:val["filename"])') call extend(res, map(tags, 's:Tag2item(v:val)')) endif if len(res) == 0 " Find the variable in the tags file(s) let diclist = taglist('^' . items[0] . '$') " Remove members, these can't appear without something in front. call filter(diclist, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1') let res = [] for i in range(len(diclist)) " New ctags has the "typeref" field. Patched version has "typename". if has_key(diclist[i], 'typename') call extend(res, s:StructMembers(diclist[i]['typename'], items[1:], 1)) elseif has_key(diclist[i], 'typeref') call extend(res, s:StructMembers(diclist[i]['typeref'], items[1:], 1)) endif " For a variable use the command, which must be a search pattern that " shows the declaration of the variable. if diclist[i]['kind'] == 'v' let line = diclist[i]['cmd'] if line[0] == '/' && line[1] == '^' let col = match(line, '\<' . items[0] . '\>') call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:], 0, 1)) endif endif endfor endif if len(res) == 0 && searchdecl(items[0], 1) == 0 " Found, now figure out the type. " TODO: join previous line if it makes sense let line = getline('.') let col = col('.') let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1) endif " If the last item(s) are [...] they need to be added to the matches. let last = len(items) - 1 let brackets = '' while last >= 0 if items[last][0] != '[' break endif let brackets = items[last] . brackets let last -= 1 endwhile return map(res, 's:Tagline2item(v:val, brackets)') endfunc function! s:GetAddition(line, match, memarg, bracket) " Guess if the item is an array. if a:bracket && match(a:line, a:match . '\s*\[') > 0 return '[' endif " Check if the item has members. if len(s:SearchMembers(a:memarg, [''], 0)) > 0 " If there is a '*' before the name use "->". if match(a:line, '\*[ \t(]*' . a:match . '\>') > 0 return '->' else return '.' endif endif return '' endfunction " Turn the tag info "val" into an item for completion. " "val" is is an item in the list returned by taglist(). " If it is a variable we may add "." or "->". Don't do it for other types, " such as a typedef, by not including the info that s:GetAddition() uses. function! s:Tag2item(val) let res = {'match': a:val['name']} let res['extra'] = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename']) let s = s:Dict2info(a:val) if s != '' let res['info'] = s endif let res['tagline'] = '' if has_key(a:val, "kind") let kind = a:val['kind'] let res['kind'] = kind if kind == 'v' let res['tagline'] = "\t" . a:val['cmd'] let res['dict'] = a:val elseif kind == 'f' let res['match'] = a:val['name'] . '(' endif endif return res endfunction " Use all the items in dictionary for the "info" entry. function! s:Dict2info(dict) let info = '' for k in sort(keys(a:dict)) let info .= k . repeat(' ', 10 - len(k)) if k == 'cmd' let info .= substitute(matchstr(a:dict['cmd'], '/^\s*\zs.*\ze$/'), '\\\(.\)', '\1', 'g') else let info .= a:dict[k] endif let info .= "\n" endfor return info endfunc " Parse a tag line and return a dictionary with items like taglist() function! s:ParseTagline(line) let l = split(a:line, "\t") let d = {} if len(l) >= 3 let d['name'] = l[0] let d['filename'] = l[1] let d['cmd'] = l[2] let n = 2 if l[2] =~ '^/' " Find end of cmd, it may contain Tabs. while n < len(l) && l[n] !~ '/;"$' let n += 1 let d['cmd'] .= " " . l[n] endwhile endif for i in range(n + 1, len(l) - 1) if l[i] == 'file:' let d['static'] = 1 elseif l[i] !~ ':' let d['kind'] = l[i] else let d[matchstr(l[i], '[^:]*')] = matchstr(l[i], ':\zs.*') endif endfor endif return d endfunction " Turn a match item "val" into an item for completion. " "val['match']" is the matching item. " "val['tagline']" is the tagline in which the last part was found. function! s:Tagline2item(val, brackets) let line = a:val['tagline'] let add = s:GetAddition(line, a:val['match'], [a:val], a:brackets == '') let res = {'word': a:val['match'] . a:brackets . add } if has_key(a:val, 'info') " Use info from Tag2item(). let res['info'] = a:val['info'] else " Parse the tag line and add each part to the "info" entry. let s = s:Dict2info(s:ParseTagline(line)) if s != '' let res['info'] = s endif endif if has_key(a:val, 'kind') let res['kind'] = a:val['kind'] elseif add == '(' let res['kind'] = 'f' else let s = matchstr(line, '\t\(kind:\)\=\zs\S\ze\(\t\|$\)') if s != '' let res['kind'] = s endif endif if has_key(a:val, 'extra') let res['menu'] = a:val['extra'] return res endif " Isolate the command after the tag and filename. let s = matchstr(line, '[^\t]*\t[^\t]*\t\zs\(/^.*$/\|[^\t]*\)\ze\(;"\t\|\t\|$\)') if s != '' let res['menu'] = s:Tagcmd2extra(s, a:val['match'], matchstr(line, '[^\t]*\t\zs[^\t]*\ze\t')) endif return res endfunction " Turn a command from a tag line to something that is useful in the menu function! s:Tagcmd2extra(cmd, name, fname) if a:cmd =~ '^/^' " The command is a search command, useful to see what it is. let x = matchstr(a:cmd, '^/^\s*\zs.*\ze$/') let x = substitute(x, '\<' . a:name . '\>', '@@', '') let x = substitute(x, '\\\(.\)', '\1', 'g') let x = x . ' - ' . a:fname elseif a:cmd =~ '^\d*$' " The command is a line number, the file name is more useful. let x = a:fname . ' - ' . a:cmd else " Not recognized, use command and file name. let x = a:cmd . ' - ' . a:fname endif return x endfunction " Find composing type in "lead" and match items[0] with it. " Repeat this recursively for items[1], if it's there. " When resolving typedefs "depth" is used to avoid infinite recursion. " Return the list of matches. function! s:Nextitem(lead, items, depth, all) " Use the text up to the variable name and split it in tokens. let tokens = split(a:lead, '\s\+\|\<') " Try to recognize the type of the variable. This is rough guessing... let res = [] for tidx in range(len(tokens)) " Skip tokens starting with a non-ID character. if tokens[tidx] !~ '^\h' continue endif " Recognize "struct foobar" and "union foobar". " Also do "class foobar" when it's C++ after all (doesn't work very well " though). if (tokens[tidx] == 'struct' || tokens[tidx] == 'union' || tokens[tidx] == 'class') && tidx + 1 < len(tokens) let res = s:StructMembers(tokens[tidx] . ':' . tokens[tidx + 1], a:items, a:all) break endif " TODO: add more reserved words if index(['int', 'short', 'char', 'float', 'double', 'static', 'unsigned', 'extern'], tokens[tidx]) >= 0 continue endif " Use the tags file to find out if this is a typedef. let diclist = taglist('^' . tokens[tidx] . '$') for tagidx in range(len(diclist)) let item = diclist[tagidx] " New ctags has the "typeref" field. Patched version has "typename". if has_key(item, 'typeref') call extend(res, s:StructMembers(item['typeref'], a:items, a:all)) continue endif if has_key(item, 'typename') call extend(res, s:StructMembers(item['typename'], a:items, a:all)) continue endif " Only handle typedefs here. if item['kind'] != 't' continue endif " Skip matches local to another file. if has_key(item, 'static') && item['static'] && bufnr('%') != bufnr(item['filename']) continue endif " For old ctags we recognize "typedef struct aaa" and " "typedef union bbb" in the tags file command. let cmd = item['cmd'] let ei = matchend(cmd, 'typedef\s\+') if ei > 1 let cmdtokens = split(strpart(cmd, ei), '\s\+\|\<') if len(cmdtokens) > 1 if cmdtokens[0] == 'struct' || cmdtokens[0] == 'union' || cmdtokens[0] == 'class' let name = '' " Use the first identifier after the "struct" or "union" for ti in range(len(cmdtokens) - 1) if cmdtokens[ti] =~ '^\w' let name = cmdtokens[ti] break endif endfor if name != '' call extend(res, s:StructMembers(cmdtokens[0] . ':' . name, a:items, a:all)) endif elseif a:depth < 10 " Could be "typedef other_T some_T". call extend(res, s:Nextitem(cmdtokens[0], a:items, a:depth + 1, a:all)) endif endif endif endfor if len(res) > 0 break endif endfor return res endfunction " Search for members of structure "typename" in tags files. " Return a list with resulting matches. " Each match is a dictionary with "match" and "tagline" entries. " When "all" is non-zero find all, otherwise just return 1 if there is any " member. function! s:StructMembers(typename, items, all) " Todo: What about local structures? let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")')) if fnames == '' return [] endif let typename = a:typename let qflist = [] let cached = 0 if a:all == 0 let n = '1' " stop at first found match if has_key(s:grepCache, a:typename) let qflist = s:grepCache[a:typename] let cached = 1 endif else let n = '' endif if !cached while 1 exe 'silent! ' . n . 'vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames let qflist = getqflist() if len(qflist) > 0 || match(typename, "::") < 0 break endif " No match for "struct:context::name", remove "context::" and try again. let typename = substitute(typename, ':[^:]*::', ':', '') endwhile if a:all == 0 " Store the result to be able to use it again later. let s:grepCache[a:typename] = qflist endif endif " Put matching members in matches[]. let matches = [] for l in qflist let memb = matchstr(l['text'], '[^\t]*') if memb =~ '^' . a:items[0] " Skip matches local to another file. if match(l['text'], "\tfile:") < 0 || bufnr('%') == bufnr(matchstr(l['text'], '\t\zs[^\t]*')) let item = {'match': memb, 'tagline': l['text']} " Add the kind of item. let s = matchstr(l['text'], '\t\(kind:\)\=\zs\S\ze\(\t\|$\)') if s != '' let item['kind'] = s if s == 'f' let item['match'] = memb . '(' endif endif call add(matches, item) endif endif endfor if len(matches) > 0 " Skip over [...] items let idx = 1 while 1 if idx >= len(a:items) return matches " No further items, return the result. endif if a:items[idx][0] != '[' break endif let idx += 1 endwhile " More items following. For each of the possible members find the " matching following members. return s:SearchMembers(matches, a:items[idx :], a:all) endif " Failed to find anything. return [] endfunction " For matching members, find matches for following items. " When "all" is non-zero find all, otherwise just return 1 if there is any " member. function! s:SearchMembers(matches, items, all) let res = [] for i in range(len(a:matches)) let typename = '' if has_key(a:matches[i], 'dict') if has_key(a:matches[i].dict, 'typename') let typename = a:matches[i].dict['typename'] elseif has_key(a:matches[i].dict, 'typeref') let typename = a:matches[i].dict['typeref'] endif let line = "\t" . a:matches[i].dict['cmd'] else let line = a:matches[i]['tagline'] let e = matchend(line, '\ttypename:') if e < 0 let e = matchend(line, '\ttyperef:') endif if e > 0 " Use typename field let typename = matchstr(line, '[^\t]*', e) endif endif if typename != '' call extend(res, s:StructMembers(typename, a:items, a:all)) else " Use the search command (the declaration itself). let s = match(line, '\t\zs/^') if s > 0 let e = match(line, '\<' . a:matches[i]['match'] . '\>', s) if e > 0 call extend(res, s:Nextitem(strpart(line, s, e - s), a:items, 0, a:all)) endif endif endif if a:all == 0 && len(res) > 0 break endif endfor return res endfunc let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/autoload/ccomplete.vim
Vim Script
gpl2
17,012
" netrwSettings.vim: makes netrw settings simpler " Date: Sep 03, 2008 " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz> " 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 " notice is copied with it. Like anything else that's free, " netrwSettings.vim is provided *as is* and comes with no " warranty of any kind, either expressed or implied. By using " this plugin, you agree that in no event will the copyright " holder be liable for any damages resulting from the use " of this software. " " Mat 4:23 (WEB) Jesus went about in all Galilee, teaching in their {{{1 " synagogues, preaching the gospel of the kingdom, and healing " every disease and every sickness among the people. " Load Once: {{{1 if exists("g:loaded_netrwSettings") || &cp finish endif 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 fun! netrwSettings#NetrwSettings() " this call is here largely just to insure that netrw has been loaded call netrw#NetrwSavePosn() if !exists("g:loaded_netrw") echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None return endif above wincmd s enew setlocal noswapfile bh=wipe set ft=vim file Netrw\ Settings " these variables have the following default effects when they don't " exist (ie. have not been set by the user in his/her .vimrc) if !exists("g:netrw_liststyle") let g:netrw_liststyle= 0 let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa" endif if !exists("g:netrw_silent") let g:netrw_silent= 0 endif if !exists("g:netrw_use_nt_rcp") let g:netrw_use_nt_rcp= 0 endif if !exists("g:netrw_ftp") let g:netrw_ftp= 0 endif if !exists("g:netrw_ignorenetrc") let g:netrw_ignorenetrc= 0 endif put ='+ ---------------------------------------------' put ='+ NetrwSettings: by Charles E. Campbell, Jr.' put ='+ Press <F1> with cursor atop any line for help' put ='+ ---------------------------------------------' let s:netrw_settings_stop= line(".") put ='' put ='+ Netrw Protocol Commands' put = 'let g:netrw_dav_cmd = '.g:netrw_dav_cmd put = 'let g:netrw_fetch_cmd = '.g:netrw_fetch_cmd put = 'let g:netrw_ftp_cmd = '.g:netrw_ftp_cmd put = 'let g:netrw_http_cmd = '.g:netrw_http_cmd put = 'let g:netrw_rcp_cmd = '.g:netrw_rcp_cmd put = 'let g:netrw_rsync_cmd = '.g:netrw_rsync_cmd put = 'let g:netrw_scp_cmd = '.g:netrw_scp_cmd put = 'let g:netrw_sftp_cmd = '.g:netrw_sftp_cmd put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd let s:netrw_protocol_stop= line(".") put = '' put ='+Netrw Transfer Control' put = 'let g:netrw_cygwin = '.g:netrw_cygwin 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 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' put = 'let g:netrw_alto = '.g:netrw_alto put = 'let g:netrw_altv = '.g:netrw_altv put = 'let g:netrw_browse_split = '.g:netrw_browse_split if exists("g:netrw_browsex_viewer") put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer else 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 put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse let fnameescline= line("$") put = 'let g:netrw_fname_escape...' put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd let globescline= line("$") put ='let g:netrw_glob_escape...' put = 'let g:netrw_hide = '.g:netrw_hide put = 'let g:netrw_keepdir = '.g:netrw_keepdir put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd put = 'let g:netrw_list_hide = '.g:netrw_list_hide put = 'let g:netrw_liststyle = '.g:netrw_liststyle put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen put = 'let g:netrw_menu = '.g:netrw_menu put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd put = 'let g:netrw_preview = '.g:netrw_preview put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd put = 'let g:netrw_retmap = '.g:netrw_retmap put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd put = 'let g:netrw_silent = '.g:netrw_silent put = 'let g:netrw_sort_by = '.g:netrw_sort_by put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction put = 'let g:netrw_sort_options = '.g:netrw_sort_options put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence 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("$") put ='let g:netrw_tmpfile_escape...' put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen put = 'let g:netrw_winsize = '.g:netrw_winsize put ='' put ='+ For help, place cursor on line and press <F1>' 1d silent %s/^+/"/e res 99 silent %s/= \([^0-9].*\)$/= '\1'/e silent %s/= $/= ''/e 1 call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1','')) call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'") call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'") call setline(tmpfileescline,"let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'") set nomod nmap <buffer> <silent> <F1> :call NetrwSettingHelp()<cr> nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call NetrwSettingHelp()<cr> let tmpfile= tempname() exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod' endfun " --------------------------------------------------------------------- " NetrwSettingHelp: {{{2 fun! NetrwSettingHelp() " call Dfunc("NetrwSettingHelp()") let curline = getline(".") if curline =~ '=' let varhelp = substitute(curline,'^\s*let ','','e') let varhelp = substitute(varhelp,'\s*=.*$','','e') " call Decho("trying help ".varhelp) try exe "he ".varhelp catch /^Vim\%((\a\+)\)\=:E149/ echo "***sorry*** no help available for <".varhelp.">" endtry elseif line(".") < s:netrw_settings_stop he netrw-settings elseif line(".") < s:netrw_protocol_stop he netrw-externapp elseif line(".") < s:netrw_xfer_stop he netrw-variables else he netrw-browse-var endif " call Dret("NetrwSettingHelp") endfun " --------------------------------------------------------------------- " Modelines: {{{1 " vim:ts=8 fdm=marker
zyz2011-vim
runtime/autoload/netrwSettings.vim
Vim Script
gpl2
8,684
" Vim syntax file " Language: SQL, PL/SQL (Oracle 8i) " Maintainer: Paul Moore <pf_moore AT yahoo.co.uk> " Last Change: 2005 Dec 23 " 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") finish endif syn case ignore " The SQL reserved words, defined as keywords. syn keyword sqlSpecial false null true syn keyword sqlKeyword access add as asc begin by check cluster column syn keyword sqlKeyword compress connect current cursor decimal default desc syn keyword sqlKeyword else elsif end exception exclusive file for from syn keyword sqlKeyword function group having identified if immediate increment syn keyword sqlKeyword index initial into is level loop maxextents mode modify syn keyword sqlKeyword nocompress nowait of offline on online start syn keyword sqlKeyword successful synonym table then to trigger uid syn keyword sqlKeyword unique user validate values view whenever syn keyword sqlKeyword where with option order pctfree privileges procedure syn keyword sqlKeyword public resource return row rowlabel rownum rows syn keyword sqlKeyword session share size smallint type using syn keyword sqlOperator not and or syn keyword sqlOperator in any some all between exists syn keyword sqlOperator like escape syn keyword sqlOperator union intersect minus syn keyword sqlOperator prior distinct syn keyword sqlOperator sysdate out syn keyword sqlStatement alter analyze audit comment commit create syn keyword sqlStatement delete drop execute explain grant insert lock noaudit syn keyword sqlStatement rename revoke rollback savepoint select set syn keyword sqlStatement truncate update syn keyword sqlType boolean char character date float integer long syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray " Strings and characters: syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+ " Numbers: syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" " Comments: syn region sqlComment start="/\*" end="\*/" contains=sqlTodo syn match sqlComment "--.*$" contains=sqlTodo syn sync ccomment sqlComment " Todo. syn keyword sqlTodo contained TODO FIXME XXX DEBUG NOTE " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_sql_syn_inits") if version < 508 let did_sql_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink sqlComment Comment HiLink sqlKeyword sqlSpecial HiLink sqlNumber Number HiLink sqlOperator sqlStatement HiLink sqlSpecial Special HiLink sqlStatement Statement HiLink sqlString String HiLink sqlType Type HiLink sqlTodo Todo delcommand HiLink endif let b:current_syntax = "sql" " vim: ts=8
zyz2011-vim
runtime/syntax/sqloracle.vim
Vim Script
gpl2
2,970
" Vim syntax file " Language: generic configure file " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2005 Jun 20 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif syn keyword confTodo contained TODO FIXME XXX " Avoid matching "text#text", used in /etc/disktab and /etc/gettytab syn match confComment "^#.*" contains=confTodo syn match confComment "\s#.*"ms=s+1 contains=confTodo syn region confString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline syn region confString start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline " Define the default highlighting. " Only used when an item doesn't have highlighting yet hi def link confComment Comment hi def link confTodo Todo hi def link confString String let b:current_syntax = "conf" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/conf.vim
Vim Script
gpl2
799
" pf syntax file " Language: OpenBSD packet filter configuration (pf.conf) " Maintainer: Camiel Dobbelaar <cd@sentia.nl> " Last Change: 2003 May 27 " 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") finish endif setlocal foldmethod=syntax syn sync fromstart syn cluster pfNotLS contains=pfComment,pfTodo,pfVarAssign syn keyword pfCmd altq anchor antispoof binat nat pass syn keyword pfCmd queue rdr scrub table set syn keyword pfService auth bgp domain finger ftp http https ident syn keyword pfService imap irc isakmp kerberos mail nameserver nfs syn keyword pfService nntp ntp pop3 portmap pptp rpcbind rsync smtp syn keyword pfService snmp snmptrap socks ssh sunrpc syslog telnet syn keyword pfService tftp www syn keyword pfTodo TODO XXX contained syn keyword pfWildAddr all any syn match pfCmd /block\s/ syn match pfComment /#.*$/ contains=pfTodo syn match pfCont /\\$/ syn match pfErrClose /}/ syn match pfIPv4 /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ syn match pfIPv6 /[a-fA-F0-9:]*::[a-fA-F0-9:.]*/ syn match pfIPv6 /[a-fA-F0-9:]\+:[a-fA-F0-9:]\+:[a-fA-F0-9:.]\+/ syn match pfNetmask /\/\d\+/ syn match pfNum /[a-zA-Z0-9_:.]\@<!\d\+[a-zA-Z0-9_:.]\@!/ syn match pfTable /<\s*[a-zA-Z][a-zA-Z0-9_]*\s*>/ syn match pfVar /$[a-zA-Z][a-zA-Z0-9_]*/ syn match pfVarAssign /^\s*[a-zA-Z][a-zA-Z0-9_]*\s*=/me=e-1 syn region pfFold1 start=/^#\{1}>/ end=/^#\{1,3}>/me=s-1 transparent fold syn region pfFold2 start=/^#\{2}>/ end=/^#\{2,3}>/me=s-1 transparent fold syn region pfFold3 start=/^#\{3}>/ end=/^#\{3}>/me=s-1 transparent fold syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfNotLS syn region pfString start=/"/ end=/"/ transparent contains=ALLBUT,pfString,@pfNotLS syn region pfString start=/'/ end=/'/ transparent contains=ALLBUT,pfString,@pfNotLS " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_c_syn_inits") if version < 508 let did_c_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink pfCmd Statement HiLink pfComment Comment HiLink pfCont Statement HiLink pfErrClose Error HiLink pfIPv4 Type HiLink pfIPv6 Type HiLink pfNetmask Constant HiLink pfNum Constant HiLink pfService Constant HiLink pfTable Identifier HiLink pfTodo Todo HiLink pfVar Identifier HiLink pfVarAssign Identifier HiLink pfWildAddr Type delcommand HiLink endif let b:current_syntax = "pf"
zyz2011-vim
runtime/syntax/pf.vim
Vim Script
gpl2
2,715
" Vim syntax file " Language: Debian changelog files " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> " Last Change: 2012 April 29 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim " Standard syntax initialization if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Case doesn't matter for us syn case ignore " Define some common expressions we can use later on syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\=" syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|%(squeeze)-%(backports%(-sloppy)=|volatile)|%(hardy|lucid|natty|oneiric|precise|quantal)%(-%(security|proposed|updates|backports|commercial|partner))=)+" syn match debchangelogVersion contained "(.\{-})" syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+" syn match debchangelogEmail contained "<.\{-}>" " Define the entries that make up the changelog syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline " Associate our matches and regions with pretty colours if version >= 508 || !exists("did_debchangelog_syn_inits") if version < 508 let did_debchangelog_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink debchangelogHeader Error HiLink debchangelogFooter Identifier HiLink debchangelogEntry Normal HiLink debchangelogCloses Statement HiLink debchangelogLP Statement HiLink debchangelogUrgency Identifier HiLink debchangelogName Comment HiLink debchangelogVersion Identifier HiLink debchangelogTarget Identifier HiLink debchangelogEmail Special delcommand HiLink endif let b:current_syntax = "debchangelog" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/debchangelog.vim
Vim Script
gpl2
2,525
" Vim syntax file " Language: PDF " Maintainer: Tim Pope <vimNOSPAM@tpope.info> " Last Change: 2007 Dec 16 if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'pdf' endif syn include @pdfXML syntax/xml.vim syn case match syn cluster pdfObjects contains=pdfBoolean,pdfConstant,pdfNumber,pdfFloat,pdfName,pdfHexString,pdfString,pdfArray,pdfHash,pdfReference,pdfComment syn keyword pdfBoolean true false contained syn keyword pdfConstant null contained syn match pdfNumber "[+-]\=\<\d\+\>" syn match pdfFloat "[+-]\=\<\%(\d\+\.\|\d*\.\d\+\)\>" contained syn match pdfNameError "#\X\|#\x\X\|#00" contained containedin=pdfName syn match pdfSpecialChar "#\x\x" contained containedin=pdfName syn match pdfName "/[^[:space:]\[\](){}<>/]*" contained syn match pdfHexError "[^[:space:][:xdigit:]<>]" contained "syn match pdfHexString "<\s*\x[^<>]*\x\s*>" contained contains=pdfHexError "syn match pdfHexString "<\s*\x\=\s*>" contained syn region pdfHexString matchgroup=pdfDelimiter start="<<\@!" end=">" contained contains=pdfHexError syn match pdfStringError "\\." contained containedin=pdfString syn match pdfSpecialChar "\\\%(\o\{1,3\}\|[nrtbf()\\]\)" contained containedin=pdfString syn region pdfString matchgroup=pdfDelimiter start="\\\@<!(" end="\\\@<!)" contains=pdfString syn region pdfArray matchgroup=pdfOperator start="\[" end="\]" contains=@pdfObjects contained syn region pdfHash matchgroup=pdfOperator start="<<" end=">>" contains=@pdfObjects contained syn match pdfReference "\<\d\+\s\+\d\+\s\+R\>" "syn keyword pdfOperator R contained containedin=pdfReference syn region pdfObject matchgroup=pdfType start="\<obj\>" end="\<endobj\>" contains=@pdfObjects syn region pdfObject matchgroup=pdfType start="\<obj\r\=\n" end="\<endobj\>" contains=@pdfObjects fold " Do these twice. The ones with only newlines are foldable syn region pdfStream matchgroup=pdfType start="\<stream\r\=\n" end="endstream\s*\%(\r\|\n\|\r\n\)" contained containedin=pdfObject syn region pdfXMLStream matchgroup=pdfType start="\<stream\r\=\n\_s*\%(<?\)\@=" end="endstream\s*\%(\r\|\n\|\r\n\)" contained containedin=pdfObject contains=@pdfXML syn region pdfStream matchgroup=pdfType start="\<stream\n" end="endstream\s*\%(\r\|\n\|\r\n\)" contained containedin=pdfObject fold syn region pdfXMLStream matchgroup=pdfType start="\<stream\n\_s*\%(<?\)\@=" end="endstream\s*\%(\r\|\n\|\r\n\)" contained containedin=pdfObject contains=@pdfXML fold syn region pdfPreProc start="\<xref\%(\r\|\n\|\r\n\)" end="^trailer\%(\r\|\n\|\r\n\)" skipwhite skipempty nextgroup=pdfHash contains=pdfNumber fold syn keyword pdfPreProc startxref syn match pdfComment "%.*\%(\r\|\n\)" contains=pdfPreProc syn match pdfPreProc "^%\%(%EOF\|PDF-\d\.\d\)\(\r\|\n\)" hi def link pdfOperator Operator hi def link pdfNumber Number hi def link pdfFloat Float hi def link pdfBoolean Boolean hi def link pdfConstant Constant hi def link pdfName Identifier hi def link pdfNameError pdfStringError hi def link pdfHexString pdfString hi def link pdfHexError pdfStringError hi def link pdfString String hi def link pdfStringError Error hi def link pdfSpecialChar SpecialChar hi def link pdfDelimiter Delimiter hi def link pdfType Type hi def link pdfReference Tag hi def link pdfStream NonText hi def link pdfPreProc PreProc hi def link pdfComment Comment let b:current_syntax = "pdf"
zyz2011-vim
runtime/syntax/pdf.vim
Vim Script
gpl2
3,539
" Vim syntax file " Language: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.sass " Last Change: 2010 Aug 9 if exists("b:current_syntax") finish endif runtime! syntax/css.vim syn case ignore syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp syn cluster sassCssAttributes contains=css.*Attr,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP syn match sassProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+:" contains=css.*Prop skipwhite nextgroup=sassCssAttribute contained containedin=sassDefinition syn match sassProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute syn match sassProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute syn match sassCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@sassCssAttributes,sassVariable,sassFunction,sassInterpolation syn match sassDefault "!default\>" contained syn match sassVariable "!\%(important\>\|default\>\)\@![[:alnum:]_-]\+" syn match sassVariable "$[[:alnum:]_-]\+" syn match sassVariableAssignment "\%([!$][[:alnum:]_-]\+\s*\)\@<=\%(||\)\==" nextgroup=sassCssAttribute skipwhite syn match sassVariableAssignment "\%([!$][[:alnum:]_-]\+\s*\)\@<=:" nextgroup=sassCssAttribute skipwhite syn match sassFunction "\<\%(rgb\|rgba\|red\|green\|blue\|mix\)\>(\@=" contained syn match sassFunction "\<\%(hsl\|hsla\|hue\|saturation\|lightness\|adjust-hue\|lighten\|darken\|saturate\|desaturate\|grayscale\|complement\)\>(\@=" contained syn match sassFunction "\<\%(alpha\|opacity\|rgba\|opacify\|fade-in\|transparentize\|fade-out\)\>(\@=" contained syn match sassFunction "\<\%(unquote\|quote\)\>(\@=" contained syn match sassFunction "\<\%(percentage\|round\|ceil\|floor\|abs\)\>(\@=" contained syn match sassFunction "\<\%(type-of\|unit\|unitless\|comparable\)\>(\@=" contained syn region sassInterpolation matchgroup=sassInterpolationDelimiter start="#{" end="}" contains=@sassCssAttributes,sassVariable,sassFunction containedin=cssStringQ,cssStringQQ,sassProperty syn match sassMixinName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute syn match sassMixin "^=" nextgroup=sassMixinName syn match sassMixin "\%([{};]\s*\|^\s*\)\@<=@mixin" nextgroup=sassMixinName skipwhite syn match sassMixing "^\s\+\zs+" nextgroup=sassMixinName syn match sassMixing "\%([{};]\s*\|^\s*\)\@<=@include" nextgroup=sassMixinName skipwhite syn match sassExtend "\%([{};]\s*\|^\s*\)\@<=@extend" syn match sassEscape "^\s*\zs\\" syn match sassIdChar "#[[:alnum:]_-]\@=" nextgroup=sassId syn match sassId "[[:alnum:]_-]\+" contained syn match sassClassChar "\.[[:alnum:]_-]\@=" nextgroup=sassClass syn match sassClass "[[:alnum:]_-]\+" contained syn match sassAmpersand "&" " TODO: Attribute namespaces " TODO: Arithmetic (including strings and concatenation) syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssURL,cssUnicodeEscape,cssMediaType syn region sassDebugLine end=";\|$" matchgroup=sassDebug start="@debug\>" contains=@sassCssAttributes,sassVariable,sassFunction syn region sassWarnLine end=";\|$" matchgroup=sassWarn start="@warn\>" contains=@sassCssAttributes,sassVariable,sassFunction syn region sassControlLine matchgroup=sassControl start="@\%(if\|else\%(\s\+if\)\=\|while\|for\)\>" end="[{};]\@=\|$" contains=sassFor,@sassCssAttributes,sassVariable,sassFunction syn keyword sassFor from to through contained syn keyword sassTodo FIXME NOTE TODO OPTIMIZE XXX contained syn region sassComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell syn region sassCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell hi def link sassCssComment sassComment hi def link sassComment Comment hi def link sassDefault cssImportant hi def link sassVariable Identifier hi def link sassFunction Function hi def link sassMixing PreProc hi def link sassMixin PreProc hi def link sassExtend PreProc hi def link sassTodo Todo hi def link sassInclude Include hi def link sassDebug sassControl hi def link sassWarn sassControl hi def link sassControl PreProc hi def link sassFor PreProc hi def link sassEscape Special hi def link sassIdChar Special hi def link sassClassChar Special hi def link sassInterpolationDelimiter Delimiter hi def link sassAmpersand Character hi def link sassId Identifier hi def link sassClass Type let b:current_syntax = "sass" " vim:set sw=2:
zyz2011-vim
runtime/syntax/sass.vim
Vim Script
gpl2
5,200
" Vim syntax file " Language: Perl POD format " Maintainer: Andy Lester <andy@petdance.com> " Previously: Scott Bigham <dsb@killerbunnies.org> " URL: http://github.com/petdance/vim-perl " Last Change: 2009-08-14 " To add embedded POD documentation highlighting to your syntax file, add " the commands: " " syn include @Pod <sfile>:p:h/pod.vim " syn region myPOD start="^=pod" start="^=head" end="^=cut" keepend contained contains=@Pod " " and add myPod to the contains= list of some existing region, probably a " comment. The "keepend" flag is needed because "=cut" is matched as a " pattern in its own right. " Remove any old syntax stuff hanging around (this is suppressed " automatically by ":syn include" if necessary). " 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") finish endif " POD commands syn match podCommand "^=head[1234]" nextgroup=podCmdText contains=@NoSpell syn match podCommand "^=item" nextgroup=podCmdText contains=@NoSpell syn match podCommand "^=over" nextgroup=podOverIndent skipwhite contains=@NoSpell syn match podCommand "^=back" contains=@NoSpell syn match podCommand "^=cut" contains=@NoSpell syn match podCommand "^=pod" contains=@NoSpell syn match podCommand "^=for" nextgroup=podForKeywd skipwhite contains=@NoSpell syn match podCommand "^=begin" nextgroup=podForKeywd skipwhite contains=@NoSpell syn match podCommand "^=end" nextgroup=podForKeywd skipwhite contains=@NoSpell " Text of a =head1, =head2 or =item command syn match podCmdText ".*$" contained contains=podFormat,@NoSpell " Indent amount of =over command syn match podOverIndent "\d\+" contained contains=@NoSpell " Formatter identifier keyword for =for, =begin and =end commands syn match podForKeywd "\S\+" contained contains=@NoSpell " An indented line, to be displayed verbatim syn match podVerbatimLine "^\s.*$" contains=@NoSpell " Inline textual items handled specially by POD syn match podSpecial "\(\<\|&\)\I\i*\(::\I\i*\)*([^)]*)" contains=@NoSpell syn match podSpecial "[$@%]\I\i*\(::\I\i*\)*\>" contains=@NoSpell " Special formatting sequences syn region podFormat start="[IBSCLFX]<[^<]"me=e-1 end=">" oneline contains=podFormat,@NoSpell syn region podFormat start="[IBSCLFX]<<\s" end="\s>>" oneline contains=podFormat,@NoSpell syn match podFormat "Z<>" syn match podFormat "E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2,@NoSpell syn match podEscape "\I\i*>"me=e-1 contained contains=@NoSpell syn match podEscape2 "\d\+>"me=e-1 contained contains=@NoSpell " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_pod_syntax_inits") if version < 508 let did_pod_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink podCommand Statement HiLink podCmdText String HiLink podOverIndent Number HiLink podForKeywd Identifier HiLink podFormat Identifier HiLink podVerbatimLine PreProc HiLink podSpecial Identifier HiLink podEscape String HiLink podEscape2 Number delcommand HiLink endif let b:current_syntax = "pod" " vim: ts=8
zyz2011-vim
runtime/syntax/pod.vim
Vim Script
gpl2
3,439
" Vim syntax file " Language: wDiff (wordwise diff) " Maintainer: Gerfried Fuchs <alfie@ist.org> " Last Change: 25 Apr 2001 " URL: http://alfie.ist.org/vim/syntax/wdiff.vim " " Comments are very welcome - but please make sure that you are commenting on " the latest version of this file. " SPAM is _NOT_ welcome - be ready to be reported! " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syn clear elseif exists("b:current_syntax") finish endif syn region wdiffOld start=+\[-+ end=+-]+ syn region wdiffNew start="{+" end="+}" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_wdiff_syn_inits") let did_wdiff_syn_inits = 1 if version < 508 let did_wdiff_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink wdiffOld Special HiLink wdiffNew Identifier delcommand HiLink endif let b:current_syntax = "wdiff"
zyz2011-vim
runtime/syntax/wdiff.vim
Vim Script
gpl2
1,151
" Vim syntax file " Language: gpg(1) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2010-10-14 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=- syn keyword gpgTodo contained FIXME TODO XXX NOTE syn region gpgComment contained display oneline start='#' end='$' \ contains=gpgTodo,gpgID,@Spell syn match gpgID contained display '\<\(0x\)\=\x\{8,}\>' syn match gpgBegin display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgCommand syn keyword gpgCommand contained skipwhite nextgroup=gpgArg \ check-sigs decrypt decrypt-files delete-key \ delete-secret-and-public-key delete-secret-key \ edit-key encrypt-files export export-all \ export-ownertrust export-secret-keys \ export-secret-subkeys fast-import fingerprint \ gen-prime gen-random import import-ownertrust \ list-keys list-public-keys list-secret-keys \ list-sigs lsign-key nrsign-key print-md print-mds \ recv-keys search-keys send-keys sign-key verify \ verify-files syn keyword gpgCommand contained skipwhite nextgroup=gpgArgError \ check-trustdb clearsign desig-revoke detach-sign \ encrypt gen-key gen-revoke help list-packets \ rebuild-keydb-caches sign store symmetric \ update-trustdb version warranty syn keyword gpgOption contained skipwhite nextgroup=gpgArg \ attribute-fd cert-digest-algo charset cipher-algo \ command-fd comment completes-needed compress \ compress-algo debug default-cert-check-level \ default-key default-preference-list \ default-recipient digest-algo disable-cipher-algo \ disable-pubkey-algo encrypt-to exec-path \ export-options group homedir import-options \ keyring keyserver keyserver-options load-extension \ local-user logger-fd marginals-needed max-cert-depth \ notation-data options output override-session-key \ passphrase-fd personal-cipher-preferences \ personal-compress-preferences \ personal-digest-preferences photo-viewer \ recipient s2k-cipher-algo s2k-digest-algo s2k-mode \ secret-keyring set-filename set-policy-url status-fd \ trusted-key verify-options keyid-format list-options syn keyword gpgOption contained skipwhite nextgroup=gpgArgError \ allow-freeform-uid allow-non-selfsigned-uid \ allow-secret-key-import always-trust \ armor ask-cert-expire ask-sig-expire \ auto-check-trustdb batch debug-all default-comment \ default-recipient-self dry-run emit-version \ emulate-md-encode-bug enable-special-filenames \ escape-from-lines expert fast-list-mode \ fixed-list-mode for-your-eyes-only \ force-mdc force-v3-sigs force-v4-certs \ gpg-agent-info ignore-crc-error ignore-mdc-error \ ignore-time-conflict ignore-valid-from interactive \ list-only lock-multiple lock-never lock-once \ merge-only no no-allow-non-selfsigned-uid \ no-armor no-ask-cert-expire no-ask-sig-expire \ no-auto-check-trustdb no-batch no-comment \ no-default-keyring no-default-recipient \ no-encrypt-to no-expensive-trust-checks \ no-expert no-for-your-eyes-only no-force-v3-sigs \ no-force-v4-certs no-greeting no-literal \ no-mdc-warning no-options no-permission-warning \ no-pgp2 no-pgp6 no-pgp7 no-random-seed-file \ no-secmem-warning no-show-notation no-show-photos \ no-show-policy-url no-sig-cache no-sig-create-check \ no-sk-comments no-tty no-utf8-strings no-verbose \ no-version not-dash-escaped openpgp pgp2 \ pgp6 pgp7 preserve-permissions quiet rfc1991 \ set-filesize show-keyring show-notation show-photos \ show-policy-url show-session-key simple-sk-checksum \ sk-comments skip-verify textmode throw-keyid \ try-all-secrets use-agent use-embedded-filename \ utf8-strings verbose with-colons with-fingerprint \ with-key-data yes syn match gpgArg contained display '\S\+\(\s\+\S\+\)*' contains=gpgID syn match gpgArgError contained display '\S\+\(\s\+\S\+\)*' hi def link gpgComment Comment hi def link gpgTodo Todo hi def link gpgID Number hi def link gpgOption Keyword hi def link gpgCommand Error hi def link gpgArgError Error let b:current_syntax = "gpg" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/gpg.vim
Vim Script
gpl2
5,579
" Vim syntax file " Language: Dylan " Authors: Justus Pendleton <justus@acm.org> " Last Change: Fri Sep 29 13:53:27 PDT 2000 " " 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") finish endif syn case ignore syn region dylanintrInfo matchgroup=Statement start="^" end=":" oneline syn match dylanintrInterface "define interface" syn match dylanintrClass "<.*>" syn region dylanintrType start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region dylanintrIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match dylanintrIncluded contained "<[^>]*>" syn match dylanintrInclude "^\s*#\s*include\>\s*["<]" contains=intrIncluded "syn keyword intrMods pointer struct " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_dylan_intr_syntax_inits") if version < 508 let did_dylan_intr_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink dylanintrInfo Special HiLink dylanintrInterface Operator HiLink dylanintrMods Type HiLink dylanintrClass StorageClass HiLink dylanintrType Type HiLink dylanintrIncluded String HiLink dylanintrInclude Include delcommand HiLink endif let b:current_syntax = "dylanintr" " vim:ts=8
zyz2011-vim
runtime/syntax/dylanintr.vim
Vim Script
gpl2
1,487
" Vim syntax file " Language: OpenSSH client configuration file (ssh_config) " Author: David Necas (Yeti) " Maintainer: Leonard Ehrenfried <leonard.ehrenfried@web.de> " Last Change: 2012 Feb 24 " SSH Version: 5.9p1 " " Setup if version >= 600 if exists("b:current_syntax") finish endif else syntax clear endif if version >= 600 setlocal iskeyword=_,-,a-z,A-Z,48-57 else set iskeyword=_,-,a-z,A-Z,48-57 endif " case on syn case match " Comments syn match sshconfigComment "^#.*$" contains=sshconfigTodo syn match sshconfigComment "\s#.*$" contains=sshconfigTodo syn keyword sshconfigTodo TODO FIXME NOTE contained " Constants syn keyword sshconfigYesNo yes no ask syn keyword sshconfigYesNo any auto syn keyword sshconfigYesNo force autoask none syn keyword sshconfigCipher 3des blowfish syn keyword sshconfigCiphers aes128-cbc 3des-cbc blowfish blowfish-cbc cast128-cbc syn keyword sshconfigCiphers aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr syn keyword sshconfigCiphers arcfour arcfour128 arcfour256 cast128-cbc syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 syn keyword sshconfigMAC hmac-md5-96 syn keyword sshconfigMAC hmac-sha2-256 hmac-sha2-256-96 hmac-sha2-512 syn keyword sshconfigMAC hmac-sha2-512-96 syn match sshconfigMAC "\<umac-64@openssh\.com\>" syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp256-cert-v01@openssh\.com\>" syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp384-cert-v01@openssh\.com\>" syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp521-cert-v01@openssh\.com\>" syn match sshconfigHostKeyAlg "\<ssh-rsa-cert-v01@openssh\.com\>" syn match sshconfigHostKeyAlg "\<ssh-dss-cert-v01@openssh\.com\>" syn match sshconfigHostKeyAlg "\<ssh-rsa-cert-v00@openssh\.com\>" syn match sshconfigHostKeyAlg "\<ssh-dss-cert-v00@openssh\.com\>" syn keyword sshconfigHostKeyAlg ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 syn keyword sshconfigPreferredAuth hostbased publickey password gssapi-with-mic syn keyword sshconfigPreferredAuth keyboard-interactive syn keyword sshconfigLogLevel QUIET FATAL ERROR INFO VERBOSE syn keyword sshconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3 syn keyword sshconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1 syn keyword sshconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 syn keyword sshconfigAddressFamily inet inet6 syn match sshconfigIPQoS "af1[1234]" syn match sshconfigIPQoS "af2[23]" syn match sshconfigIPQoS "af3[123]" syn match sshconfigIPQoS "af4[123]" syn match sshconfigIPQoS "cs[0-7]" syn keyword sshconfigIPQoS ef lowdelay throughput reliability syn keyword sshconfigKbdInteractive bsdauth pam skey syn keyword sshconfigKexAlgo ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha256 syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha1 syn keyword sshconfigKexAlgo diffie-hellman-group14-sha1 syn keyword sshconfigKexAlgo diffie-hellman-group1-sha1 syn keyword sshconfigTunnel point-to-point ethernet syn match sshconfigVar "%[rhplLdun]\>" syn match sshconfigSpecial "[*?]" syn match sshconfigNumber "\d\+" syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>" syn match sshconfigHostPort "\(Host \)\@<=.\+" syn match sshconfigHostPort "\(HostName \)\@<=.\+" " case off syn case ignore " Keywords syn keyword sshconfigHostSect Host syn keyword sshconfigKeyword AddressFamily syn keyword sshconfigKeyword BatchMode syn keyword sshconfigKeyword BindAddress syn keyword sshconfigKeyword ChallengeResponseAuthentication syn keyword sshconfigKeyword CheckHostIP syn keyword sshconfigKeyword Cipher syn keyword sshconfigKeyword Ciphers syn keyword sshconfigKeyword ClearAllForwardings syn keyword sshconfigKeyword Compression syn keyword sshconfigKeyword CompressionLevel syn keyword sshconfigKeyword ConnectTimeout syn keyword sshconfigKeyword ConnectionAttempts syn keyword sshconfigKeyword ControlMaster syn keyword sshconfigKeyword ControlPath syn keyword sshconfigKeyword ControlPersist syn keyword sshconfigKeyword DynamicForward syn keyword sshconfigKeyword EnableSSHKeysign syn keyword sshconfigKeyword EscapeChar syn keyword sshconfigKeyword ExitOnForwardFailure syn keyword sshconfigKeyword ForwardAgent syn keyword sshconfigKeyword ForwardX11 syn keyword sshconfigKeyword ForwardX11Timeout syn keyword sshconfigKeyword ForwardX11Trusted syn keyword sshconfigKeyword GSSAPIAuthentication syn keyword sshconfigKeyword GSSAPIClientIdentity syn keyword sshconfigKeyword GSSAPIDelegateCredentials syn keyword sshconfigKeyword GSSAPIKeyExchange syn keyword sshconfigKeyword GSSAPIRenewalForcesRekey syn keyword sshconfigKeyword GSSAPIServerIdentity syn keyword sshconfigKeyword GSSAPITrustDNS syn keyword sshconfigKeyword GSSAPITrustDns syn keyword sshconfigKeyword GatewayPorts syn keyword sshconfigKeyword GlobalKnownHostsFile syn keyword sshconfigKeyword HashKnownHosts syn keyword sshconfigKeyword HostKeyAlgorithms syn keyword sshconfigKeyword HostKeyAlias syn keyword sshconfigKeyword HostName syn keyword sshconfigKeyword HostbasedAuthentication syn keyword sshconfigKeyword IPQoS syn keyword sshconfigKeyword IdentitiesOnly syn keyword sshconfigKeyword IdentityFile syn keyword sshconfigKeyword KbdInteractiveAuthentication syn keyword sshconfigKeyword KbdInteractiveDevices syn keyword sshconfigKeyword KexAlgorithms syn keyword sshconfigKeyword LocalCommand syn keyword sshconfigKeyword LocalForward syn keyword sshconfigKeyword LogLevel syn keyword sshconfigKeyword MACs syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost syn keyword sshconfigKeyword NumberOfPasswordPrompts syn keyword sshconfigKeyword PKCS11Provider syn keyword sshconfigKeyword PasswordAuthentication syn keyword sshconfigKeyword PermitLocalCommand syn keyword sshconfigKeyword Port syn keyword sshconfigKeyword PreferredAuthentications syn keyword sshconfigKeyword Protocol syn keyword sshconfigKeyword ProxyCommand syn keyword sshconfigKeyword PubkeyAuthentication syn keyword sshconfigKeyword RSAAuthentication syn keyword sshconfigKeyword RekeyLimit syn keyword sshconfigKeyword RemoteForward syn keyword sshconfigKeyword RequestTTY syn keyword sshconfigKeyword RhostsRSAAuthentication syn keyword sshconfigKeyword SendEnv syn keyword sshconfigKeyword ServerAliveCountMax syn keyword sshconfigKeyword ServerAliveInterval syn keyword sshconfigKeyword SmartcardDevice syn keyword sshconfigKeyword StrictHostKeyChecking syn keyword sshconfigKeyword TCPKeepAlive syn keyword sshconfigKeyword Tunnel syn keyword sshconfigKeyword TunnelDevice syn keyword sshconfigKeyword UseBlacklistedKeys syn keyword sshconfigKeyword UsePrivilegedPort syn keyword sshconfigKeyword User syn keyword sshconfigKeyword UserKnownHostsFile syn keyword sshconfigKeyword VerifyHostKeyDNS syn keyword sshconfigKeyword VisualHostKey syn keyword sshconfigKeyword XAuthLocation " Define the default highlighting if version >= 508 || !exists("did_sshconfig_syntax_inits") if version < 508 let did_sshconfig_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink sshconfigComment Comment HiLink sshconfigTodo Todo HiLink sshconfigHostPort sshconfigConstant HiLink sshconfigNumber sshconfigConstant HiLink sshconfigConstant Constant HiLink sshconfigYesNo sshconfigEnum HiLink sshconfigCipher sshconfigEnum HiLink sshconfigCiphers sshconfigEnum HiLink sshconfigMAC sshconfigEnum HiLink sshconfigHostKeyAlg sshconfigEnum HiLink sshconfigLogLevel sshconfigEnum HiLink sshconfigSysLogFacility sshconfigEnum HiLink sshconfigAddressFamily sshconfigEnum HiLink sshconfigIPQoS sshconfigEnum HiLink sshconfigKbdInteractive sshconfigEnum HiLink sshconfigKexAlgo sshconfigEnum HiLink sshconfigTunnel sshconfigEnum HiLink sshconfigPreferredAuth sshconfigEnum HiLink sshconfigVar sshconfigEnum HiLink sshconfigEnum Identifier HiLink sshconfigSpecial Special HiLink sshconfigKeyword Keyword HiLink sshconfigHostSect Type delcommand HiLink endif let b:current_syntax = "sshconfig" " vim:set ts=8 sw=2 sts=2:
zyz2011-vim
runtime/syntax/sshconfig.vim
Vim Script
gpl2
8,505
" Vim syntax file " Language: MS Message Text files (*.mc) " Maintainer: Kevin Locke <kwl7@cornell.edu> " Last Change: 2008 April 09 " Location: http://kevinlocke.name/programs/vim/syntax/msmessages.vim " See format description at <http://msdn2.microsoft.com/en-us/library/aa385646.aspx> " This file is based on the rc.vim and c.vim " 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") finish endif " Common MS Messages keywords syn case ignore syn keyword msmessagesIdentifier MessageIdTypedef syn keyword msmessagesIdentifier SeverityNames syn keyword msmessagesIdentifier FacilityNames syn keyword msmessagesIdentifier LanguageNames syn keyword msmessagesIdentifier OutputBase syn keyword msmessagesIdentifier MessageId syn keyword msmessagesIdentifier Severity syn keyword msmessagesIdentifier Facility syn keyword msmessagesIdentifier OutputBase syn match msmessagesIdentifier /\<SymbolicName\>/ nextgroup=msmessagesIdentEq skipwhite syn match msmessagesIdentEq transparent /=/ nextgroup=msmessagesIdentDef skipwhite contained syn match msmessagesIdentDef display /\w\+/ contained " Note: The Language keyword is highlighted as part of an msmessagesLangEntry " Set value syn case match syn region msmessagesSet start="(" end=")" transparent fold contains=msmessagesName keepend syn match msmessagesName /\w\+/ nextgroup=msmessagesSetEquals skipwhite contained syn match msmessagesSetEquals /=/ display transparent nextgroup=msmessagesNumVal skipwhite contained syn match msmessagesNumVal display transparent "\<\d\|\.\d" contains=msmessagesNumber,msmessagesFloat,msmessagesOctalError,msmessagesOctal nextgroup=msmessagesValSep syn match msmessagesValSep /:/ display nextgroup=msmessagesNameDef contained syn match msmessagesNameDef /\w\+/ display contained " Comments are converted to C source (by removing leading ;) " So we highlight the comments as C syn include @msmessagesC syntax/c.vim unlet b:current_syntax syn region msmessagesCComment matchgroup=msmessagesComment start=/;/ end=/$/ contains=@msmessagesC keepend " String and Character constants " Highlight special characters (those which have a escape) differently syn case ignore syn region msmessagesLangEntry start=/\<Language\>\s*=\s*\S\+\s*$/hs=e+1 end=/^\./ contains=msmessagesFormat,msmessagesLangEntryEnd,msmessagesLanguage keepend syn match msmessagesLanguage /\<Language\(\s*=\)\@=/ contained syn match msmessagesLangEntryEnd display /^\./ contained syn case match syn match msmessagesFormat display /%[1-9]\d\?\(![-+0 #]*\d*\(\.\d\+\)\?\(h\|l\|ll\|I\|I32\|I64\)\?[aAcCdeEfgGinopsSuxX]!\)\?/ contained syn match msmessagesFormat display /%[0.%\\br]/ contained syn match msmessagesFormat display /%!\(\s\)\@=/ contained " Integer number, or floating point number without a dot and with "f". " Copied from c.vim syn case ignore "(long) integer syn match msmessagesNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" "hex number syn match msmessagesNumber display contained "\<0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" " Flag the first zero of an octal number as something special syn match msmessagesOctal display contained "\<0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=msmessagesOctalZero syn match msmessagesOctalZero display contained "\<0" " flag an octal number with wrong digits syn match msmessagesOctalError display contained "\<0\o*[89]\d*" syn match msmessagesFloat display contained "\d\+f" "floating point number, with dot, optional exponent syn match msmessagesFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" "floating point number, starting with a dot, optional exponent syn match msmessagesFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match msmessagesFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" "hexadecimal floating point number, optional leading digits, with dot, with exponent syn match msmessagesFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" "hexadecimal floating point number, with leading digits, optional dot, with exponent syn match msmessagesFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" " Types (used in MessageIdTypedef statement) syn case match syn keyword msmessagesType int long short char syn keyword msmessagesType signed unsigned syn keyword msmessagesType size_t ssize_t sig_atomic_t syn keyword msmessagesType int8_t int16_t int32_t int64_t syn keyword msmessagesType uint8_t uint16_t uint32_t uint64_t syn keyword msmessagesType int_least8_t int_least16_t int_least32_t int_least64_t syn keyword msmessagesType uint_least8_t uint_least16_t uint_least32_t uint_least64_t syn keyword msmessagesType int_fast8_t int_fast16_t int_fast32_t int_fast64_t syn keyword msmessagesType uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t syn keyword msmessagesType intptr_t uintptr_t syn keyword msmessagesType intmax_t uintmax_t " Add some Windows datatypes that will be common in msmessages files syn keyword msmessagesType BYTE CHAR SHORT SIZE_T SSIZE_T TBYTE TCHAR UCHAR USHORT syn keyword msmessagesType DWORD DWORDLONG DWORD32 DWORD64 syn keyword msmessagesType INT INT32 INT64 UINT UINT32 UINT64 syn keyword msmessagesType LONG LONGLONG LONG32 LONG64 syn keyword msmessagesType ULONG ULONGLONG ULONG32 ULONG64 " Sync to language entries, since they should be most common syn sync match msmessagesLangSync grouphere msmessagesLangEntry "\<Language\s*=" syn sync match msmessagesLangEndSync grouphere NONE "^\." " Define the default highlighting. hi def link msmessagesNumber Number hi def link msmessagesOctal Number hi def link msmessagesFloat Float hi def link msmessagesOctalError msmessagesError hi def link msmessagesSetError msmessagesError hi def link msmessagesError Error hi def link msmessagesLangEntry String hi def link msmessagesLangEntryEnd Special hi def link msmessagesComment Comment hi def link msmessagesFormat msmessagesSpecial hi def link msmessagesSpecial SpecialChar hi def link msmessagesType Type hi def link msmessagesIdentifier Identifier hi def link msmessagesLanguage msmessagesIdentifier hi def link msmessagesName msmessagesIdentifier hi def link msmessagesNameDef Macro hi def link msmessagesIdentDef Macro hi def link msmessagesValSep Special hi def link msmessagesNameErr Error let b:current_syntax = "msmessages" " vim: ts=8
zyz2011-vim
runtime/syntax/msmessages.vim
Vim Script
gpl2
6,413
" Vim syntax file " Language: Yacc " Maintainer: Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> " Last Change: Aug 12, 2010 " Version: 9 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Options: {{{1 " g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C " --------------------------------------------------------------------- " this version of syntax/yacc.vim requires 6.0 or later if version < 600 finish endif if exists("b:current_syntax") syntax clear endif " --------------------------------------------------------------------- " Folding Support {{{1 if has("folding") com! -nargs=+ HiFold <args> fold else com! -nargs=+ HiFold <args> endif " --------------------------------------------------------------------- " Read the C syntax to start with {{{1 if exists("g:yacc_uses_cpp") syn include @yaccCode <sfile>:p:h/cpp.vim else syn include @yaccCode <sfile>:p:h/c.vim endif " --------------------------------------------------------------------- " Yacc Clusters: {{{1 syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam,yaccParseOption syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString " --------------------------------------------------------------------- " Yacc Sections: {{{1 HiFold syn region yaccInit start='.'ms=s-1,rs=s-1 matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=@yaccInitCluster nextgroup=yaccRules skipwhite skipempty contained HiFold syn region yaccInit2 start='\%^.'ms=s-1,rs=s-1 matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=@yaccInitCluster nextgroup=yaccRules skipwhite skipempty HiFold syn region yaccHeader2 matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty contained HiFold syn region yaccHeader matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty HiFold syn region yaccRules matchgroup=yaccSectionSep start='^%%$' end='^%%$'me=e-2,re=e-2 contains=@yaccRulesCluster nextgroup=yaccEndCode skipwhite skipempty contained HiFold syn region yaccEndCode matchgroup=yaccSectionSep start='^%%$' end='\%$' contains=@yaccCode contained " --------------------------------------------------------------------- " Yacc Commands: {{{1 syn match yaccDefines '^%define\s\+.*$' syn match yaccParseParam '%\(parse\|lex\)-param\>' skipwhite nextgroup=yaccParseParamStr syn match yaccParseOption '%\%(api\.pure\|pure-parser\|locations\|error-verbose\)\>' syn region yaccParseParamStr contained matchgroup=Delimiter start='{' end='}' contains=cStructure syn match yaccDelim "[:|]" contained syn match yaccOper "@\d\+" contained syn match yaccKey "^\s*%\(token\|type\|left\|right\|start\|ident\|nonassoc\)\>" contained syn match yaccKey "\s%\(prec\|expect\)\>" contained syn match yaccKey "\$\(<[a-zA-Z_][a-zA-Z_0-9]*>\)\=[\$0-9]\+" contained syn keyword yaccKeyActn yyerrok yyclearin contained syn match yaccUnionStart "^%union" skipwhite skipnl nextgroup=yaccUnion contained HiFold syn region yaccUnion matchgroup=yaccCurly start="{" matchgroup=yaccCurly end="}" contains=@yaccCode contained syn match yaccBrkt "[<>]" contained syn match yaccType "<[a-zA-Z_][a-zA-Z0-9_]*>" contains=yaccBrkt contained HiFold syn region yaccNonterminal start="^\s*\a\w*\ze\_s*\(/\*\_.\{-}\*/\)\=\_s*:" matchgroup=yaccDelim end=";" matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=yaccAction,yaccDelim,yaccString,yaccComment contained syn region yaccComment start="/\*" end="\*/" syn match yaccString "'[^']*'" contained " --------------------------------------------------------------------- " I'd really like to highlight just the outer {}. Any suggestions??? {{{1 syn match yaccCurlyError "[{}]" HiFold syn region yaccAction matchgroup=yaccCurly start="{" end="}" contains=@yaccCode contained " --------------------------------------------------------------------- " Yacc synchronization: {{{1 syn sync fromstart " --------------------------------------------------------------------- " Define the default highlighting. {{{1 if !exists("did_yacc_syn_inits") command -nargs=+ HiLink hi def link <args> " Internal yacc highlighting links {{{2 HiLink yaccBrkt yaccStmt HiLink yaccKey yaccStmt HiLink yaccOper yaccStmt HiLink yaccUnionStart yaccKey " External yacc highlighting links {{{2 HiLink yaccComment Comment HiLink yaccCurly Delimiter HiLink yaccCurlyError Error HiLink yaccDefines cDefine HiLink yaccParseParam yaccParseOption HiLink yaccParseOption cDefine HiLink yaccNonterminal Function HiLink yaccDelim Delimiter HiLink yaccKeyActn Special HiLink yaccSectionSep Todo HiLink yaccSep Delimiter HiLink yaccString String HiLink yaccStmt Statement HiLink yaccType Type " since Bram doesn't like my Delimiter :| {{{2 HiLink Delimiter Type delcommand HiLink endif " --------------------------------------------------------------------- " Cleanup: {{{1 delcommand HiFold let b:current_syntax = "yacc" " --------------------------------------------------------------------- " Modelines: {{{1 " vim: ts=15 fdm=marker
zyz2011-vim
runtime/syntax/yacc.vim
Vim Script
gpl2
5,231
" Vim syntax file " Language: XBL 1.0 " Maintainer: Doug Kearns <dougkearns@gmail.com> " Latest Revision: 2007 November 5 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim runtime! syntax/xml.vim unlet b:current_syntax syn include @javascriptTop syntax/javascript.vim unlet b:current_syntax syn region xblJavascript \ matchgroup=xmlCdataStart start=+<!\[CDATA\[+ \ matchgroup=xmlCdataEnd end=+]]>+ \ contains=@javascriptTop keepend extend let b:current_syntax = "xbl" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8
zyz2011-vim
runtime/syntax/xbl.vim
Vim Script
gpl2
568
" Language: tags " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchip@PcampbellAfamily.Mbiz> " Last Change: Sep 06, 2005 " Version: 3 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " 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") finish endif syn match tagName "^[^\t]\+" skipwhite nextgroup=tagPath syn match tagPath "[^\t]\+" contained skipwhite nextgroup=tagAddr contains=tagBaseFile syn match tagBaseFile "[a-zA-Z_]\+[\.a-zA-Z_0-9]*\t"me=e-1 contained syn match tagAddr "\d*" contained skipwhite nextgroup=tagComment syn region tagAddr matchgroup=tagDelim start="/" skip="\(\\\\\)*\\/" matchgroup=tagDelim end="$\|/" oneline contained skipwhite nextgroup=tagComment syn match tagComment ";.*$" contained contains=tagField syn match tagComment "^!_TAG_.*$" syn match tagField contained "[a-z]*:" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_drchip_tags_inits") if version < 508 let did_drchip_tags_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink tagBaseFile PreProc HiLink tagComment Comment HiLink tagDelim Delimiter HiLink tagField Number HiLink tagName Identifier HiLink tagPath PreProc delcommand HiLink endif let b:current_syntax = "tags" " vim: ts=12
zyz2011-vim
runtime/syntax/tags.vim
Vim Script
gpl2
1,575
" Vim syntax file " Language: purify log files " Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com> " Last Change: 2003 May 11 " 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") finish endif " Purify header syn match purifyLogHeader "^\*\*\*\*.*$" " Informational messages syn match purifyLogFIU "^FIU:.*$" syn match purifyLogMAF "^MAF:.*$" syn match purifyLogMIU "^MIU:.*$" syn match purifyLogSIG "^SIG:.*$" syn match purifyLogWPF "^WPF:.*$" syn match purifyLogWPM "^WPM:.*$" syn match purifyLogWPN "^WPN:.*$" syn match purifyLogWPR "^WPR:.*$" syn match purifyLogWPW "^WPW:.*$" syn match purifyLogWPX "^WPX:.*$" " Warning messages syn match purifyLogABR "^ABR:.*$" syn match purifyLogBSR "^BSR:.*$" syn match purifyLogBSW "^BSW:.*$" syn match purifyLogFMR "^FMR:.*$" syn match purifyLogMLK "^MLK:.*$" syn match purifyLogMSE "^MSE:.*$" syn match purifyLogPAR "^PAR:.*$" syn match purifyLogPLK "^PLK:.*$" syn match purifyLogSBR "^SBR:.*$" syn match purifyLogSOF "^SOF:.*$" syn match purifyLogUMC "^UMC:.*$" syn match purifyLogUMR "^UMR:.*$" " Corrupting messages syn match purifyLogABW "^ABW:.*$" syn match purifyLogBRK "^BRK:.*$" syn match purifyLogFMW "^FMW:.*$" syn match purifyLogFNH "^FNH:.*$" syn match purifyLogFUM "^FUM:.*$" syn match purifyLogMRE "^MRE:.*$" syn match purifyLogSBW "^SBW:.*$" " Fatal messages syn match purifyLogCOR "^COR:.*$" syn match purifyLogNPR "^NPR:.*$" syn match purifyLogNPW "^NPW:.*$" syn match purifyLogZPR "^ZPR:.*$" syn match purifyLogZPW "^ZPW:.*$" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_purifyLog_syntax_inits") if version < 508 let did_purifyLog_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink purifyLogFIU purifyLogInformational HiLink purifyLogMAF purifyLogInformational HiLink purifyLogMIU purifyLogInformational HiLink purifyLogSIG purifyLogInformational HiLink purifyLogWPF purifyLogInformational HiLink purifyLogWPM purifyLogInformational HiLink purifyLogWPN purifyLogInformational HiLink purifyLogWPR purifyLogInformational HiLink purifyLogWPW purifyLogInformational HiLink purifyLogWPX purifyLogInformational HiLink purifyLogABR purifyLogWarning HiLink purifyLogBSR purifyLogWarning HiLink purifyLogBSW purifyLogWarning HiLink purifyLogFMR purifyLogWarning HiLink purifyLogMLK purifyLogWarning HiLink purifyLogMSE purifyLogWarning HiLink purifyLogPAR purifyLogWarning HiLink purifyLogPLK purifyLogWarning HiLink purifyLogSBR purifyLogWarning HiLink purifyLogSOF purifyLogWarning HiLink purifyLogUMC purifyLogWarning HiLink purifyLogUMR purifyLogWarning HiLink purifyLogABW purifyLogCorrupting HiLink purifyLogBRK purifyLogCorrupting HiLink purifyLogFMW purifyLogCorrupting HiLink purifyLogFNH purifyLogCorrupting HiLink purifyLogFUM purifyLogCorrupting HiLink purifyLogMRE purifyLogCorrupting HiLink purifyLogSBW purifyLogCorrupting HiLink purifyLogCOR purifyLogFatal HiLink purifyLogNPR purifyLogFatal HiLink purifyLogNPW purifyLogFatal HiLink purifyLogZPR purifyLogFatal HiLink purifyLogZPW purifyLogFatal HiLink purifyLogHeader Comment HiLink purifyLogInformational PreProc HiLink purifyLogWarning Type HiLink purifyLogCorrupting Error HiLink purifyLogFatal Error delcommand HiLink endif let b:current_syntax = "purifylog" " vim:ts=8
zyz2011-vim
runtime/syntax/purifylog.vim
Vim Script
gpl2
3,628
" Vim syntax file " Language: Objective C++ " Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com> " Ex-Maintainer: Anthony Hodsdon <ahodsdon@fastmail.fm> " Last Change: 2007 Oct 29 " 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") finish endif " Read in C++ and ObjC syntax files if version < 600 so <sfile>:p:h/cpp.vim so <sfile>:p:h/objc.vim else runtime! syntax/cpp.vim unlet b:current_syntax runtime! syntax/objc.vim endif syn keyword objCppNonStructure class template namespace transparent contained syn keyword objCppNonStatement new delete friend using transparent contained let b:current_syntax = "objcpp"
zyz2011-vim
runtime/syntax/objcpp.vim
Vim Script
gpl2
786
" Vim syntax file " Language: XSD (XML Schema) " Maintainer: Johannes Zellner <johannes@zellner.org> " Last Change: Tue, 27 Apr 2004 14:54:59 CEST " Filenames: *.xsd " $Id: xsd.vim,v 1.1 2004/06/13 18:20:48 vimboss Exp $ " REFERENCES: " [1] http://www.w3.org/TR/xmlschema-0 " " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif runtime syntax/xml.vim syn cluster xmlTagHook add=xsdElement syn case match syn match xsdElement '\%(xsd:\)\@<=all' syn match xsdElement '\%(xsd:\)\@<=annotation' syn match xsdElement '\%(xsd:\)\@<=any' syn match xsdElement '\%(xsd:\)\@<=anyAttribute' syn match xsdElement '\%(xsd:\)\@<=appInfo' syn match xsdElement '\%(xsd:\)\@<=attribute' syn match xsdElement '\%(xsd:\)\@<=attributeGroup' syn match xsdElement '\%(xsd:\)\@<=choice' syn match xsdElement '\%(xsd:\)\@<=complexContent' syn match xsdElement '\%(xsd:\)\@<=complexType' syn match xsdElement '\%(xsd:\)\@<=documentation' syn match xsdElement '\%(xsd:\)\@<=element' syn match xsdElement '\%(xsd:\)\@<=enumeration' syn match xsdElement '\%(xsd:\)\@<=extension' syn match xsdElement '\%(xsd:\)\@<=field' syn match xsdElement '\%(xsd:\)\@<=group' syn match xsdElement '\%(xsd:\)\@<=import' syn match xsdElement '\%(xsd:\)\@<=include' syn match xsdElement '\%(xsd:\)\@<=key' syn match xsdElement '\%(xsd:\)\@<=keyref' syn match xsdElement '\%(xsd:\)\@<=length' syn match xsdElement '\%(xsd:\)\@<=list' syn match xsdElement '\%(xsd:\)\@<=maxInclusive' syn match xsdElement '\%(xsd:\)\@<=maxLength' syn match xsdElement '\%(xsd:\)\@<=minInclusive' syn match xsdElement '\%(xsd:\)\@<=minLength' syn match xsdElement '\%(xsd:\)\@<=pattern' syn match xsdElement '\%(xsd:\)\@<=redefine' syn match xsdElement '\%(xsd:\)\@<=restriction' syn match xsdElement '\%(xsd:\)\@<=schema' syn match xsdElement '\%(xsd:\)\@<=selector' syn match xsdElement '\%(xsd:\)\@<=sequence' syn match xsdElement '\%(xsd:\)\@<=simpleContent' syn match xsdElement '\%(xsd:\)\@<=simpleType' syn match xsdElement '\%(xsd:\)\@<=union' syn match xsdElement '\%(xsd:\)\@<=unique' hi def link xsdElement Statement " vim: ts=8
zyz2011-vim
runtime/syntax/xsd.vim
Vim Script
gpl2
2,125
" Vim syntax file " Language: indent(1) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2010-01-23 " indent_is_bsd: If exists, will change somewhat to match BSD implementation " " TODO: is the deny-all (a la lilo.vim nice or no?)... " irritating to be wrong to the last char... " would be sweet if right until one char fails if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=-,+ syn match indentError '\S\+' syn keyword indentTodo contained TODO FIXME XXX NOTE syn region indentComment start='/\*' end='\*/' \ contains=indentTodo,@Spell syn region indentComment start='//' skip='\\$' end='$' \ contains=indentTodo,@Spell if !exists("indent_is_bsd") syn match indentOptions '-i\|--indentation-level\|-il\|--indent-level' \ nextgroup=indentNumber skipwhite skipempty endif syn match indentOptions '-\%(bli\|c\%([bl]i\|[dip]\)\=\|di\=\|ip\=\|lc\=\|pp\=i\|sbi\|ts\|-\%(brace-indent\|comment-indentation\|case-brace-indentation\|declaration-comment-column\|continuation-indentation\|case-indentation\|else-endif-column\|line-comments-indentation\|declaration-indentation\|indent-level\|parameter-indentation\|line-length\|comment-line-length\|paren-indentation\|preprocessor-indentation\|struct-brace-indentation\|tab-size\)\)' \ nextgroup=indentNumber skipwhite skipempty syn match indentNumber display contained '\d\+\>' syn match indentOptions '-T' \ nextgroup=indentIdent skipwhite skipempty syn match indentIdent display contained '\h\w*\>' syn keyword indentOptions -bacc --blank-lines-after-ifdefs \ -bad --blank-lines-after-declarations \ -badp --blank-lines-after-procedure-declarations \ -bap --blank-lines-after-procedures \ -bbb --blank-lines-before-block-comments \ -bbo --break-before-boolean-operator \ -bc --blank-lines-after-commas \ -bfda --break-function-decl-args \ -bfde --break-function-decl-args-end \ -bl --braces-after-if-line \ -blf --braces-after-func-def-line \ -bls --braces-after-struct-decl-line \ -br --braces-on-if-line \ -brf --braces-on-func-def-line \ -brs --braces-on-struct-decl-line \ -bs --Bill-Shannon --blank-before-sizeof \ -c++ --c-plus-plus \ -cdb --comment-delimiters-on-blank-lines \ -cdw --cuddle-do-while \ -ce --cuddle-else \ -cs --space-after-cast \ -dj --left-justify-declarations \ -eei --extra-expression-indentation \ -fc1 --format-first-column-comments \ -fca --format-all-comments \ -gnu --gnu-style \ -h --help --usage \ -hnl --honour-newlines \ -kr --k-and-r-style --kernighan-and-ritchie --kernighan-and-ritchie-style \ -lp --continue-at-parentheses \ -lps --leave-preprocessor-space \ -nbacc --no-blank-lines-after-ifdefs \ -nbad --no-blank-lines-after-declarations \ -nbadp --no-blank-lines-after-procedure-declarations \ -nbap --no-blank-lines-after-procedures \ -nbbb --no-blank-lines-before-block-comments \ -nbbo --break-after-boolean-operator \ -nbc --no-blank-lines-after-commas \ -nbfda --dont-break-function-decl-args \ -nbfde --dont-break-function-decl-args-end \ -nbs --no-Bill-Shannon --no-blank-before-sizeof \ -ncdb --no-comment-delimiters-on-blank-lines \ -ncdw --dont-cuddle-do-while \ -nce --dont-cuddle-else \ -ncs --no-space-after-casts \ -ndj --dont-left-justify-declarations \ -neei --no-extra-expression-indentation \ -nfc1 --dont-format-first-column-comments \ -nfca --dont-format-comments \ -nhnl --ignore-newlines \ -nip --dont-indent-parameters --no-parameter-indentation \ -nlp --dont-line-up-parentheses \ -nlps --remove-preprocessor-space \ -npcs --no-space-after-function-call-names \ -npmt \ -npro --ignore-profile \ -nprs --no-space-after-parentheses \ -npsl --dont-break-procedure-type \ -nsaf --no-space-after-for \ -nsai --no-space-after-if \ -nsaw --no-space-after-while \ -nsc --dont-star-comments \ -nsob --leave-optional-blank-lines \ -nss --dont-space-special-semicolon \ -nut --no-tabs \ -nv --no-verbosity \ -o --output \ -o --output-file \ -orig --berkeley --berkeley-style --original --original-style \ -pcs --space-after-procedure-calls \ -pmt --preserve-mtime \ -prs --space-after-parentheses \ -psl --procnames-start-lines \ -saf --space-after-for \ -sai --space-after-if \ -saw --space-after-while \ -sc --start-left-side-of-comments \ -sob --swallow-optional-blank-lines \ -ss --space-special-semicolon \ -st --standard-output \ -ut --use-tabs \ -v --verbose \ -version --version \ -linux --linux-style if exists("indent_is_bsd") syn keyword indentOptions -ip -ei -nei endif if exists("c_minlines") let b:c_minlines = c_minlines else if !exists("c_no_if0") let b:c_minlines = 50 " #if 0 constructs can be long else let b:c_minlines = 15 " mostly for () constructs endif endif hi def link indentError Error hi def link indentComment Comment hi def link indentTodo Todo hi def link indentOptions Keyword hi def link indentNumber Number hi def link indentIdent Identifier let b:current_syntax = "indent" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/indent.vim
Vim Script
gpl2
7,151
" Vim syntax file " Language: PROLOG " Maintainers: Thomas Koehler <jean-luc@picard.franken.de> " Last Change: 2009 Dec 04 " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/prolog.vim " There are two sets of highlighting in here: " If the "prolog_highlighting_clean" variable exists, it is rather sparse. " Otherwise you get more highlighting. " Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Prolog is case sensitive. syn case match " Very simple highlighting for comments, clause heads and " character codes. It respects prolog strings and atoms. syn region prologCComment start=+/\*+ end=+\*/+ syn match prologComment +%.*+ syn keyword prologKeyword module meta_predicate multifile dynamic syn match prologCharCode +0'\\\=.+ syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+ syn region prologClauseHead start=+^[a-z][^(]*(+ skip=+\.[^ ]+ end=+:-\|\.$\|\.[ ]\|-->+ contains=prologComment,prologCComment,prologString if !exists("prolog_highlighting_clean") " some keywords " some common predicates are also highlighted as keywords " is there a better solution? syn keyword prologKeyword abolish current_output peek_code syn keyword prologKeyword append current_predicate put_byte syn keyword prologKeyword arg current_prolog_flag put_char syn keyword prologKeyword asserta fail put_code syn keyword prologKeyword assertz findall read syn keyword prologKeyword at_end_of_stream float read_term syn keyword prologKeyword atom flush_output repeat syn keyword prologKeyword atom_chars functor retract syn keyword prologKeyword atom_codes get_byte set_input syn keyword prologKeyword atom_concat get_char set_output syn keyword prologKeyword atom_length get_code set_prolog_flag syn keyword prologKeyword atomic halt set_stream_position syn keyword prologKeyword bagof integer setof syn keyword prologKeyword call is stream_property syn keyword prologKeyword catch nl sub_atom syn keyword prologKeyword char_code nonvar throw syn keyword prologKeyword char_conversion number true syn keyword prologKeyword clause number_chars unify_with_occurs_check syn keyword prologKeyword close number_codes var syn keyword prologKeyword compound once write syn keyword prologKeyword copy_term op write_canonical syn keyword prologKeyword current_char_conversion open write_term syn keyword prologKeyword current_input peek_byte writeq syn keyword prologKeyword current_op peek_char syn match prologOperator "=\\=\|=:=\|\\==\|=<\|==\|>=\|\\=\|\\+\|<\|>\|=" syn match prologAsIs "===\|\\===\|<=\|=>" syn match prologNumber "\<[0123456789]*\>'\@!" syn match prologCommentError "\*/" syn match prologSpecialCharacter ";" syn match prologSpecialCharacter "!" syn match prologQuestion "?-.*\." contains=prologNumber endif syn sync maxlines=50 " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_prolog_syn_inits") if version < 508 let did_prolog_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif " The default highlighting. HiLink prologComment Comment HiLink prologCComment Comment HiLink prologCharCode Special if exists ("prolog_highlighting_clean") HiLink prologKeyword Statement HiLink prologClauseHead Statement else HiLink prologKeyword Keyword HiLink prologClauseHead Constant HiLink prologQuestion PreProc HiLink prologSpecialCharacter Special HiLink prologNumber Number HiLink prologAsIs Normal HiLink prologCommentError Error HiLink prologAtom String HiLink prologString String HiLink prologOperator Operator endif delcommand HiLink endif let b:current_syntax = "prolog" " vim: ts=8
zyz2011-vim
runtime/syntax/prolog.vim
Vim Script
gpl2
4,318
" Vim syntax file: " Language: Clipper 5.2 & FlagShip " Maintainer: C R Zamana <zamana@zip.net> " Some things based on c.vim by Bram Moolenaar and pascal.vim by Mario Eusebio " Last Change: 2011 Dec 29 by Thilo Six " 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") finish endif let s:cpo_save = &cpo set cpo&vim " Exceptions for my "Very Own" (TM) user variables naming style. " If you don't like this, comment it syn match clipperUserVariable "\<[a,b,c,d,l,n,o,u,x][A-Z][A-Za-z0-9_]*\>" syn match clipperUserVariable "\<[a-z]\>" " Clipper is case insensitive ( see "exception" above ) syn case ignore " Clipper keywords ( in no particular order ) syn keyword clipperStatement ACCEPT APPEND BLANK FROM AVERAGE CALL CANCEL syn keyword clipperStatement CLEAR ALL GETS MEMORY TYPEAHEAD CLOSE syn keyword clipperStatement COMMIT CONTINUE SHARED NEW PICT syn keyword clipperStatement COPY FILE STRUCTURE STRU EXTE TO COUNT syn keyword clipperStatement CREATE FROM NIL syn keyword clipperStatement DELETE FILE DIR DISPLAY EJECT ERASE FIND GO syn keyword clipperStatement INDEX INPUT VALID WHEN syn keyword clipperStatement JOIN KEYBOARD LABEL FORM LIST LOCATE MENU TO syn keyword clipperStatement NOTE PACK QUIT READ syn keyword clipperStatement RECALL REINDEX RELEASE RENAME REPLACE REPORT syn keyword clipperStatement RETURN FORM RESTORE syn keyword clipperStatement RUN SAVE SEEK SELECT syn keyword clipperStatement SKIP SORT STORE SUM TEXT TOTAL TYPE UNLOCK syn keyword clipperStatement UPDATE USE WAIT ZAP syn keyword clipperStatement BEGIN SEQUENCE syn keyword clipperStatement SET ALTERNATE BELL CENTURY COLOR CONFIRM CONSOLE syn keyword clipperStatement CURSOR DATE DECIMALS DEFAULT DELETED DELIMITERS syn keyword clipperStatement DEVICE EPOCH ESCAPE EXACT EXCLUSIVE FILTER FIXED syn keyword clipperStatement FORMAT FUNCTION INTENSITY KEY MARGIN MESSAGE syn keyword clipperStatement ORDER PATH PRINTER PROCEDURE RELATION SCOREBOARD syn keyword clipperStatement SOFTSEEK TYPEAHEAD UNIQUE WRAP syn keyword clipperStatement BOX CLEAR GET PROMPT SAY ? ?? syn keyword clipperStatement DELETE TAG GO RTLINKCMD TMP DBLOCKINFO syn keyword clipperStatement DBEVALINFO DBFIELDINFO DBFILTERINFO DBFUNCTABLE syn keyword clipperStatement DBOPENINFO DBORDERCONDINFO DBORDERCREATEINF syn keyword clipperStatement DBORDERINFO DBRELINFO DBSCOPEINFO DBSORTINFO syn keyword clipperStatement DBSORTITEM DBTRANSINFO DBTRANSITEM WORKAREA " Conditionals syn keyword clipperConditional CASE OTHERWISE ENDCASE syn keyword clipperConditional IF ELSE ENDIF IIF IFDEF IFNDEF " Loops syn keyword clipperRepeat DO WHILE ENDDO syn keyword clipperRepeat FOR TO NEXT STEP " Visibility syn keyword clipperStorageClass ANNOUNCE STATIC syn keyword clipperStorageClass DECLARE EXTERNAL LOCAL MEMVAR PARAMETERS syn keyword clipperStorageClass PRIVATE PROCEDURE PUBLIC REQUEST STATIC syn keyword clipperStorageClass FIELD FUNCTION syn keyword clipperStorageClass EXIT PROCEDURE INIT PROCEDURE " Operators syn match clipperOperator "$\|%\|&\|+\|-\|->\|!" syn match clipperOperator "\.AND\.\|\.NOT\.\|\.OR\." syn match clipperOperator ":=\|<\|<=\|<>\|!=\|#\|=\|==\|>\|>=\|@" syn match clipperOperator "*" " Numbers syn match clipperNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" " Includes syn region clipperIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match clipperIncluded contained "<[^>]*>" syn match clipperInclude "^\s*#\s*include\>\s*["<]" contains=clipperIncluded " String and Character constants syn region clipperString start=+"+ end=+"+ syn region clipperString start=+'+ end=+'+ " Delimiters syn match ClipperDelimiters "[()]\|[\[\]]\|[{}]\|[||]" " Special syn match clipperLineContinuation ";" " This is from Bram Moolenaar: if exists("c_comment_strings") " A comment can contain cString, cCharacter and cNumber. " But a "*/" inside a cString in a clipperComment DOES end the comment! " So we need to use a special type of cString: clipperCommentString, which " also ends on "*/", and sees a "*" at the start of the line as comment " again. Unfortunately this doesn't very well work for // type of comments :-( syntax match clipperCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region clipperCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=clipperCommentSkip syntax region clipperComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" syntax region clipperComment start="/\*" end="\*/" contains=clipperCommentString,clipperCharacter,clipperNumber,clipperString syntax match clipperComment "//.*" contains=clipperComment2String,clipperCharacter,clipperNumber else syn region clipperComment start="/\*" end="\*/" syn match clipperComment "//.*" endif syntax match clipperCommentError "\*/" " Lines beggining with an "*" are comments too syntax match clipperComment "^\*.*" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_clipper_syntax_inits") if version < 508 let did_clipper_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink clipperConditional Conditional HiLink clipperRepeat Repeat HiLink clipperNumber Number HiLink clipperInclude Include HiLink clipperComment Comment HiLink clipperOperator Operator HiLink clipperStorageClass StorageClass HiLink clipperStatement Statement HiLink clipperString String HiLink clipperFunction Function HiLink clipperLineContinuation Special HiLink clipperDelimiters Delimiter HiLink clipperUserVariable Identifier delcommand HiLink endif let b:current_syntax = "clipper" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8
zyz2011-vim
runtime/syntax/clipper.vim
Vim Script
gpl2
5,961
" Vim syntax file " Language: Pyrex " Maintainer: Marco Barisione <marco.bari@people.it> " URL: http://marcobari.altervista.org/pyrex_vim.html " Last Change: 2009 Nov 09 " 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") finish endif " Read the Python syntax to start with if version < 600 so <sfile>:p:h/python.vim else runtime! syntax/python.vim unlet b:current_syntax endif " Pyrex extentions syn keyword pyrexStatement cdef typedef ctypedef sizeof syn keyword pyrexType int long short float double char object void syn keyword pyrexType signed unsigned syn keyword pyrexStructure struct union enum syn keyword pyrexInclude include cimport syn keyword pyrexAccess public private property readonly extern " If someome wants Python's built-ins highlighted probably he " also wants Pyrex's built-ins highlighted if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") syn keyword pyrexBuiltin NULL endif " This deletes "from" from the keywords and re-adds it as a " match with lower priority than pyrexForFrom syn clear pythonInclude syn keyword pythonInclude import syn match pythonInclude "from" " With "for[^:]*\zsfrom" VIM does not match "for" anymore, so " I used the slower "\@<=" form syn match pyrexForFrom "\(for[^:]*\)\@<=from" " Default highlighting if version >= 508 || !exists("did_pyrex_syntax_inits") if version < 508 let did_pyrex_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink pyrexStatement Statement HiLink pyrexType Type HiLink pyrexStructure Structure HiLink pyrexInclude PreCondit HiLink pyrexAccess pyrexStatement if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") HiLink pyrexBuiltin Function endif HiLink pyrexForFrom Statement delcommand HiLink endif let b:current_syntax = "pyrex"
zyz2011-vim
runtime/syntax/pyrex.vim
Vim Script
gpl2
2,045
" Vim syntax file " Language: Lynx 2.7.1 style file " Maintainer: Scott Bigham <dsb@killerbunnies.org> " Last Change: 2004 Oct 06 " 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") finish endif " This setup is probably atypical for a syntax highlighting file, because " most of it is not really intended to be overrideable. Instead, the " highlighting is supposed to correspond to the highlighting specified by " the .lss file entries themselves; ie. the "bold" keyword should be bold, " the "red" keyword should be red, and so forth. The exceptions to this " are comments, of course, and the initial keyword identifying the affected " element, which will inherit the usual Identifier highlighting. syn match lssElement "^[^:]\+" nextgroup=lssMono syn match lssMono ":[^:]\+" contained nextgroup=lssFgColor contains=lssReverse,lssUnderline,lssBold,lssStandout syn keyword lssBold bold contained syn keyword lssReverse reverse contained syn keyword lssUnderline underline contained syn keyword lssStandout standout contained syn match lssFgColor ":[^:]\+" contained nextgroup=lssBgColor contains=lssRedFg,lssBlueFg,lssGreenFg,lssBrownFg,lssMagentaFg,lssCyanFg,lssLightgrayFg,lssGrayFg,lssBrightredFg,lssBrightgreenFg,lssYellowFg,lssBrightblueFg,lssBrightmagentaFg,lssBrightcyanFg syn case ignore syn keyword lssRedFg red contained syn keyword lssBlueFg blue contained syn keyword lssGreenFg green contained syn keyword lssBrownFg brown contained syn keyword lssMagentaFg magenta contained syn keyword lssCyanFg cyan contained syn keyword lssLightgrayFg lightgray contained syn keyword lssGrayFg gray contained syn keyword lssBrightredFg brightred contained syn keyword lssBrightgreenFg brightgreen contained syn keyword lssYellowFg yellow contained syn keyword lssBrightblueFg brightblue contained syn keyword lssBrightmagentaFg brightmagenta contained syn keyword lssBrightcyanFg brightcyan contained syn case match syn match lssBgColor ":[^:]\+" contained contains=lssRedBg,lssBlueBg,lssGreenBg,lssBrownBg,lssMagentaBg,lssCyanBg,lssLightgrayBg,lssGrayBg,lssBrightredBg,lssBrightgreenBg,lssYellowBg,lssBrightblueBg,lssBrightmagentaBg,lssBrightcyanBg,lssWhiteBg syn case ignore syn keyword lssRedBg red contained syn keyword lssBlueBg blue contained syn keyword lssGreenBg green contained syn keyword lssBrownBg brown contained syn keyword lssMagentaBg magenta contained syn keyword lssCyanBg cyan contained syn keyword lssLightgrayBg lightgray contained syn keyword lssGrayBg gray contained syn keyword lssBrightredBg brightred contained syn keyword lssBrightgreenBg brightgreen contained syn keyword lssYellowBg yellow contained syn keyword lssBrightblueBg brightblue contained syn keyword lssBrightmagentaBg brightmagenta contained syn keyword lssBrightcyanBg brightcyan contained syn keyword lssWhiteBg white contained syn case match syn match lssComment "#.*$" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_lss_syntax_inits") if version < 508 let did_lss_syntax_inits = 1 endif hi def link lssComment Comment hi def link lssElement Identifier hi def lssBold term=bold cterm=bold hi def lssReverse term=reverse cterm=reverse hi def lssUnderline term=underline cterm=underline hi def lssStandout term=standout cterm=standout hi def lssRedFg ctermfg=red hi def lssBlueFg ctermfg=blue hi def lssGreenFg ctermfg=green hi def lssBrownFg ctermfg=brown hi def lssMagentaFg ctermfg=magenta hi def lssCyanFg ctermfg=cyan hi def lssGrayFg ctermfg=gray if $COLORTERM == "rxvt" " On rxvt's, bright colors are activated by setting the bold attribute. hi def lssLightgrayFg ctermfg=gray cterm=bold hi def lssBrightredFg ctermfg=red cterm=bold hi def lssBrightgreenFg ctermfg=green cterm=bold hi def lssYellowFg ctermfg=yellow cterm=bold hi def lssBrightblueFg ctermfg=blue cterm=bold hi def lssBrightmagentaFg ctermfg=magenta cterm=bold hi def lssBrightcyanFg ctermfg=cyan cterm=bold else hi def lssLightgrayFg ctermfg=lightgray hi def lssBrightredFg ctermfg=lightred hi def lssBrightgreenFg ctermfg=lightgreen hi def lssYellowFg ctermfg=yellow hi def lssBrightblueFg ctermfg=lightblue hi def lssBrightmagentaFg ctermfg=lightmagenta hi def lssBrightcyanFg ctermfg=lightcyan endif hi def lssRedBg ctermbg=red hi def lssBlueBg ctermbg=blue hi def lssGreenBg ctermbg=green hi def lssBrownBg ctermbg=brown hi def lssMagentaBg ctermbg=magenta hi def lssCyanBg ctermbg=cyan hi def lssLightgrayBg ctermbg=lightgray hi def lssGrayBg ctermbg=gray hi def lssBrightredBg ctermbg=lightred hi def lssBrightgreenBg ctermbg=lightgreen hi def lssYellowBg ctermbg=yellow hi def lssBrightblueBg ctermbg=lightblue hi def lssBrightmagentaBg ctermbg=lightmagenta hi def lssBrightcyanBg ctermbg=lightcyan hi def lssWhiteBg ctermbg=white ctermfg=black endif let b:current_syntax = "lss" " vim: ts=8
zyz2011-vim
runtime/syntax/lss.vim
Vim Script
gpl2
5,262
" Vim syntax file " Language: Hamster Scripting Language " Maintainer: David Fishburn <fishburn@ianywhere.com> " Last Change: Sun Oct 24 2004 7:11:50 PM " Version: 2.0.6.0 " Description: Hamster Classic " Hamster is a local server for news and mail. It's a windows-32-bit-program. " It allows the use of multiple news- and mailserver and combines them to one " mail- and newsserver for the news/mail-client. It load faster than a normal " newsreader because many threads can run simultaneous. It contains scorefile " for news and mail, a build-in script language, the GUI allows translation to " other languages, it can be used in a network and that's not all features... " " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn case ignore syn keyword hamsterSpecial abs syn keyword hamsterSpecial artaddheader syn keyword hamsterSpecial artalloc syn keyword hamsterSpecial artdelheader syn keyword hamsterSpecial artfree syn keyword hamsterSpecial artgetbody syn keyword hamsterSpecial artgetheader syn keyword hamsterSpecial artgetheaders syn keyword hamsterSpecial artgettext syn keyword hamsterSpecial artheaderexists syn keyword hamsterSpecial artload syn keyword hamsterSpecial artsave syn keyword hamsterSpecial artsetbody syn keyword hamsterSpecial artsetheader syn keyword hamsterSpecial artsetheaders syn keyword hamsterSpecial artsettext syn keyword hamsterSpecial assert syn keyword hamsterSpecial atadd syn keyword hamsterSpecial atclear syn keyword hamsterSpecial atcount syn keyword hamsterSpecial ateverymins syn keyword hamsterSpecial atexecute syn keyword hamsterSpecial atfrom syn keyword hamsterSpecial atondays syn keyword hamsterSpecial atsubfunction syn keyword hamsterSpecial atuntil syn keyword hamsterSpecial beep syn keyword hamsterSpecial break syn keyword hamsterSpecial chr syn keyword hamsterSpecial clearxcounter syn keyword hamsterSpecial clipread syn keyword hamsterSpecial clipwrite syn keyword hamsterSpecial const syn keyword hamsterSpecial constenum syn keyword hamsterSpecial continue syn keyword hamsterSpecial copy syn keyword hamsterSpecial debug syn keyword hamsterSpecial dec syn keyword hamsterSpecial decodebase64 syn keyword hamsterSpecial decodeqp syn keyword hamsterSpecial decodetime syn keyword hamsterSpecial decxcounter syn keyword hamsterSpecial delete syn keyword hamsterSpecial deletehostsentry syn keyword hamsterSpecial digest syn keyword hamsterSpecial dirchange syn keyword hamsterSpecial dircurrent syn keyword hamsterSpecial direxists syn keyword hamsterSpecial dirmake syn keyword hamsterSpecial dirremove syn keyword hamsterSpecial dirsystem syn keyword hamsterSpecial dirwindows syn keyword hamsterSpecial diskfreekb syn keyword hamsterSpecial dllcall syn keyword hamsterSpecial dllfree syn keyword hamsterSpecial dlllasterror syn keyword hamsterSpecial dllload syn keyword hamsterSpecial dump syn keyword hamsterSpecial encodetime syn keyword hamsterSpecial entercontext syn keyword hamsterSpecial errcatch syn keyword hamsterSpecial errline syn keyword hamsterSpecial errlineno syn keyword hamsterSpecial errmodule syn keyword hamsterSpecial errmsg syn keyword hamsterSpecial errnum syn keyword hamsterSpecial error syn keyword hamsterSpecial errsender syn keyword hamsterSpecial eval syn keyword hamsterSpecial eventclose syn keyword hamsterSpecial eventcreate syn keyword hamsterSpecial eventmultiplewait syn keyword hamsterSpecial eventpulse syn keyword hamsterSpecial eventreset syn keyword hamsterSpecial eventset syn keyword hamsterSpecial eventwait syn keyword hamsterSpecial execute syn keyword hamsterSpecial false syn keyword hamsterSpecial filecopy syn keyword hamsterSpecial filedelete syn keyword hamsterSpecial fileexists syn keyword hamsterSpecial filemove syn keyword hamsterSpecial filerename syn keyword hamsterSpecial filesize syn keyword hamsterSpecial filetime syn keyword hamsterSpecial getenv syn keyword hamsterSpecial getprocessidentifier syn keyword hamsterSpecial getuptimedays syn keyword hamsterSpecial getuptimehours syn keyword hamsterSpecial getuptimemins syn keyword hamsterSpecial getuptimesecs syn keyword hamsterSpecial gosub syn keyword hamsterSpecial goto syn keyword hamsterSpecial hex syn keyword hamsterSpecial icase syn keyword hamsterSpecial iif syn keyword hamsterSpecial inc syn keyword hamsterSpecial incxcounter syn keyword hamsterSpecial inidelete syn keyword hamsterSpecial inierasesection syn keyword hamsterSpecial iniread syn keyword hamsterSpecial iniwrite syn keyword hamsterSpecial inputbox syn keyword hamsterSpecial inputpw syn keyword hamsterSpecial int syn keyword hamsterSpecial isint syn keyword hamsterSpecial isstr syn keyword hamsterSpecial leavecontext syn keyword hamsterSpecial len syn keyword hamsterSpecial listadd syn keyword hamsterSpecial listalloc syn keyword hamsterSpecial listappend syn keyword hamsterSpecial listbox syn keyword hamsterSpecial listclear syn keyword hamsterSpecial listcount syn keyword hamsterSpecial listdelete syn keyword hamsterSpecial listdirs syn keyword hamsterSpecial listexists syn keyword hamsterSpecial listfiles syn keyword hamsterSpecial listfiles syn keyword hamsterSpecial listfree syn keyword hamsterSpecial listget syn keyword hamsterSpecial listgetkey syn keyword hamsterSpecial listgettag syn keyword hamsterSpecial listgettext syn keyword hamsterSpecial listindexof syn keyword hamsterSpecial listinsert syn keyword hamsterSpecial listload syn keyword hamsterSpecial listrasentries syn keyword hamsterSpecial listsave syn keyword hamsterSpecial listset syn keyword hamsterSpecial listsetkey syn keyword hamsterSpecial listsettag syn keyword hamsterSpecial listsettext syn keyword hamsterSpecial listsort syn keyword hamsterSpecial localhostaddr syn keyword hamsterSpecial localhostname syn keyword hamsterSpecial lookuphostaddr syn keyword hamsterSpecial lookuphostname syn keyword hamsterSpecial lowercase syn keyword hamsterSpecial memalloc syn keyword hamsterSpecial memforget syn keyword hamsterSpecial memfree syn keyword hamsterSpecial memgetint syn keyword hamsterSpecial memgetstr syn keyword hamsterSpecial memsetint syn keyword hamsterSpecial memsetstr syn keyword hamsterSpecial memsize syn keyword hamsterSpecial memvarptr syn keyword hamsterSpecial msgbox syn keyword hamsterSpecial ord syn keyword hamsterSpecial paramcount syn keyword hamsterSpecial paramstr syn keyword hamsterSpecial popupbox syn keyword hamsterSpecial pos syn keyword hamsterSpecial print syn keyword hamsterSpecial quit syn keyword hamsterSpecial random syn keyword hamsterSpecial randomize syn keyword hamsterSpecial rasdial syn keyword hamsterSpecial rasgetconnection syn keyword hamsterSpecial rasgetip syn keyword hamsterSpecial rashangup syn keyword hamsterSpecial rasisconnected syn keyword hamsterSpecial re_extract syn keyword hamsterSpecial re_match syn keyword hamsterSpecial re_parse syn keyword hamsterSpecial re_split syn keyword hamsterSpecial replace syn keyword hamsterSpecial return syn keyword hamsterSpecial runscript syn keyword hamsterSpecial scriptpriority syn keyword hamsterSpecial set syn keyword hamsterSpecial sethostsentry_byaddr syn keyword hamsterSpecial sethostsentry_byname syn keyword hamsterSpecial setxcounter syn keyword hamsterSpecial sgn syn keyword hamsterSpecial shell syn keyword hamsterSpecial sleep syn keyword hamsterSpecial stopthread syn keyword hamsterSpecial str syn keyword hamsterSpecial syserrormessage syn keyword hamsterSpecial testmailfilterline syn keyword hamsterSpecial testnewsfilterline syn keyword hamsterSpecial ticks syn keyword hamsterSpecial time syn keyword hamsterSpecial timegmt syn keyword hamsterSpecial trace syn keyword hamsterSpecial trim syn keyword hamsterSpecial true syn keyword hamsterSpecial uppercase syn keyword hamsterSpecial utf7toucs16 syn keyword hamsterSpecial utf8toucs32 syn keyword hamsterSpecial var syn keyword hamsterSpecial varset syn keyword hamsterSpecial warning syn keyword hamsterSpecial xcounter " common functions syn keyword hamsterFunction addlog syn keyword hamsterFunction decodemimeheaderstring syn keyword hamsterFunction decodetolocalcharset syn keyword hamsterFunction gettasksactive syn keyword hamsterFunction gettasksrun syn keyword hamsterFunction gettaskswait syn keyword hamsterFunction hamaddgroup syn keyword hamsterFunction hamaddlog syn keyword hamsterFunction hamaddpull syn keyword hamsterFunction hamartcount syn keyword hamsterFunction hamartdeletemid syn keyword hamsterFunction hamartdeletemidingroup syn keyword hamsterFunction hamartdeletenringroup syn keyword hamsterFunction hamartimport syn keyword hamsterFunction hamartlocatemid syn keyword hamsterFunction hamartlocatemidingroup syn keyword hamsterFunction hamartnomax syn keyword hamsterFunction hamartnomin syn keyword hamsterFunction hamarttext syn keyword hamsterFunction hamarttextexport syn keyword hamsterFunction hamchangepassword syn keyword hamsterFunction hamcheckpurge syn keyword hamsterFunction hamdelgroup syn keyword hamsterFunction hamdelpull syn keyword hamsterFunction hamdialogaddpull syn keyword hamsterFunction hamdialogeditdirs syn keyword hamsterFunction hamdialogmailkillfilelog syn keyword hamsterFunction hamdialognewskillfilelog syn keyword hamsterFunction hamdialogscripts syn keyword hamsterFunction hamenvelopefrom syn keyword hamsterFunction hamexepath syn keyword hamsterFunction hamfetchmail syn keyword hamsterFunction hamflush syn keyword hamsterFunction hamgetstatus syn keyword hamsterFunction hamgroupclose syn keyword hamsterFunction hamgroupcount syn keyword hamsterFunction hamgroupindex syn keyword hamsterFunction hamgroupname syn keyword hamsterFunction hamgroupnamebyhandle syn keyword hamsterFunction hamgroupopen syn keyword hamsterFunction hamgroupspath syn keyword hamsterFunction hamhscpath syn keyword hamsterFunction hamhsmpath syn keyword hamsterFunction hamimapserver syn keyword hamsterFunction hamisidle syn keyword hamsterFunction hamlogspath syn keyword hamsterFunction hammailexchange syn keyword hamsterFunction hammailpath syn keyword hamsterFunction hammailsoutpath syn keyword hamsterFunction hammainfqdn syn keyword hamsterFunction hammainwindow syn keyword hamsterFunction hammessage syn keyword hamsterFunction hammidfqdn syn keyword hamsterFunction hamnewmail syn keyword hamsterFunction hamnewserrpath syn keyword hamsterFunction hamnewsjobsadd syn keyword hamsterFunction hamnewsjobscheckactive syn keyword hamsterFunction hamnewsjobsclear syn keyword hamsterFunction hamnewsjobsdelete syn keyword hamsterFunction hamnewsjobsfeed syn keyword hamsterFunction hamnewsjobsgetcounter syn keyword hamsterFunction hamnewsjobsgetparam syn keyword hamsterFunction hamnewsjobsgetpriority syn keyword hamsterFunction hamnewsjobsgetserver syn keyword hamsterFunction hamnewsjobsgettype syn keyword hamsterFunction hamnewsjobspost syn keyword hamsterFunction hamnewsjobspostdef syn keyword hamsterFunction hamnewsjobspull syn keyword hamsterFunction hamnewsjobspulldef syn keyword hamsterFunction hamnewsjobssetpriority syn keyword hamsterFunction hamnewsjobsstart syn keyword hamsterFunction hamnewsoutpath syn keyword hamsterFunction hamnewspost syn keyword hamsterFunction hamnewspull syn keyword hamsterFunction hamnntpserver syn keyword hamsterFunction hampassreload syn keyword hamsterFunction hampath syn keyword hamsterFunction hampop3server syn keyword hamsterFunction hampostmaster syn keyword hamsterFunction hampurge syn keyword hamsterFunction hamrasdial syn keyword hamsterFunction hamrashangup syn keyword hamsterFunction hamrcpath syn keyword hamsterFunction hamrebuildgloballists syn keyword hamsterFunction hamrebuildhistory syn keyword hamsterFunction hamrecoserver syn keyword hamsterFunction hamreloadconfig syn keyword hamsterFunction hamreloadipaccess syn keyword hamsterFunction hamresetcounters syn keyword hamsterFunction hamrotatelog syn keyword hamsterFunction hamscorelist syn keyword hamsterFunction hamscoretest syn keyword hamsterFunction hamsendmail syn keyword hamsterFunction hamsendmailauth syn keyword hamsterFunction hamserverpath syn keyword hamsterFunction hamsetlogin syn keyword hamsterFunction hamshutdown syn keyword hamsterFunction hamsmtpserver syn keyword hamsterFunction hamstopalltasks syn keyword hamsterFunction hamthreadcount syn keyword hamsterFunction hamtrayicon syn keyword hamsterFunction hamusenetacc syn keyword hamsterFunction hamversion syn keyword hamsterFunction hamwaitidle syn keyword hamsterFunction raslasterror syn keyword hamsterFunction rfctimezone syn keyword hamsterFunction settasklimiter syn keyword hamsterStatement if syn keyword hamsterStatement else syn keyword hamsterStatement elseif syn keyword hamsterStatement endif syn keyword hamsterStatement do syn keyword hamsterStatement loop syn keyword hamsterStatement while syn keyword hamsterStatement endwhile syn keyword hamsterStatement repeat syn keyword hamsterStatement until syn keyword hamsterStatement for syn keyword hamsterStatement endfor syn keyword hamsterStatement sub syn keyword hamsterStatement endsub syn keyword hamsterStatement label " Strings and characters: syn region hamsterString start=+"+ end=+"+ contains=@Spell syn region hamsterString start=+'+ end=+'+ contains=@Spell " Numbers: syn match hamsterNumber "-\=\<\d*\.\=[0-9_]\>" " Comments: syn region hamsterHashComment start=/#/ end=/$/ contains=@Spell syn cluster hamsterComment contains=hamsterHashComment syn sync ccomment hamsterHashComment " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_hamster_syn_inits") if version < 508 let did_hamster_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink hamsterHashComment Comment HiLink hamsterSpecial Special HiLink hamsterStatement Statement HiLink hamsterString String HiLink hamsterFunction Function delcommand HiLink endif let b:current_syntax = "hamster" " vim:sw=4
zyz2011-vim
runtime/syntax/hamster.vim
Vim Script
gpl2
14,233
" Vim syntax file " Language: VRML97 " Modified from: VRML 1.0C by David Brown <dbrown@cgs.c4.gmeds.com> " Maintainer: vacancy! " Former Maintainer: Gregory Seidman <gsslist+vim@anthropohedron.net> " Last change: 2006 May 03 " 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") finish endif " keyword definitions syn keyword VRMLFields ambientIntensity appearance attenuation syn keyword VRMLFields autoOffset avatarSize axisOfRotation backUrl syn keyword VRMLFields bboxCenter bboxSize beamWidth beginCap syn keyword VRMLFields bottom bottomRadius bottomUrl ccw center syn keyword VRMLFields children choice collide color colorIndex syn keyword VRMLFields colorPerVertex convex coord coordIndex syn keyword VRMLFields creaseAngle crossSection cutOffAngle syn keyword VRMLFields cycleInterval description diffuseColor syn keyword VRMLFields directOutput direction diskAngle syn keyword VRMLFields emissiveColor enabled endCap family syn keyword VRMLFields fieldOfView fogType fontStyle frontUrl syn keyword VRMLFields geometry groundAngle groundColor headlight syn keyword VRMLFields height horizontal info intensity jump syn keyword VRMLFields justify key keyValue language leftToRight syn keyword VRMLFields leftUrl length level location loop material syn keyword VRMLFields maxAngle maxBack maxExtent maxFront syn keyword VRMLFields maxPosition minAngle minBack minFront syn keyword VRMLFields minPosition mustEvaluate normal normalIndex syn keyword VRMLFields normalPerVertex offset on orientation syn keyword VRMLFields parameter pitch point position priority syn keyword VRMLFields proxy radius range repeatS repeatT rightUrl syn keyword VRMLFields rotation scale scaleOrientation shininess syn keyword VRMLFields side size skyAngle skyColor solid source syn keyword VRMLFields spacing spatialize specularColor speed spine syn keyword VRMLFields startTime stopTime string style texCoord syn keyword VRMLFields texCoordIndex texture textureTransform title syn keyword VRMLFields top topToBottom topUrl translation syn keyword VRMLFields transparency type url vector visibilityLimit syn keyword VRMLFields visibilityRange whichChoice xDimension syn keyword VRMLFields xSpacing zDimension zSpacing syn match VRMLFields "\<[A-Za-z_][A-Za-z0-9_]*\>" contains=VRMLComment,VRMLProtos,VRMLfTypes " syn match VRMLFields "\<[A-Za-z_][A-Za-z0-9_]*\>\(,\|\s\)*\(#.*$\)*\<IS\>\(#.*$\)*\(,\|\s\)*\<[A-Za-z_][A-Za-z0-9_]*\>\(,\|\s\)*\(#.*$\)*" contains=VRMLComment,VRMLProtos " syn region VRMLFields start="\<[A-Za-z_][A-Za-z0-9_]*\>" end=+\(,\|#\|\s\)+me=e-1 contains=VRMLComment,VRMLProtos syn keyword VRMLEvents addChildren ambientIntensity_changed syn keyword VRMLEvents appearance_changed attenuation_changed syn keyword VRMLEvents autoOffset_changed avatarSize_changed syn keyword VRMLEvents axisOfRotation_changed backUrl_changed syn keyword VRMLEvents beamWidth_changed bindTime bottomUrl_changed syn keyword VRMLEvents center_changed children_changed syn keyword VRMLEvents choice_changed collideTime collide_changed syn keyword VRMLEvents color_changed coord_changed syn keyword VRMLEvents cutOffAngle_changed cycleInterval_changed syn keyword VRMLEvents cycleTime description_changed syn keyword VRMLEvents diffuseColor_changed direction_changed syn keyword VRMLEvents diskAngle_changed duration_changed syn keyword VRMLEvents emissiveColor_changed enabled_changed syn keyword VRMLEvents enterTime exitTime fogType_changed syn keyword VRMLEvents fontStyle_changed fraction_changed syn keyword VRMLEvents frontUrl_changed geometry_changed syn keyword VRMLEvents groundAngle_changed headlight_changed syn keyword VRMLEvents hitNormal_changed hitPoint_changed syn keyword VRMLEvents hitTexCoord_changed intensity_changed syn keyword VRMLEvents isActive isBound isOver jump_changed syn keyword VRMLEvents keyValue_changed key_changed leftUrl_changed syn keyword VRMLEvents length_changed level_changed syn keyword VRMLEvents location_changed loop_changed syn keyword VRMLEvents material_changed maxAngle_changed syn keyword VRMLEvents maxBack_changed maxExtent_changed syn keyword VRMLEvents maxFront_changed maxPosition_changed syn keyword VRMLEvents minAngle_changed minBack_changed syn keyword VRMLEvents minFront_changed minPosition_changed syn keyword VRMLEvents normal_changed offset_changed on_changed syn keyword VRMLEvents orientation_changed parameter_changed syn keyword VRMLEvents pitch_changed point_changed position_changed syn keyword VRMLEvents priority_changed radius_changed syn keyword VRMLEvents removeChildren rightUrl_changed syn keyword VRMLEvents rotation_changed scaleOrientation_changed syn keyword VRMLEvents scale_changed set_ambientIntensity syn keyword VRMLEvents set_appearance set_attenuation syn keyword VRMLEvents set_autoOffset set_avatarSize syn keyword VRMLEvents set_axisOfRotation set_backUrl set_beamWidth syn keyword VRMLEvents set_bind set_bottomUrl set_center syn keyword VRMLEvents set_children set_choice set_collide syn keyword VRMLEvents set_color set_colorIndex set_coord syn keyword VRMLEvents set_coordIndex set_crossSection syn keyword VRMLEvents set_cutOffAngle set_cycleInterval syn keyword VRMLEvents set_description set_diffuseColor syn keyword VRMLEvents set_direction set_diskAngle syn keyword VRMLEvents set_emissiveColor set_enabled set_fogType syn keyword VRMLEvents set_fontStyle set_fraction set_frontUrl syn keyword VRMLEvents set_geometry set_groundAngle set_headlight syn keyword VRMLEvents set_height set_intensity set_jump set_key syn keyword VRMLEvents set_keyValue set_leftUrl set_length syn keyword VRMLEvents set_level set_location set_loop set_material syn keyword VRMLEvents set_maxAngle set_maxBack set_maxExtent syn keyword VRMLEvents set_maxFront set_maxPosition set_minAngle syn keyword VRMLEvents set_minBack set_minFront set_minPosition syn keyword VRMLEvents set_normal set_normalIndex set_offset set_on syn keyword VRMLEvents set_orientation set_parameter set_pitch syn keyword VRMLEvents set_point set_position set_priority syn keyword VRMLEvents set_radius set_rightUrl set_rotation syn keyword VRMLEvents set_scale set_scaleOrientation set_shininess syn keyword VRMLEvents set_size set_skyAngle set_skyColor syn keyword VRMLEvents set_source set_specularColor set_speed syn keyword VRMLEvents set_spine set_startTime set_stopTime syn keyword VRMLEvents set_string set_texCoord set_texCoordIndex syn keyword VRMLEvents set_texture set_textureTransform set_topUrl syn keyword VRMLEvents set_translation set_transparency set_type syn keyword VRMLEvents set_url set_vector set_visibilityLimit syn keyword VRMLEvents set_visibilityRange set_whichChoice syn keyword VRMLEvents shininess_changed size_changed syn keyword VRMLEvents skyAngle_changed skyColor_changed syn keyword VRMLEvents source_changed specularColor_changed syn keyword VRMLEvents speed_changed startTime_changed syn keyword VRMLEvents stopTime_changed string_changed syn keyword VRMLEvents texCoord_changed textureTransform_changed syn keyword VRMLEvents texture_changed time topUrl_changed syn keyword VRMLEvents touchTime trackPoint_changed syn keyword VRMLEvents translation_changed transparency_changed syn keyword VRMLEvents type_changed url_changed value_changed syn keyword VRMLEvents vector_changed visibilityLimit_changed syn keyword VRMLEvents visibilityRange_changed whichChoice_changed syn region VRMLEvents start="\S+[^0-9]+\.[A-Za-z_]+"ms=s+1 end="\(,\|$\|\s\)"me=e-1 syn keyword VRMLNodes Anchor Appearance AudioClip Background syn keyword VRMLNodes Billboard Box Collision Color syn keyword VRMLNodes ColorInterpolator Cone Coordinate syn keyword VRMLNodes CoordinateInterpolator Cylinder syn keyword VRMLNodes CylinderSensor DirectionalLight syn keyword VRMLNodes ElevationGrid Extrusion Fog FontStyle syn keyword VRMLNodes Group ImageTexture IndexedFaceSet syn keyword VRMLNodes IndexedLineSet Inline LOD Material syn keyword VRMLNodes MovieTexture NavigationInfo Normal syn keyword VRMLNodes NormalInterpolator OrientationInterpolator syn keyword VRMLNodes PixelTexture PlaneSensor PointLight syn keyword VRMLNodes PointSet PositionInterpolator syn keyword VRMLNodes ProximitySensor ScalarInterpolator syn keyword VRMLNodes Script Shape Sound Sphere SphereSensor syn keyword VRMLNodes SpotLight Switch Text TextureCoordinate syn keyword VRMLNodes TextureTransform TimeSensor TouchSensor syn keyword VRMLNodes Transform Viewpoint VisibilitySensor syn keyword VRMLNodes WorldInfo " the following line doesn't catch <node><newline><openbrace> since \n " doesn't match as an atom yet :-( syn match VRMLNodes "[A-Za-z_][A-Za-z0-9_]*\(,\|\s\)*{"me=e-1 syn region VRMLNodes start="\<EXTERNPROTO\>\(,\|\s\)*[A-Za-z_]"ms=e start="\<EXTERNPROTO\>\(,\|\s\)*" end="[\s]*\["me=e-1 contains=VRMLProtos,VRMLComment syn region VRMLNodes start="PROTO\>\(,\|\s\)*[A-Za-z_]"ms=e start="PROTO\>\(,\|\s\)*" end="[\s]*\["me=e-1 contains=VRMLProtos,VRMLComment syn keyword VRMLTypes SFBool SFColor MFColor SFFloat MFFloat syn keyword VRMLTypes SFImage SFInt32 MFInt32 SFNode MFNode syn keyword VRMLTypes SFRotation MFRotation SFString MFString syn keyword VRMLTypes SFTime MFTime SFVec2f MFVec2f SFVec3f MFVec3f syn keyword VRMLfTypes field exposedField eventIn eventOut syn keyword VRMLValues TRUE FALSE NULL syn keyword VRMLProtos contained EXTERNPROTO PROTO IS syn keyword VRMLRoutes contained ROUTE TO if version >= 502 "containment! syn include @jscript $VIMRUNTIME/syntax/javascript.vim syn region VRMLjScriptString contained start=+"\(\(javascript\)\|\(vrmlscript\)\|\(ecmascript\)\):+ms=e+1 skip=+\\\\\|\\"+ end=+"+me=e-1 contains=@jscript endif " match definitions. syn match VRMLSpecial contained "\\[0-9][0-9][0-9]\|\\." syn region VRMLString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=VRMLSpecial,VRMLjScriptString syn match VRMLCharacter "'[^\\]'" syn match VRMLSpecialCharacter "'\\.'" syn match VRMLNumber "[-+]\=\<[0-9]\+\(\.[0-9]\+\)\=\([eE]\{1}[-+]\=[0-9]\+\)\=\>\|0[xX][0-9a-fA-F]\+\>" syn match VRMLNumber "0[xX][0-9a-fA-F]\+\>" syn match VRMLComment "#.*$" " newlines should count as whitespace, but they can't be matched yet :-( syn region VRMLRouteNode start="[^O]TO\(,\|\s\)*" end="\."me=e-1 contains=VRMLRoutes,VRMLComment syn region VRMLRouteNode start="ROUTE\(,\|\s\)*" end="\."me=e-1 contains=VRMLRoutes,VRMLComment syn region VRMLInstName start="DEF\>"hs=e+1 skip="DEF\(,\|\s\)*" end="[A-Za-z0-9_]\(\s\|$\|,\)"me=e contains=VRMLInstances,VRMLComment syn region VRMLInstName start="USE\>"hs=e+1 skip="USE\(,\|\s\)*" end="[A-Za-z0-9_]\(\s\|$\|,\)"me=e contains=VRMLInstances,VRMLComment syn keyword VRMLInstances contained DEF USE syn sync minlines=1 if version >= 600 "FOLDS! syn sync fromstart "setlocal foldmethod=syntax syn region braceFold start="{" end="}" transparent fold contains=TOP syn region bracketFold start="\[" end="]" transparent fold contains=TOP syn region VRMLString start=+"+ skip=+\\\\\|\\"+ end=+"+ fold contains=VRMLSpecial,VRMLjScriptString endif " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_VRML_syntax_inits") if version < 508 let did_VRML_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink VRMLCharacter VRMLString HiLink VRMLSpecialCharacter VRMLSpecial HiLink VRMLNumber VRMLString HiLink VRMLValues VRMLString HiLink VRMLString String HiLink VRMLSpecial Special HiLink VRMLComment Comment HiLink VRMLNodes Statement HiLink VRMLFields Type HiLink VRMLEvents Type HiLink VRMLfTypes LineNr " hi VRMLfTypes ctermfg=6 guifg=Brown HiLink VRMLInstances PreCondit HiLink VRMLRoutes PreCondit HiLink VRMLProtos PreProc HiLink VRMLRouteNode Identifier HiLink VRMLInstName Identifier HiLink VRMLTypes Identifier delcommand HiLink endif let b:current_syntax = "vrml" " vim: ts=8
zyz2011-vim
runtime/syntax/vrml.vim
Vim Script
gpl2
13,217
" Vim syntax file " Language: Makefile " Maintainer: Claudio Fleiner <claudio@fleiner.com> " URL: http://www.fleiner.com/vim/syntax/make.vim " Last Change: 2008 Aug 04 " 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") finish endif " some special characters syn match makeSpecial "^\s*[@+-]\+" syn match makeNextLine "\\\n\s*" " some directives syn match makePreCondit "^ *\(ifeq\>\|else\>\|endif\>\|ifneq\>\|ifdef\>\|ifndef\>\)" syn match makeInclude "^ *[-s]\=include" syn match makeStatement "^ *vpath" syn match makeExport "^ *\(export\|unexport\)\>" syn match makeOverride "^ *override" hi link makeOverride makeStatement hi link makeExport makeStatement " Koehler: catch unmatched define/endef keywords. endef only matches it is by itself on a line syn region makeDefine start="^\s*define\s" end="^\s*endef\s*$" contains=makeStatement,makeIdent,makePreCondit,makeDefine " Microsoft Makefile specials syn case ignore syn match makeInclude "^! *include" syn match makePreCondit "! *\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|elseif\|else if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>" syn case match " identifiers syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent,makeSString,makeDString syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeSString,makeDString syn match makeIdent "\$\$\w*" syn match makeIdent "\$[^({]" syn match makeIdent "^ *\a\w*\s*[:+?!*]="me=e-2 syn match makeIdent "^ *\a\w*\s*="me=e-1 syn match makeIdent "%" " Makefile.in variables syn match makeConfig "@[A-Za-z0-9_]\+@" " make targets " syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>" syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 nextgroup=makeSource syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 nextgroup=makeSource syn region makeTarget transparent matchgroup=makeTarget start="^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands syn match makeTarget "^[A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget skipnl nextgroup=makeCommands,makeCommandError syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError syn match makeCommandError "^\s\+\S.*" contained syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError syn match makeCmdNextLine "\\\n."he=e-1 contained " Statements / Functions (GNU make) syn match makeStatement contained "(\(subst\|abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 " Comment if exists("make_microsoft") syn match makeComment "#.*" contains=@Spell,makeTodo elseif !exists("make_no_comments") syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=@Spell,makeTodo syn match makeComment "#$" contains=@Spell endif syn keyword makeTodo TODO FIXME XXX contained " match escaped quotes and any other escaped character " except for $, as a backslash in front of a $ does " not make it a standard character, but instead it will " still act as the beginning of a variable " The escaped char is not highlightet currently syn match makeEscapedChar "\\[^$]" syn region makeDString start=+\(\\\)\@<!"+ skip=+\\.+ end=+"+ contains=makeIdent syn region makeSString start=+\(\\\)\@<!'+ skip=+\\.+ end=+'+ contains=makeIdent syn region makeBString start=+\(\\\)\@<!`+ skip=+\\.+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine " Syncing syn sync minlines=20 maxlines=200 " Sync on Make command block region: When searching backwards hits a line that " can't be a command or a comment, use makeCommands if it looks like a target, " NONE otherwise. syn sync match makeCommandSync groupthere NONE "^[^\t#]" syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]" syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}\s*$" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_make_syn_inits") if version < 508 let did_make_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink makeNextLine makeSpecial HiLink makeCmdNextLine makeSpecial HiLink makeSpecTarget Statement if !exists("make_no_commands") HiLink makeCommands Number endif HiLink makeImplicit Function HiLink makeTarget Function HiLink makeInclude Include HiLink makePreCondit PreCondit HiLink makeStatement Statement HiLink makeIdent Identifier HiLink makeSpecial Special HiLink makeComment Comment HiLink makeDString String HiLink makeSString String HiLink makeBString Function HiLink makeError Error HiLink makeTodo Todo HiLink makeDefine Define HiLink makeCommandError Error HiLink makeConfig PreCondit delcommand HiLink endif let b:current_syntax = "make" " vim: ts=8
zyz2011-vim
runtime/syntax/make.vim
Vim Script
gpl2
6,386
" Vim syntax file " Language: lftp(1) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2007-06-17 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=- syn region lftpComment display oneline start='#' end='$' \ contains=lftpTodo,@Spell syn keyword lftpTodo contained TODO FIXME XXX NOTE syn region lftpString contained display \ start=+"+ skip=+\\$\|\\"+ end=+"+ end=+$+ syn match lftpNumber contained display '\<\d\+\(\.\d\+\)\=\>' syn keyword lftpBoolean contained yes no on off true false syn keyword lftpInterval contained infinity inf never forever syn match lftpInterval contained '\<\(\d\+\(\.\d\+\)\=[dhms]\)\+\>' syn keyword lftpKeywords alias anon at bookmark cache cat cd chmod close \ cls command debug du echo exit fg find get \ get1 glob help history jobs kill lcd lftp \ lpwd ls mget mirror mkdir module more mput \ mrm mv nlist open pget put pwd queue quote \ reget recls rels renlist repeat reput rm \ rmdir scache site source suspend user version \ wait zcat zmore syn region lftpSet matchgroup=lftpKeywords \ start="set" end=";" end="$" \ contains=lftpString,lftpNumber,lftpBoolean, \ lftpInterval,lftpSettingsPrefix,lftpSettings syn match lftpSettingsPrefix contained '\<\%(bmk\|cache\|cmd\|color\|dns\):' syn match lftpSettingsPrefix contained '\<\%(file\|fish\|ftp\|hftp\):' syn match lftpSettingsPrefix contained '\<\%(http\|https\|mirror\|module\):' syn match lftpSettingsPrefix contained '\<\%(net\|sftp\|ssl\|xfer\):' " bmk: syn keyword lftpSettings contained save-p[asswords] " cache: syn keyword lftpSettings contained cache-em[pty-listings] en[able] \ exp[ire] siz[e] " cmd: syn keyword lftpSettings contained at[-exit] cls-c[ompletion-default] \ cls-d[efault] cs[h-history] \ default-p[rotocol] default-t[itle] syn keyword lftpSettings contained fai[l-exit] in[teractive] \ lo[ng-running] ls[-default] mo[ve-background] \ prom[pt] \ rem[ote-completion] \ save-c[wd-history] save-r[l-history] \ set-t[erm-status] statu[s-interval] \ te[rm-status] verb[ose] verify-h[ost] \ verify-path verify-path[-cached] " color: syn keyword lftpSettings contained dir[-colors] use-c[olor] " dns: syn keyword lftpSettings contained S[RV-query] cache-en[able] \ cache-ex[pire] cache-s[ize] \ fat[al-timeout] o[rder] use-fo[rk] " file: syn keyword lftpSettings contained ch[arset] " fish: syn keyword lftpSettings contained connect[-program] sh[ell] " ftp: syn keyword lftpSettings contained acct anon-p[ass] anon-u[ser] \ au[to-sync-mode] b[ind-data-socket] \ ch[arset] cli[ent] dev[ice-prefix] \ fi[x-pasv-address] fxp-f[orce] \ fxp-p[assive-source] h[ome] la[ng] \ list-e[mpty-ok] list-o[ptions] \ nop[-interval] pas[sive-mode] \ port-i[pv4] port-r[ange] prox[y] \ rest-l[ist] rest-s[tor] \ retry-530 retry-530[-anonymous] \ sit[e-group] skey-a[llow] \ skey-f[orce] ssl-allow \ ssl-allow[-anonymous] ssl-au[th] \ ssl-f[orce] ssl-protect-d[ata] \ ssl-protect-l[ist] stat-[interval] \ sy[nc-mode] timez[one] use-a[bor] \ use-fe[at] use-fx[p] use-hf[tp] \ use-mdtm use-mdtm[-overloaded] \ use-ml[sd] use-p[ret] use-q[uit] \ use-site-c[hmod] use-site-i[dle] \ use-site-u[time] use-siz[e] \ use-st[at] use-te[lnet-iac] \ verify-a[ddress] verify-p[ort] \ w[eb-mode] " hftp: syn keyword lftpSettings contained w[eb-mode] cache prox[y] \ use-au[thorization] use-he[ad] use-ty[pe] " http: syn keyword lftpSettings contained accept accept-c[harset] \ accept-l[anguage] cache coo[kie] \ pos[t-content-type] prox[y] \ put-c[ontent-type] put-m[ethod] ref[erer] \ set-c[ookies] user[-agent] " https: syn keyword lftpSettings contained prox[y] " mirror: syn keyword lftpSettings contained exc[lude-regex] o[rder] \ parallel-d[irectories] \ parallel-t[ransfer-count] use-p[get-n] " module: syn keyword lftpSettings contained pat[h] " net: syn keyword lftpSettings contained connection-l[imit] \ connection-t[akeover] id[le] limit-m[ax] \ limit-r[ate] limit-total-m[ax] \ limit-total-r[ate] max-ret[ries] no-[proxy] \ pe[rsist-retries] reconnect-interval-b[ase] \ reconnect-interval-ma[x] \ reconnect-interval-mu[ltiplier] \ socket-bind-ipv4 socket-bind-ipv6 \ socket-bu[ffer] socket-m[axseg] timeo[ut] " sftp: syn keyword lftpSettings contained connect[-program] \ max-p[ackets-in-flight] prot[ocol-version] \ ser[ver-program] size-r[ead] size-w[rite] " ssl: syn keyword lftpSettings contained ca-f[ile] ca-p[ath] ce[rt-file] \ crl-f[ile] crl-p[ath] k[ey-file] \ verify-c[ertificate] " xfer: syn keyword lftpSettings contained clo[bber] dis[k-full-fatal] \ eta-p[eriod] eta-t[erse] mak[e-backup] \ max-red[irections] ra[te-period] hi def link lftpComment Comment hi def link lftpTodo Todo hi def link lftpString String hi def link lftpNumber Number hi def link lftpBoolean Boolean hi def link lftpInterval Number hi def link lftpKeywords Keyword hi def link lftpSettingsPrefix PreProc hi def link lftpSettings Type let b:current_syntax = "lftp" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/lftp.vim
Vim Script
gpl2
7,459
" Vim syntax file " Language: T2 / ROCK Linux .desc " Maintainer: René Rebe <rene@exactcode.de>, Piotr Esden-Tempski <esden@rocklinux.org> " Last Change: 2006 Aug 14 " 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") finish endif " syntax definitions setl iskeyword+=- syn keyword descFlag DIETLIBC KAFFE JAIL NOPARALLEL FPIC-QUIRK LIBTOOL-WUIRK NO-LIBTOOL-FIX AUTOMAKE-QUIRK NO-AS-NEEDED NO-SSP KERNEL INIT LIBC CC CXX F77 KCC contained syn keyword descLicense Unknown GPL LGPL FDL MIT BSD OpenSource Free-to-use Commercial contained " tags syn match descTag /^\[\(COPY\)\]/ syn match descTag /^\[\(I\|TITLE\)\]/ syn match descTag /^\[\(T\|TEXT\)\]/ contained syn match descTag /^\[\(U\|URL\)\]/ syn match descTag /^\[\(A\|AUTHOR\)\]/ syn match descTag /^\[\(M\|MAINTAINER\)\]/ syn match descTag /^\[\(C\|CATEGORY\)\]/ contained syn match descTag /^\[\(F\|FLAG\)\]/ contained syn match descTag /^\[\(E\|DEP\|DEPENDENCY\)\]/ syn match descTag /^\[\(R\|ARCH\|ARCHITECTURE\)\]/ syn match descTag /^\[\(L\|LICENSE\)\]/ contained syn match descTag /^\[\(S\|STATUS\)\]/ syn match descTag /^\[\(O\|CONF\)\]/ syn match descTag /^\[\(V\|VER\|VERSION\)\]/ syn match descTag /^\[\(P\|PRI\|PRIORITY\)\]/ nextgroup=descInstall skipwhite syn match descTag /^\[\(D\|DOWN\|DOWNLOAD\)\]/ nextgroup=descSum skipwhite " misc syn match descUrl /\w\+:\/\/\S\+/ syn match descCategory /\w\+\/\w\+/ contained syn match descEmail /<[\.A-Za-z0-9]\+@[\.A-Za-z0-9]\+>/ " priority tag syn match descInstallX /X/ contained syn match descInstallO /O/ contained syn match descInstall /[OX]/ contained contains=descInstallX,descInstallO nextgroup=descStage skipwhite syn match descDash /-/ contained syn match descDigit /\d/ contained syn match descStage /[\-0][\-1][\-2][\-3][\-4][\-5][\-6][\-7][\-8][\-9]/ contained contains=descDash,descDigit nextgroup=descCompilePriority skipwhite syn match descCompilePriority /\d\{3}\.\d\{3}/ contained " download tag syn match descSum /\d\+/ contained nextgroup=descTarball skipwhite syn match descTarball /\S\+/ contained nextgroup=descUrl skipwhite " tag regions syn region descText start=/^\[\(T\|TEXT\)\]/ end=/$/ contains=descTag,descUrl,descEmail syn region descTagRegion start=/^\[\(C\|CATEGORY\)\]/ end=/$/ contains=descTag,descCategory syn region descTagRegion start=/^\[\(F\|FLAG\)\]/ end=/$/ contains=descTag,descFlag syn region descTagRegion start=/^\[\(L\|LICENSE\)\]/ end=/$/ contains=descTag,descLicense " For version 5.7 and earlier: only when not done already " Define the default highlighting. " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_desc_syntax_inits") if version < 508 let did_desc_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink descFlag Identifier HiLink descLicense Identifier HiLink descCategory Identifier HiLink descTag Type HiLink descUrl Underlined HiLink descEmail Underlined " priority tag colors HiLink descInstallX Boolean HiLink descInstallO Type HiLink descDash Operator HiLink descDigit Number HiLink descCompilePriority Number " download tag colors HiLink descSum Number HiLink descTarball Underlined " tag region colors HiLink descText Comment delcommand HiLink endif let b:current_syntax = "desc"
zyz2011-vim
runtime/syntax/desc.vim
Vim Script
gpl2
3,494
" Vim syntax file " Language: Simula " Maintainer: Haakon Riiser <hakonrk@fys.uio.no> " URL: http://folk.uio.no/hakonrk/vim/syntax/simula.vim " Last Change: 2001 May 15 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syn clear elseif exists("b:current_syntax") finish endif " No case sensitivity in Simula syn case ignore syn match simulaComment "^%.*$" contains=simulaTodo syn region simulaComment start="!\|\<comment\>" end=";" contains=simulaTodo " Text between the keyword 'end' and either a semicolon or one of the " keywords 'end', 'else', 'when' or 'otherwise' is also a comment syn region simulaComment start="\<end\>"lc=3 matchgroup=Statement end=";\|\<\(end\|else\|when\|otherwise\)\>" syn match simulaCharError "'.\{-2,}'" syn match simulaCharacter "'.'" syn match simulaCharacter "'!\d\{-}!'" contains=simulaSpecialChar syn match simulaString '".\{-}"' contains=simulaSpecialChar,simulaTodo syn keyword simulaBoolean true false syn keyword simulaCompound begin end syn keyword simulaConditional else if otherwise then until when syn keyword simulaConstant none notext syn keyword simulaFunction procedure syn keyword simulaOperator eq eqv ge gt imp in is le lt ne new not qua syn keyword simulaRepeat while for syn keyword simulaReserved activate after at before delay go goto label prior reactivate switch to syn keyword simulaStatement do inner inspect step this syn keyword simulaStorageClass external hidden name protected value syn keyword simulaStructure class syn keyword simulaType array boolean character integer long real short text virtual syn match simulaAssigned "\<\h\w*\s*\((.*)\)\=\s*:\(=\|-\)"me=e-2 syn match simulaOperator "[&:=<>+\-*/]" syn match simulaOperator "\<and\(\s\+then\)\=\>" syn match simulaOperator "\<or\(\s\+else\)\=\>" syn match simulaReferenceType "\<ref\s*(.\{-})" syn match simulaSemicolon ";" syn match simulaSpecial "[(),.]" syn match simulaSpecialCharErr "!\d\{-4,}!" contained syn match simulaSpecialCharErr "!!" contained syn match simulaSpecialChar "!\d\{-}!" contains=simulaSpecialCharErr contained syn match simulaTodo "xxx\+" contained " Integer number (or float without `.') syn match simulaNumber "-\=\<\d\+\>" " Real with optional exponent syn match simulaReal "-\=\<\d\+\(\.\d\+\)\=\(&&\=[+-]\=\d\+\)\=\>" " Real starting with a `.', optional exponent syn match simulaReal "-\=\.\d\+\(&&\=[+-]\=\d\+\)\=\>" if version >= 508 || !exists("did_simula_syntax_inits") if version < 508 let did_simula_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink simulaAssigned Identifier HiLink simulaBoolean Boolean HiLink simulaCharacter Character HiLink simulaCharError Error HiLink simulaComment Comment HiLink simulaCompound Statement HiLink simulaConditional Conditional HiLink simulaConstant Constant HiLink simulaFunction Function HiLink simulaNumber Number HiLink simulaOperator Operator HiLink simulaReal Float HiLink simulaReferenceType Type HiLink simulaRepeat Repeat HiLink simulaReserved Error HiLink simulaSemicolon Statement HiLink simulaSpecial Special HiLink simulaSpecialChar SpecialChar HiLink simulaSpecialCharErr Error HiLink simulaStatement Statement HiLink simulaStorageClass StorageClass HiLink simulaString String HiLink simulaStructure Structure HiLink simulaTodo Todo HiLink simulaType Type delcommand HiLink endif let b:current_syntax = "simula" " vim: sts=4 sw=4 ts=8
zyz2011-vim
runtime/syntax/simula.vim
Vim Script
gpl2
3,681
" Vim syntax file " Language: Expect " Maintainer: Ralph Jennings <knowbudy@oro.net> " Last Change: 2012 Jun 01 " (Dominique Pelle added @Spell) " 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") finish endif " Reserved Expect variable prefixes. syn match expectVariables "\$exp[a-zA-Z0-9_]*\|\$inter[a-zA-Z0-9_]*" syn match expectVariables "\$spawn[a-zA-Z0-9_]*\|\$timeout[a-zA-Z0-9_]*" " Normal Expect variables. syn match expectVariables "\$env([^)]*)" syn match expectVariables "\$any_spawn_id\|\$argc\|\$argv\d*" syn match expectVariables "\$user_spawn_id\|\$spawn_id\|\$timeout" " Expect variable arrays. syn match expectVariables "\$\(expect\|interact\)_out([^)]*)" contains=expectOutVar " User defined variables. syn match expectVariables "\$[a-zA-Z_][a-zA-Z0-9_]*" " Reserved Expect command prefixes. syn match expectCommand "exp_[a-zA-Z0-9_]*" " Normal Expect commands. syn keyword expectStatement close debug disconnect syn keyword expectStatement exit exp_continue exp_internal exp_open syn keyword expectStatement exp_pid exp_version syn keyword expectStatement fork inter_return interpreter syn keyword expectStatement log_file log_user match_max overlay syn keyword expectStatement parity remove_nulls return syn keyword expectStatement send send_error send_log send_user syn keyword expectStatement sleep spawn strace stty system syn keyword expectStatement timestamp trace trap wait " Tcl commands recognized and used by Expect. syn keyword expectCommand proc syn keyword expectConditional if else syn keyword expectRepeat while for foreach " Expect commands with special arguments. syn keyword expectStatement expect expect_after expect_background nextgroup=expectExpectOpts syn keyword expectStatement expect_before expect_user interact nextgroup=expectExpectOpts syn match expectSpecial contained "\\." " Options for "expect", "expect_after", "expect_background", " "expect_before", "expect_user", and "interact". syn keyword expectExpectOpts default eof full_buffer null return timeout syn keyword expectOutVar contained spawn_id seconds seconds_total syn keyword expectOutVar contained string start end buffer " Numbers (Tcl style). syn case ignore syn match expectNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" "floating point number, with dot, optional exponent syn match expectNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, starting with a dot, optional exponent syn match expectNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match expectNumber "\<\d\+e[-+]\=\d\+[fl]\=\>" "hex number syn match expectNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" "syn match expectIdentifier "\<[a-z_][a-z0-9_]*\>" syn case match syn region expectString start=+"+ end=+"+ contains=@Spell,expectVariables,expectSpecial " Are these really comments in Expect? (I never use it, so I'm just guessing). syn keyword expectTodo contained TODO syn match expectComment "#.*$" contains=@Spell,expectTodo syn match expectSharpBang "\%^#!.*" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_expect_syntax_inits") if version < 508 let did_expect_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink expectSharpBang PreProc HiLink expectVariables Special HiLink expectCommand Function HiLink expectStatement Statement HiLink expectConditional Conditional HiLink expectRepeat Repeat HiLink expectExpectOpts Keyword HiLink expectOutVar Special HiLink expectSpecial Special HiLink expectNumber Number HiLink expectString String HiLink expectComment Comment HiLink expectTodo Todo "HiLink expectIdentifier Identifier delcommand HiLink endif let b:current_syntax = "expect" " vim: ts=8
zyz2011-vim
runtime/syntax/expect.vim
Vim Script
gpl2
4,114
" Vim syntax file " Language: group(5) user group file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match groupBegin display '^' nextgroup=groupName syn match groupName contained display '[a-z_][a-z0-9_-]\{0,15}' \ nextgroup=groupPasswordColon syn match groupPasswordColon contained display ':' \ nextgroup=groupPassword,groupShadow syn match groupPassword contained display '[^:]*' \ nextgroup=groupGIDColon syn match groupShadow contained display '[x*]' nextgroup=groupGIDColon syn match groupGIDColon contained display ':' nextgroup=groupGID syn match groupGID contained display '\d*' \ nextgroup=groupUserListColon syn match groupUserListColon contained display ':' nextgroup=groupUserList syn match groupUserList contained '[a-z_][a-z0-9_-]*' \ nextgroup=groupUserListSep syn match groupUserListSep contained display ',' nextgroup=groupUserList hi def link groupDelimiter Normal hi def link groupName Identifier hi def link groupPasswordColon groupDelimiter hi def link groupPassword Number hi def link groupShadow Special hi def link groupGIDColon groupDelimiter hi def link groupGID Number hi def link groupUserListColon groupDelimiter hi def link groupUserList Identifier hi def link groupUserListSep groupDelimiter let b:current_syntax = "group" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/group.vim
Vim Script
gpl2
1,735
" Vim syntax file " Language: BibTeX (bibliographic database format for (La)TeX) " Maintainer: Bernd Feige <Bernd.Feige@gmx.net> " Filenames: *.bib " Last Change: 2011 Dec 25 " Thanks to those who pointed out problems with this file or supplied fixes! " Initialization " ============== " 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") finish endif let s:cpo_save = &cpo set cpo&vim " Ignore case syn case ignore " Keywords " ======== syn keyword bibType contained article book booklet conference inbook syn keyword bibType contained incollection inproceedings manual syn keyword bibType contained mastersthesis misc phdthesis syn keyword bibType contained proceedings techreport unpublished syn keyword bibType contained string syn keyword bibEntryKw contained address annote author booktitle chapter syn keyword bibEntryKw contained crossref edition editor howpublished syn keyword bibEntryKw contained institution journal key month note syn keyword bibEntryKw contained number organization pages publisher syn keyword bibEntryKw contained school series title type volume year " Non-standard: syn keyword bibNSEntryKw contained abstract isbn issn keywords url " AMS mref http://www.ams.org/mref syn keyword bibNSEntryKw contained mrclass mrnumber mrreviewer fjournal coden " Clusters " ======== syn cluster bibVarContents contains=bibUnescapedSpecial,bibBrace,bibParen " This cluster is empty but things can be added externally: "syn cluster bibCommentContents " Matches " ======= syn match bibUnescapedSpecial contained /[^\\][%&]/hs=s+1 syn match bibKey contained /\s*[^ \t}="]\+,/hs=s,he=e-1 nextgroup=bibField syn match bibVariable contained /[^{}," \t=]/ syn region bibComment start=/./ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry syn region bibQuote contained start=/"/ end=/"/ skip=/\(\\"\)/ contains=@bibVarContents syn region bibBrace contained start=/{/ end=/}/ skip=/\(\\[{}]\)/ contains=@bibVarContents syn region bibParen contained start=/(/ end=/)/ skip=/\(\\[()]\)/ contains=@bibVarContents syn region bibField contained start="\S\+\s*=\s*" end=/[}),]/me=e-1 contains=bibEntryKw,bibNSEntryKw,bibBrace,bibParen,bibQuote,bibVariable syn region bibEntryData contained start=/[{(]/ms=e+1 end=/[})]/me=e-1 contains=bibKey,bibField " Actually, 5.8 <= Vim < 6.0 would ignore the `fold' keyword anyway, but Vim<5.8 would produce " an error, so we explicitly distinguish versions with and without folding functionality: if version < 600 syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent contains=bibType,bibEntryData nextgroup=bibComment else syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment endif syn region bibComment2 start=/@Comment\s*[{(]/ end=/^\s*[})]/me=e-1 contains=@bibCommentContents nextgroup=bibEntry " Synchronization " =============== syn sync match All grouphere bibEntry /^\s*@/ syn sync maxlines=200 syn sync minlines=50 " Highlighting defaults " ===================== " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_bib_syn_inits") if version < 508 let did_bib_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink bibType Identifier HiLink bibEntryKw Statement HiLink bibNSEntryKw PreProc HiLink bibKey Special HiLink bibVariable Constant HiLink bibUnescapedSpecial Error HiLink bibComment Comment HiLink bibComment2 Comment delcommand HiLink endif let b:current_syntax = "bib" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/bib.vim
Vim Script
gpl2
3,851
" Vim syntax file " Language: Vera " Maintainer: Dave Eggum (opine at bluebottle dOt com) " Last Change: 2005 Dec 19 " NOTE: extra white space at the end of the line will be highlighted if you " add this line to your colorscheme: " highlight SpaceError guibg=#204050 " (change the value for guibg to any color you like) " 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") finish endif " A bunch of useful Vera keywords syn keyword veraStatement break return continue fork join terminate syn keyword veraStatement breakpoint proceed syn keyword veraLabel bad_state bad_trans bind constraint coverage_group syn keyword veraLabel class CLOCK default function interface m_bad_state syn keyword veraLabel m_bad_trans m_state m_trans program randseq state syn keyword veraLabel task trans syn keyword veraConditional if else case casex casez randcase syn keyword veraRepeat repeat while for do foreach syn keyword veraModifier after all any around assoc_size async syn keyword veraModifier before big_endian bit_normal bit_reverse export syn keyword veraModifier extends extern little_endian local hdl_node hdl_task syn keyword veraModifier negedge none packed protected posedge public rules syn keyword veraModifier shadow soft static super this typedef unpacked var syn keyword veraModifier vca virtual virtuals wildcard with syn keyword veraType reg string enum event bit syn keyword veraType rand randc integer port prod syn keyword veraDeprecated call_func call_task close_conn get_bind get_bind_id syn keyword veraDeprecated get_conn_err mailbox_receive mailbox_send make_client syn keyword veraDeprecated make_server simwave_plot up_connections " predefined tasks and functions syn keyword veraTask alloc assoc_index cast_assign cm_coverage syn keyword veraTask cm_get_coverage cm_get_limit delay error error_mode syn keyword veraTask exit fclose feof ferror fflush flag fopen fprintf syn keyword veraTask freadb freadh freadstr get_cycle get_env get_memsize syn keyword veraTask get_plus_arg getstate get_systime get_time get_time_unit syn keyword veraTask initstate lock_file mailbox_get mailbox_put os_command syn keyword veraTask printf prodget prodset psprintf query query_str query_x syn keyword veraTask rand48 random region_enter region_exit rewind syn keyword veraTask semaphore_get semaphore_put setstate signal_connect syn keyword veraTask sprintf srandom sscanf stop suspend_thread sync syn keyword veraTask timeout trace trigger unit_delay unlock_file urand48 syn keyword veraTask urandom urandom_range vera_bit_reverse vera_crc syn keyword veraTask vera_pack vera_pack_big_endian vera_plot syn keyword veraTask vera_report_profile vera_unpack vera_unpack_big_endian syn keyword veraTask vsv_call_func vsv_call_task vsv_get_conn_err syn keyword veraTask vsv_make_client vsv_make_server vsv_up_connections syn keyword veraTask vsv_wait_for_done vsv_wait_for_input wait_child wait_var syn cluster veraOperGroup contains=veraOperator,veraOperParen,veraNumber,veraString,veraOperOk,veraType " syn match veraOperator "++\|--\|&\|\~&\||\|\~|\|^\|\~^\|\~\|><" " syn match veraOperator "*\|/\|%\|+\|-\|<<\|>>\|<\|<=\|>\|>=\|!in" " syn match veraOperator "=?=\|!?=\|==\|!=\|===\|!==\|&\~\|^\~\||\~" " syn match veraOperator "&&\|||\|=\|+=\|-=\|*=\|/=\|%=\|<<=\|>>=\|&=" " syn match veraOperator "|=\|^=\|\~&=\|\~|=\|\~^=" syn match veraOperator "[&|\~><!*@+/=,.\^\-]" syn keyword veraOperator or in dist not " open vera class methods syn keyword veraMethods atobin atohex atoi atooct backref bittostr capacity syn keyword veraMethods compare Configure constraint_mode delete DisableTrigger syn keyword veraMethods DoAction empty EnableCount EnableTrigger Event find syn keyword veraMethods find_index first first_index GetAssert get_at_least syn keyword veraMethods get_auto_bin getc GetCount get_coverage_goal get_cov_weight syn keyword veraMethods get_cross_bin_max GetFirstAssert GetName GetNextAssert syn keyword veraMethods get_status get_status_msg hide hash icompare insert syn keyword veraMethods inst_get_at_least inst_get_auto_bin_max inst_get_collect syn keyword veraMethods inst_get_coverage_goal inst_get_cov_weight inst_getcross_bin_max syn keyword veraMethods inst_query inst_set_at_least inst_set_auto_bin_max syn keyword veraMethods inst_set_bin_activiation inst_set_collect inst_set_coverage_goal syn keyword veraMethods inst_set_cov_weight inst_set_cross_bin_max itoa last last_index syn keyword veraMethods len load match max max_index min min_index new object_compare syn keyword veraMethods object_compare object_copy object_print pack pick_index syn keyword veraMethods pop_back pop_front post_boundary postmatch post_pack post_pack syn keyword veraMethods post_randomize post_randomize post_unpack post_unpack syn keyword veraMethods pre_boundary prematch pre_pack pre_pack pre_randomize syn keyword veraMethods pre-randomize pre_unpack push_back push_front putc query syn keyword veraMethods query_str rand_mode randomize reserve reverse rsort search syn keyword veraMethods set_at_least set_auto_bin_max set_bin_activiation syn keyword veraMethods set_coverage_goal set_cov_weight set_cross_bin_max set_name syn keyword veraMethods size sort substr sum thismatch tolower toupper unique_index syn keyword veraMethods unpack Wait " interface keywords syn keyword veraInterface ASYNC CLOCK gnr gr0 gr1 grx grz NHOLD nr NR0 NR1 syn keyword veraInterface NRZ NRZ NSAMPLE PHOLD PR0 PR1 PRX PRZ r0 r1 rx snr syn keyword veraInterface sr0 sr1 srx srz depth inout input output syn match veraInterface "\$\w\+" syn keyword veraTodo contained TODO FIXME XXX FINISH " veraCommentGroup allows adding matches for special things in comments syn cluster veraCommentGroup contains=veraTodo " String and Character constants " Highlight special characters (those which have a backslash) differently syn match veraSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" syn match veraFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpnm]\|\[\^\=.[^]]*\]\)" contained syn match veraFormat display "%%" contained syn region veraString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=veraSpecial,veraFormat,@Spell syn region veraConcat contained transparent oneline start='{' end='}' " veraCppString: same as veraString, but ends at end of line syn region veraCppString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=veraSpecial,veraFormat,@Spell syn match veraCharacter "'[^\\]'" syn match veraCharacter "L'[^']*'" contains=veraSpecial syn match veraSpecialError "'\\[^'\"?\\abefnrtv]'" syn match veraSpecialCharacter "'\\['\"?\\abefnrtv]'" syn match veraSpecialCharacter display "'\\\o\{1,3}'" syn match veraSpecialCharacter display "'\\x\x\{1,2}'" syn match veraSpecialCharacter display "L'\\x\x\+'" " highlight trailing white space syn match veraSpaceError display excludenl "\s\+$" syn match veraSpaceError display " \+\t"me=e-1 "catch errors caused by wrong parenthesis and brackets syn cluster veraParenGroup contains=veraParenError,veraIncluded,veraSpecial,veraCommentSkip,veraCommentString,veraComment2String,@veraCommentGroup,veraCommentStartError,veraUserCont,veraUserLabel,veraBitField,veraCommentSkip,veraOctalZero,veraCppOut,veraCppOut2,veraCppSkip,veraFormat,veraNumber,veraFloat,veraOctal,veraOctalError,veraNumbersCom syn region veraParen transparent start='(' end=')' contains=ALLBUT,@veraParenGroup,veraCppParen,veraErrInBracket,veraCppBracket,veraCppString,@Spell " veraCppParen: same as veraParen but ends at end-of-line; used in veraDefine syn region veraCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@veraParenGroup,veraErrInBracket,veraParen,veraBracket,veraString,@Spell syn match veraParenError display "[\])]" " syn match veraErrInParen display contained "[\]{}]" syn match veraErrInParen display contained "[\]]" syn region veraBracket transparent start='\[' end=']' contains=ALLBUT,@veraParenGroup,veraErrInParen,veraCppParen,veraCppBracket,veraCppString,@Spell " veraCppBracket: same as veraParen but ends at end-of-line; used in veraDefine syn region veraCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@veraParenGroup,veraErrInParen,veraParen,veraBracket,veraString,@Spell syn match veraErrInBracket display contained "[);{}]" "integer number, or floating point number without a dot and with "f". syn case ignore syn match veraNumbers display transparent "\<\d\|\.\d" contains=veraNumber,veraFloat,veraOctalError,veraOctal " Same, but without octal error (for comments) syn match veraNumbersCom display contained transparent "\<\d\|\.\d" contains=veraNumber,veraFloat,veraOctal " syn match veraNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" " "hex number " syn match veraNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" " syn match veraNumber "\(\<[0-9]\+\|\)'[bdoh][0-9a-fxzA-FXZ_]\+\>" syn match veraNumber "\<\(\<[0-9]\+\)\?\('[bdoh]\)\?[0-9a-fxz_]\+\>" " syn match veraNumber "\<[+-]\=[0-9]\+\>" " Flag the first zero of an octal number as something special syn match veraOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=veraOctalZero syn match veraOctalZero display contained "\<0" syn match veraFloat display contained "\d\+f" "floating point number, with dot, optional exponent syn match veraFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" "floating point number, starting with a dot, optional exponent syn match veraFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match veraFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" "hexadecimal floating point number, optional leading digits, with dot, with exponent syn match veraFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" "hexadecimal floating point number, with leading digits, optional dot, with exponent syn match veraFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" " flag an octal number with wrong digits syn match veraOctalError display contained "0\o*[89]\d*" syn case match let vera_comment_strings = 1 if exists("vera_comment_strings") " A comment can contain veraString, veraCharacter and veraNumber. " But a "*/" inside a veraString in a veraComment DOES end the comment! So we " need to use a special type of veraString: veraCommentString, which also ends on " "*/", and sees a "*" at the start of the line as comment again. " Unfortunately this doesn't work very well for // type of comments :-( syntax match veraCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region veraCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=veraSpecial,veraCommentSkip syntax region veraComment2String contained start=+\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=veraSpecial syntax region veraCommentL start="//" skip="\\$" end="$" keepend contains=@veraCommentGroup,veraComment2String,veraCharacter,veraNumbersCom,veraSpaceError,@Spell if exists("vera_no_comment_fold") syntax region veraComment matchgroup=veraCommentStart start="/\*" end="\*/" contains=@veraCommentGroup,veraCommentStartError,veraCommentString,veraCharacter,veraNumbersCom,veraSpaceError,@Spell else syntax region veraComment matchgroup=veraCommentStart start="/\*" end="\*/" contains=@veraCommentGroup,veraCommentStartError,veraCommentString,veraCharacter,veraNumbersCom,veraSpaceError,@Spell fold endif else syn region veraCommentL start="//" skip="\\$" end="$" keepend contains=@veraCommentGroup,veraSpaceError,@Spell if exists("vera_no_comment_fold") syn region veraComment matchgroup=veraCommentStart start="/\*" end="\*/" contains=@veraCommentGroup,veraCommentStartError,veraSpaceError,@Spell else syn region veraComment matchgroup=veraCommentStart start="/\*" end="\*/" contains=@veraCommentGroup,veraCommentStartError,veraSpaceError,@Spell fold endif endif " keep a // comment separately, it terminates a preproc. conditional syntax match veraCommentError display "\*/" syntax match veraCommentStartError display "/\*"me=e-1 contained syntax region veraBlock start="{" end="}" transparent fold " open vera pre-defined constants syn keyword veraConstant ALL ANY BAD_STATE BAD_TRANS CALL CHECK CHGEDGE syn keyword veraConstant CLEAR COPY_NO_WAIT COPY_WAIT CROSS CROSS_TRANS syn keyword veraConstant DEBUG DELETE EC_ARRAYX EC_CODE_END EC_CONFLICT syn keyword veraConstant EC_EVNTIMOUT EC_EXPECT EC_FULLEXPECT EC_MBXTMOUT syn keyword veraConstant EC_NEXPECT EC_RETURN EC_RGNTMOUT EC_SCONFLICT syn keyword veraConstant EC_SEMTMOUT EC_SEXPECT EC_SFULLEXPECT EC_SNEXTPECT syn keyword veraConstant EC_USERSET EQ EVENT FAIL FIRST FORK GE GOAL GT syn keyword veraConstant HAND_SHAKE HI HIGH HNUM LE LIC_EXIT LIC_PRERR syn keyword veraConstant LIC_PRWARN LIC_WAIT LO LOAD LOW LT MAILBOX MAX_COM syn keyword veraConstant NAME NE NEGEDGE NEXT NO_OVERLAP NO_OVERLAP_STATE syn keyword veraConstant NO_OVERLAP_TRANS NO_VARS NO_WAIT NUM NUM_BIN syn keyword veraConstant NUM_DET null OFF OK OK_LAST ON ONE_BLAST ONE_SHOT ORDER syn keyword veraConstant PAST_IT PERCENT POSEDGE PROGRAM RAWIN REGION REPORT syn keyword veraConstant SAMPLE SAVE SEMAPHORE SET SILENT STATE stderr syn keyword veraConstant stdin stdout STR STR_ERR_OUT_OF_RANGE syn keyword veraConstant STR_ERR_REGEXP_SYNTAX SUM TRANS VERBOSE void WAIT syn keyword veraConstant __LINE__ __FILE__ __DATE__ __TIME__ __VERA__ syn keyword veraConstant __VERSION__ __VERA_VERSION__ __VERA_MINOR__ syn keyword veraConstant __VERA_PATCH__ __VERA_VMC__ __VERA_VMC_MINOR__ syn match veraUserConstant "\<[A-Z][A-Z0-9_]\+\>" syn match veraClass "\zs\w\+\ze::" syn match veraClass "\zs\w\+\ze\s\+\w\+\s*[=;,)\[]" contains=veraConstant,veraUserConstant syn match veraClass "\zs\w\+\ze\s\+\w\+\s*$" contains=veraConstant,veraUserConstant syn match veraUserMethod "\zs\w\+\ze\s*(" contains=veraConstant,veraUserConstant syn match veraObject "\zs\w\+\ze\.\w" syn match veraObject "\zs\w\+\ze\.\$\w" " Accept ` for # (Verilog) syn region veraPreCondit start="^\s*\(`\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=veraComment,veraCppString,veraCharacter,veraCppParen,veraParenError,veraNumbers,veraCommentError,veraSpaceError syn match veraPreCondit display "^\s*\(`\|#\)\s*\(else\|endif\)\>" if !exists("vera_no_if0") syn region veraCppOut start="^\s*\(`\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=veraCppOut2 syn region veraCppOut2 contained start="0" end="^\s*\(`\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=veraSpaceError,veraCppSkip syn region veraCppSkip contained start="^\s*\(`\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(`\|#\)\s*endif\>" contains=veraSpaceError,veraCppSkip endif syn region veraIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match veraIncluded display contained "<[^>]*>" syn match veraInclude display "^\s*\(`\|#\)\s*include\>\s*["<]" contains=veraIncluded "syn match veraLineSkip "\\$" syn cluster veraPreProcGroup contains=veraPreCondit,veraIncluded,veraInclude,veraDefine,veraErrInParen,veraErrInBracket,veraUserLabel,veraSpecial,veraOctalZero,veraCppOut,veraCppOut2,veraCppSkip,veraFormat,veraNumber,veraFloat,veraOctal,veraOctalError,veraNumbersCom,veraString,veraCommentSkip,veraCommentString,veraComment2String,@veraCommentGroup,veraCommentStartError,veraParen,veraBracket,veraMulti syn region veraDefine start="^\s*\(`\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@veraPreProcGroup,@Spell syn region veraPreProc start="^\s*\(`\|#\)\s*\(pragma\>\|line\>\|warning\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@veraPreProcGroup,@Spell " Highlight User Labels syn cluster veraMultiGroup contains=veraIncluded,veraSpecial,veraCommentSkip,veraCommentString,veraComment2String,@veraCommentGroup,veraCommentStartError,veraUserCont,veraUserLabel,veraBitField,veraOctalZero,veraCppOut,veraCppOut2,veraCppSkip,veraFormat,veraNumber,veraFloat,veraOctal,veraOctalError,veraNumbersCom,veraCppParen,veraCppBracket,veraCppString syn region veraMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@veraMultiGroup,@Spell " syn region veraMulti transparent start='?' skip='::' end=':' contains=ALL " The above causes veraCppOut2 to catch on: " i = (isTrue) ? 0 : 1; " which ends up commenting the rest of the file " Avoid matching foo::bar() by requiring that the next char is not ':' syn cluster veraLabelGroup contains=veraUserLabel syn match veraUserCont display "^\s*\I\i*\s*:$" contains=@veraLabelGroup syn match veraUserCont display ";\s*\I\i*\s*:$" contains=@veraLabelGroup syn match veraUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@veraLabelGroup syn match veraUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@veraLabelGroup syn match veraUserLabel display "\I\i*" contained " Avoid recognizing most bitfields as labels syn match veraBitField display "^\s*\I\i*\s*:\s*[1-9]"me=e-1 syn match veraBitField display ";\s*\I\i*\s*:\s*[1-9]"me=e-1 if exists("vera_minlines") let b:vera_minlines = vera_minlines else if !exists("vera_no_if0") let b:vera_minlines = 50 " #if 0 constructs can be long else let b:vera_minlines = 15 " mostly for () constructs endif endif exec "syn sync ccomment veraComment minlines=" . b:vera_minlines " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_vera_syn_inits") if version < 508 let did_vera_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink veraClass Identifier HiLink veraObject Identifier HiLink veraUserMethod Function HiLink veraTask Keyword HiLink veraModifier Tag HiLink veraDeprecated veraError HiLink veraMethods Statement " HiLink veraInterface Label HiLink veraInterface Function HiLink veraFormat veraSpecial HiLink veraCppString veraString HiLink veraCommentL veraComment HiLink veraCommentStart veraComment HiLink veraLabel Label HiLink veraUserLabel Label HiLink veraConditional Conditional HiLink veraRepeat Repeat HiLink veraCharacter Character HiLink veraSpecialCharacter veraSpecial HiLink veraNumber Number HiLink veraOctal Number HiLink veraOctalZero PreProc " link this to Error if you want HiLink veraFloat Float HiLink veraOctalError veraError HiLink veraParenError veraError HiLink veraErrInParen veraError HiLink veraErrInBracket veraError HiLink veraCommentError veraError HiLink veraCommentStartError veraError HiLink veraSpaceError SpaceError HiLink veraSpecialError veraError HiLink veraOperator Operator HiLink veraStructure Structure HiLink veraInclude Include HiLink veraPreProc PreProc HiLink veraDefine Macro HiLink veraIncluded veraString HiLink veraError Error HiLink veraStatement Statement HiLink veraPreCondit PreCondit HiLink veraType Type " HiLink veraConstant Constant HiLink veraConstant Keyword HiLink veraUserConstant Constant HiLink veraCommentString veraString HiLink veraComment2String veraString HiLink veraCommentSkip veraComment HiLink veraString String HiLink veraComment Comment HiLink veraSpecial SpecialChar HiLink veraTodo Todo HiLink veraCppSkip veraCppOut HiLink veraCppOut2 veraCppOut HiLink veraCppOut Comment delcommand HiLink endif let b:current_syntax = "vera" " vim: ts=8
zyz2011-vim
runtime/syntax/vera.vim
Vim Script
gpl2
19,802
" Vim syntax file " Language: Novell "NCF" Batch File " Maintainer: Jonathan J. Miner <miner@doit.wisc.edu> " Last Change: Tue, 04 Sep 2001 16:20:33 CDT " $Id: ncf.vim,v 1.1 2004/06/13 16:31:58 vimboss Exp $ " Remove any old syntax stuff hanging around if version < 600 syn clear elseif exists("b:current_syntax") finish endif syn case ignore syn keyword ncfCommands mount load unload syn keyword ncfBoolean on off syn keyword ncfCommands set nextgroup=ncfSetCommands syn keyword ncfTimeTypes Reference Primary Secondary Single syn match ncfLoad "\(unl\|l\)oad .*"lc=4 contains=ALLBUT,Error syn match ncfMount "mount .*"lc=5 contains=ALLBUT,Error syn match ncfComment "^\ *rem.*$" syn match ncfComment "^\ *;.*$" syn match ncfComment "^\ *#.*$" syn match ncfSearchPath "search \(add\|del\) " nextgroup=ncfPath syn match ncfPath "\<[^: ]\+:\([A-Za-z0-9._]\|\\\)*\>" syn match ncfServerName "^file server name .*$" syn match ncfIPXNet "^ipx internal net" " String syn region ncfString start=+"+ end=+"+ syn match ncfContString "= \(\(\.\{0,1}\(OU=\|O=\)\{0,1}[A-Z_]\+\)\+;\{0,1}\)\+"lc=2 syn match ncfHexNumber "\<\d\(\d\+\|[A-F]\+\)*\>" syn match ncfNumber "\<\d\+\.\{0,1}\d*\>" syn match ncfIPAddr "\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}" syn match ncfTime "\(+|=\)\{0,1}\d\{1,2}:\d\{1,2}:\d\{1,2}" syn match ncfDSTTime "([^ ]\+ [^ ]\+ \(FIRST\|LAST\)\s*\d\{1,2}:\d\{1,2}:\d\{1,2} \(AM\|PM\))" syn match ncfTimeZone "[A-Z]\{3}\d[A-Z]\{3}" syn match ncfLogins "^\([Dd]is\|[Ee]n\)able login[s]*" syn match ncfScript "[^ ]*\.ncf" " SET Commands that take a Number following syn match ncfSetCommandsNum "\(Alert Message Nodes\)\s*=" syn match ncfSetCommandsNum "\(Auto Restart After Abend\)\s*=" syn match ncfSetCommandsNum "\(Auto Restart After Abend Delay Time\)\s*=" syn match ncfSetCommandsNum "\(Compression Daily Check Starting Hour\)\s*=" syn match ncfSetCommandsNum "\(Compression Daily Check Stop Hour\)\s*=" syn match ncfSetCommandsNum "\(Concurrent Remirror Requests\)\s*=" syn match ncfSetCommandsNum "\(Convert Compressed to Uncompressed Option\)\s*=" syn match ncfSetCommandsNum "\(Days Untouched Before Compression\)\s*=" syn match ncfSetCommandsNum "\(Decompress Free Space Warning Interval\)\s*=" syn match ncfSetCommandsNum "\(Decompress Percent Disk Space Free to Allow Commit\)\s*=" syn match ncfSetCommandsNum "\(Deleted Files Compression Option\)\s*=" syn match ncfSetCommandsNum "\(Directory Cache Allocation Wait Time\)\s*=" syn match ncfSetCommandsNum "\(Enable IPX Checksums\)\s*=" syn match ncfSetCommandsNum "\(Garbage Collection Interval\)\s*=" syn match ncfSetCommandsNum "\(IPX NetBIOS Replication Option\)\s*=" syn match ncfSetCommandsNum "\(Maximum Concurrent Compressions\)\s*=" syn match ncfSetCommandsNum "\(Maximum Concurrent Directory Cache Writes\)\s*=" syn match ncfSetCommandsNum "\(Maximum Concurrent Disk Cache Writes\)\s*=" syn match ncfSetCommandsNum "\(Maximum Directory Cache Buffers\)\s*=" syn match ncfSetCommandsNum "\(Maximum Extended Attributes per File or Path\)\s*=" syn match ncfSetCommandsNum "\(Maximum File Locks\)\s*=" syn match ncfSetCommandsNum "\(Maximum File Locks Per Connection\)\s*=" syn match ncfSetCommandsNum "\(Maximum Interrupt Events\)\s*=" syn match ncfSetCommandsNum "\(Maximum Number of Directory Handles\)\s*=" syn match ncfSetCommandsNum "\(Maximum Number of Internal Directory Handles\)\s*=" syn match ncfSetCommandsNum "\(Maximum Outstanding NCP Searches\)\s*=" syn match ncfSetCommandsNum "\(Maximum Packet Receive Buffers\)\s*=" syn match ncfSetCommandsNum "\(Maximum Physical Receive Packet Size\)\s*=" syn match ncfSetCommandsNum "\(Maximum Record Locks\)\s*=" syn match ncfSetCommandsNum "\(Maximum Record Locks Per Connection\)\s*=" syn match ncfSetCommandsNum "\(Maximum Service Processes\)\s*=" syn match ncfSetCommandsNum "\(Maximum Subdirectory Tree Depth\)\s*=" syn match ncfSetCommandsNum "\(Maximum Transactions\)\s*=" syn match ncfSetCommandsNum "\(Minimum Compression Percentage Gain\)\s*=" syn match ncfSetCommandsNum "\(Minimum Directory Cache Buffers\)\s*=" syn match ncfSetCommandsNum "\(Minimum File Cache Buffers\)\s*=" syn match ncfSetCommandsNum "\(Minimum File Cache Report Threshold\)\s*=" syn match ncfSetCommandsNum "\(Minimum Free Memory for Garbage Collection\)\s*=" syn match ncfSetCommandsNum "\(Minimum Packet Receive Buffers\)\s*=" syn match ncfSetCommandsNum "\(Minimum Service Processes\)\s*=" syn match ncfSetCommandsNum "\(NCP Packet Signature Option\)\s*=" syn match ncfSetCommandsNum "\(NDS Backlink Interval\)\s*=" syn match ncfSetCommandsNum "\(NDS Client NCP Retries\)\s*=" syn match ncfSetCommandsNum "\(NDS External Reference Life Span\)\s*=" syn match ncfSetCommandsNum "\(NDS Inactivity Synchronization Interval\)\s*=" syn match ncfSetCommandsNum "\(NDS Janitor Interval\)\s*=" syn match ncfSetCommandsNum "\(New Service Process Wait Time\)\s*=" syn match ncfSetCommandsNum "\(Number of Frees for Garbage Collection\)\s*=" syn match ncfSetCommandsNum "\(Number of Watchdog Packets\)\s*=" syn match ncfSetCommandsNum "\(Pseudo Preemption Count\)\s*=" syn match ncfSetCommandsNum "\(Read Ahead LRU Sitting Time Threshold\)\s*=" syn match ncfSetCommandsNum "\(Remirror Block Size\)\s*=" syn match ncfSetCommandsNum "\(Reserved Buffers Below 16 Meg\)\s*=" syn match ncfSetCommandsNum "\(Server Log File Overflow Size\)\s*=" syn match ncfSetCommandsNum "\(Server Log File State\)\s*=" syn match ncfSetCommandsNum "\(SMP Polling Count\)\s*=" syn match ncfSetCommandsNum "\(SMP Stack Size\)\s*=" syn match ncfSetCommandsNum "\(TIMESYNC Polling Count\)\s*=" syn match ncfSetCommandsNum "\(TIMESYNC Polling Interval\)\s*=" syn match ncfSetCommandsNum "\(TIMESYNC Synchronization Radius\)\s*=" syn match ncfSetCommandsNum "\(TIMESYNC Write Value\)\s*=" syn match ncfSetCommandsNum "\(Volume Log File Overflow Size\)\s*=" syn match ncfSetCommandsNum "\(Volume Log File State\)\s*=" syn match ncfSetCommandsNum "\(Volume Low Warning Reset Threshold\)\s*=" syn match ncfSetCommandsNum "\(Volume Low Warning Threshold\)\s*=" syn match ncfSetCommandsNum "\(Volume TTS Log File Overflow Size\)\s*=" syn match ncfSetCommandsNum "\(Volume TTS Log File State\)\s*=" syn match ncfSetCommandsNum "\(Worker Thread Execute In a Row Count\)\s*=" " SET Commands that take a Boolean (ON/OFF) syn match ncfSetCommandsBool "\(Alloc Memory Check Flag\)\s*=" syn match ncfSetCommandsBool "\(Allow Audit Passwords\)\s*=" syn match ncfSetCommandsBool "\(Allow Change to Client Rights\)\s*=" syn match ncfSetCommandsBool "\(Allow Deletion of Active Directories\)\s*=" syn match ncfSetCommandsBool "\(Allow Invalid Pointers\)\s*=" syn match ncfSetCommandsBool "\(Allow LIP\)\s*=" syn match ncfSetCommandsBool "\(Allow Unencrypted Passwords\)\s*=" syn match ncfSetCommandsBool "\(Allow Unowned Files To Be Extended\)\s*=" syn match ncfSetCommandsBool "\(Auto Register Memory Above 16 Megabytes\)\s*=" syn match ncfSetCommandsBool "\(Auto TTS Backout Flag\)\s*=" syn match ncfSetCommandsBool "\(Automatically Repair Bad Volumes\)\s*=" syn match ncfSetCommandsBool "\(Check Equivalent to Me\)\s*=" syn match ncfSetCommandsBool "\(Command Line Prompt Default Choice\)\s*=" syn match ncfSetCommandsBool "\(Console Display Watchdog Logouts\)\s*=" syn match ncfSetCommandsBool "\(Daylight Savings Time Status\)\s*=" syn match ncfSetCommandsBool "\(Developer Option\)\s*=" syn match ncfSetCommandsBool "\(Display Incomplete IPX Packet Alerts\)\s*=" syn match ncfSetCommandsBool "\(Display Lost Interrupt Alerts\)\s*=" syn match ncfSetCommandsBool "\(Display NCP Bad Component Warnings\)\s*=" syn match ncfSetCommandsBool "\(Display NCP Bad Length Warnings\)\s*=" syn match ncfSetCommandsBool "\(Display Old API Names\)\s*=" syn match ncfSetCommandsBool "\(Display Relinquish Control Alerts\)\s*=" syn match ncfSetCommandsBool "\(Display Spurious Interrupt Alerts\)\s*=" syn match ncfSetCommandsBool "\(Enable Deadlock Detection\)\s*=" syn match ncfSetCommandsBool "\(Enable Disk Read After Write Verify\)\s*=" syn match ncfSetCommandsBool "\(Enable File Compression\)\s*=" syn match ncfSetCommandsBool "\(Enable IO Handicap Attribute\)\s*=" syn match ncfSetCommandsBool "\(Enable SECURE.NCF\)\s*=" syn match ncfSetCommandsBool "\(Fast Volume Mounts\)\s*=" syn match ncfSetCommandsBool "\(Global Pseudo Preemption\)\s*=" syn match ncfSetCommandsBool "\(Halt System on Invalid Parameters\)\s*=" syn match ncfSetCommandsBool "\(Ignore Disk Geometry\)\s*=" syn match ncfSetCommandsBool "\(Immediate Purge of Deleted Files\)\s*=" syn match ncfSetCommandsBool "\(NCP File Commit\)\s*=" syn match ncfSetCommandsBool "\(NDS Trace File Length to Zero\)\s*=" syn match ncfSetCommandsBool "\(NDS Trace to File\)\s*=" syn match ncfSetCommandsBool "\(NDS Trace to Screen\)\s*=" syn match ncfSetCommandsBool "\(New Time With Daylight Savings Time Status\)\s*=" syn match ncfSetCommandsBool "\(Read Ahead Enabled\)\s*=" syn match ncfSetCommandsBool "\(Read Fault Emulation\)\s*=" syn match ncfSetCommandsBool "\(Read Fault Notification\)\s*=" syn match ncfSetCommandsBool "\(Reject NCP Packets with Bad Components\)\s*=" syn match ncfSetCommandsBool "\(Reject NCP Packets with Bad Lengths\)\s*=" syn match ncfSetCommandsBool "\(Replace Console Prompt with Server Name\)\s*=" syn match ncfSetCommandsBool "\(Reply to Get Nearest Server\)\s*=" syn match ncfSetCommandsBool "\(SMP Developer Option\)\s*=" syn match ncfSetCommandsBool "\(SMP Flush Processor Cache\)\s*=" syn match ncfSetCommandsBool "\(SMP Intrusive Abend Mode\)\s*=" syn match ncfSetCommandsBool "\(SMP Memory Protection\)\s*=" syn match ncfSetCommandsBool "\(Sound Bell for Alerts\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Configured Sources\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Directory Tree Mode\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Hardware Clock\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC RESET\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Restart Flag\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Service Advertising\)\s*=" syn match ncfSetCommandsBool "\(TIMESYNC Write Parameters\)\s*=" syn match ncfSetCommandsBool "\(TTS Abort Dump Flag\)\s*=" syn match ncfSetCommandsBool "\(Upgrade Low Priority Threads\)\s*=" syn match ncfSetCommandsBool "\(Volume Low Warn All Users\)\s*=" syn match ncfSetCommandsBool "\(Write Fault Emulation\)\s*=" syn match ncfSetCommandsBool "\(Write Fault Notification\)\s*=" " Set Commands that take a "string" -- NOT QUOTED syn match ncfSetCommandsStr "\(Default Time Server Type\)\s*=" syn match ncfSetCommandsStr "\(SMP NetWare Kernel Mode\)\s*=" syn match ncfSetCommandsStr "\(Time Zone\)\s*=" syn match ncfSetCommandsStr "\(TIMESYNC ADD Time Source\)\s*=" syn match ncfSetCommandsStr "\(TIMESYNC REMOVE Time Source\)\s*=" syn match ncfSetCommandsStr "\(TIMESYNC Time Source\)\s*=" syn match ncfSetCommandsStr "\(TIMESYNC Type\)\s*=" " SET Commands that take a "Time" syn match ncfSetCommandsTime "\(Command Line Prompt Time Out\)\s*=" syn match ncfSetCommandsTime "\(Delay Before First Watchdog Packet\)\s*=" syn match ncfSetCommandsTime "\(Delay Between Watchdog Packets\)\s*=" syn match ncfSetCommandsTime "\(Directory Cache Buffer NonReferenced Delay\)\s*=" syn match ncfSetCommandsTime "\(Dirty Directory Cache Delay Time\)\s*=" syn match ncfSetCommandsTime "\(Dirty Disk Cache Delay Time\)\s*=" syn match ncfSetCommandsTime "\(File Delete Wait Time\)\s*=" syn match ncfSetCommandsTime "\(Minimum File Delete Wait Time\)\s*=" syn match ncfSetCommandsTime "\(Mirrored Devices Are Out of Sync Message Frequency\)\s*=" syn match ncfSetCommandsTime "\(New Packet Receive Buffer Wait Time\)\s*=" syn match ncfSetCommandsTime "\(TTS Backout File Truncation Wait Time\)\s*=" syn match ncfSetCommandsTime "\(TTS UnWritten Cache Wait Time\)\s*=" syn match ncfSetCommandsTime "\(Turbo FAT Re-Use Wait Time\)\s*=" syn match ncfSetCommandsTime "\(Daylight Savings Time Offset\)\s*=" syn match ncfSetCommandsTimeDate "\(End of Daylight Savings Time\)\s*=" syn match ncfSetCommandsTimeDate "\(Start of Daylight Savings Time\)\s*=" syn match ncfSetCommandsBindCon "\(Bindery Context\)\s*=" nextgroup=ncfContString syn cluster ncfSetCommands contains=ncfSetCommandsNum,ncfSetCommandsBool,ncfSetCommandsStr,ncfSetCommandsTime,ncfSetCommandsTimeDate,ncfSetCommandsBindCon if exists("ncf_highlight_unknowns") syn match Error "[^ \t]*" contains=ALL endif if version >= 508 || !exists("did_ncf_syntax_inits") if version < 508 let did_ncf_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif " The default methods for highlighting. Can be overridden later HiLink ncfCommands Statement HiLink ncfSetCommands ncfCommands HiLink ncfLogins ncfCommands HiLink ncfString String HiLink ncfContString ncfString HiLink ncfComment Comment HiLink ncfImplicit Type HiLink ncfBoolean Boolean HiLink ncfScript Identifier HiLink ncfNumber Number HiLink ncfIPAddr ncfNumber HiLink ncfHexNumber ncfNumber HiLink ncfTime ncfNumber HiLink ncfDSTTime ncfNumber HiLink ncfPath Constant HiLink ncfServerName Special HiLink ncfIPXNet ncfServerName HiLink ncfTimeTypes Constant HiLink ncfSetCommandsNum ncfSetCommands HiLink ncfSetCommandsBool ncfSetCommands HiLink ncfSetCommandsStr ncfSetCommands HiLink ncfSetCommandsTime ncfSetCommands HiLink ncfSetCommandsTimeDate ncfSetCommands HiLink ncfSetCommandsBindCon ncfSetCommands delcommand HiLink endif let b:current_syntax = "ncf"
zyz2011-vim
runtime/syntax/ncf.vim
Vim Script
gpl2
13,666
" Vim syntax file " Language: MS IDL (Microsoft dialect of Interface Description Language) " Maintainer: Vadim Zeitlin <vadim@wxwindows.org> " Last Change: 2012 Feb 12 by Thilo Six " 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") finish endif let s:cpo_save = &cpo set cpo&vim " Misc basic syn match msidlId "[a-zA-Z][a-zA-Z0-9_]*" syn match msidlUUID "{\?[[:xdigit:]]\{8}-\([[:xdigit:]]\{4}-\)\{3}[[:xdigit:]]\{12}}\?" syn region msidlString start=/"/ skip=/\\\(\\\\\)*"/ end=/"/ syn match msidlLiteral "\d\+\(\.\d*\)\=" syn match msidlLiteral "\.\d\+" syn match msidlSpecial contained "[]\[{}:]" " Comments syn keyword msidlTodo contained TODO FIXME XXX syn region msidlComment start="/\*" end="\*/" contains=msidlTodo syn match msidlComment "//.*" contains=msidlTodo syn match msidlCommentError "\*/" " C style Preprocessor syn region msidlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+ syn match msidlIncluded contained "<[^>]*>" syn match msidlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=msidlIncluded,msidlString syn region msidlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=msidlComment,msidlCommentError syn region msidlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=msidlLiteral, msidlString " Attributes syn keyword msidlAttribute contained in out propget propput propputref retval syn keyword msidlAttribute contained aggregatable appobject binadable coclass control custom default defaultbind defaultcollelem defaultvalue defaultvtable dispinterface displaybind dual entry helpcontext helpfile helpstring helpstringdll hidden id immediatebind lcid library licensed nonbrowsable noncreatable nonextensible oleautomation optional object public readonly requestedit restricted source string uidefault usesgetlasterror vararg version syn match msidlAttribute /uuid(.*)/he=s+4 contains=msidlUUID syn match msidlAttribute /helpstring(.*)/he=s+10 contains=msidlString syn region msidlAttributes start="\[" end="]" keepend contains=msidlSpecial,msidlString,msidlAttribute,msidlComment,msidlCommentError " Keywords syn keyword msidlEnum enum syn keyword msidlImport import importlib syn keyword msidlStruct interface library coclass syn keyword msidlTypedef typedef " Types syn keyword msidlStandardType byte char double float hyper int long short void wchar_t syn keyword msidlStandardType BOOL BSTR HRESULT VARIANT VARIANT_BOOL syn region msidlSafeArray start="SAFEARRAY(" end=")" contains=msidlStandardType syn sync lines=50 " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_msidl_syntax_inits") if version < 508 let did_msidl_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink msidlInclude Include HiLink msidlPreProc PreProc HiLink msidlPreCondit PreCondit HiLink msidlDefine Macro HiLink msidlIncluded String HiLink msidlString String HiLink msidlComment Comment HiLink msidlTodo Todo HiLink msidlSpecial SpecialChar HiLink msidlLiteral Number HiLink msidlUUID Number HiLink msidlImport Include HiLink msidlEnum StorageClass HiLink msidlStruct Structure HiLink msidlTypedef Typedef HiLink msidlAttribute StorageClass HiLink msidlStandardType Type HiLink msidlSafeArray Type delcommand HiLink endif let b:current_syntax = "msidl" let &cpo = s:cpo_save unlet s:cpo_save " vi: set ts=8 sw=4:
zyz2011-vim
runtime/syntax/msidl.vim
Vim Script
gpl2
3,830
" Vim syntax file " Language: Configuration File (ini file) for MSDOS/MS Windows " Version: 2.1 " Original Author: Sean M. McKee <mckee@misslink.net> " Previous Maintainer: Nima Talebi <nima@it.net.au> " Current Maintainer: Hong Xu <xuhdev@gmail.com> " Homepage: http://www.vim.org/scripts/script.php?script_id=3747 " https://bitbucket.org/xuhdev/syntax-dosini.vim " Last Change: 2011 Nov 8 " 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") finish endif " shut case off syn case ignore syn match dosiniNumber "\<\d\+\>" syn match dosiniNumber "\<\d*\.\d\+\>" syn match dosiniNumber "\<\d\+e[+-]\=\d\+\>" syn match dosiniLabel "^.\{-}=" syn region dosiniHeader start="^\s*\[" end="\]" syn match dosiniComment "^[#;].*$" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_dosini_syntax_inits") if version < 508 let did_dosini_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink dosiniNumber Number HiLink dosiniHeader Special HiLink dosiniComment Comment HiLink dosiniLabel Type delcommand HiLink endif let b:current_syntax = "dosini" " vim: sts=2 sw=2 et
zyz2011-vim
runtime/syntax/dosini.vim
Vim Script
gpl2
1,548
" Vim syntax file " Language: Telix (Modem Comm Program) SALT Script " Maintainer: Sean M. McKee <mckee@misslink.net> " Last Change: 2012 Feb 03 by Thilo Six " Version Info: @(#)tsalt.vim 1.5 97/12/16 08:11:15 " 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") finish endif let s:cpo_save = &cpo set cpo&vim " turn case matching off syn case ignore "FUNCTIONS " Character Handling Functions syn keyword tsaltFunction IsAscii IsAlNum IsAlpha IsCntrl IsDigit syn keyword tsaltFunction IsLower IsUpper ToLower ToUpper " Connect Device Operations syn keyword tsaltFunction Carrier cInp_Cnt cGetC cGetCT cPutC cPutN syn keyword tsaltFunction cPutS cPutS_TR FlushBuf Get_Baud syn keyword tsaltFunction Get_DataB Get_Port Get_StopB Hangup syn keyword tsaltFunction KillConnectDevice MakeConnectDevice syn keyword tsaltFunction Send_Brk Set_ConnectDevice Set_Port " File Input/Output Operations syn keyword tsaltFunction fClearErr fClose fDelete fError fEOF fFlush syn keyword tsaltFunction fGetC fGetS FileAttr FileFind FileSize syn keyword tsaltFunction FileTime fnStrip fOpen fPutC fPutS fRead syn keyword tsaltFunction fRename fSeek fTell fWrite " File Transfers and Logs syn keyword tsaltFunction Capture Capture_Stat Printer Receive Send syn keyword tsaltFunction Set_DefProt UsageLog Usage_Stat UStamp " Input String Matching syn keyword tsaltFunction Track Track_AddChr Track_Free Track_Hit syn keyword tsaltFunction WaitFor " Keyboard Operations syn keyword tsaltFunction InKey InKeyW KeyGet KeyLoad KeySave KeySet " Miscellaneous Functions syn keyword tsaltFunction ChatMode Dos Dial DosFunction ExitTelix syn keyword tsaltFunction GetEnv GetFon HelpScreen LoadFon NewDir syn keyword tsaltFunction Randon Redial RedirectDOS Run syn keyword tsaltFunction Set_Terminal Show_Directory TelixVersion syn keyword tsaltFunction Terminal TransTab Update_Term " Script Management syn keyword tsaltFunction ArgCount Call CallD CompileScript GetRunPath syn keyword tsaltFunction Is_Loaded Load_Scr ScriptVersion syn keyword tsaltFunction TelixForWindows Unload_Scr " Sound Functions syn keyword tsaltFunction Alarm PlayWave Tone " String Handling syn keyword tsaltFunction CopyChrs CopyStr DelChrs GetS GetSXY syn keyword tsaltFunction InputBox InsChrs ItoS SetChr StoI StrCat syn keyword tsaltFunction StrChr StrCompI StrLen StrLower StrMaxLen syn keyword tsaltFunction StrPos StrPosI StrUpper SubChr SubChrs syn keyword tsaltFunction SubStr " Time, Date, and Timer Operations syn keyword tsaltFunction CurTime Date Delay Delay_Scr Get_OnlineTime syn keyword tsaltFunction tDay tHour tMin tMonth tSec tYear Time syn keyword tsaltFunction Time_Up Timer_Free Time_Restart syn keyword tsaltFunction Time_Start Time_Total " Video Operations syn keyword tsaltFunction Box CNewLine Cursor_OnOff Clear_Scr syn keyword tsaltFunction GetTermHeight GetTermWidth GetX GetY syn keyword tsaltFunction GotoXY MsgBox NewLine PrintC PrintC_Trm syn keyword tsaltFunction PrintN PrintN_Trm PrintS PrintS_Trm syn keyword tsaltFunction PrintSC PRintSC_Trm syn keyword tsaltFunction PStrA PStrAXY Scroll Status_Wind vGetChr syn keyword tsaltFunction vGetChrs vGetChrsA vPutChr vPutChrs syn keyword tsaltFunction vPutChrsA vRstrArea vSaveArea " Dynamic Data Exchange (DDE) Operations syn keyword tsaltFunction DDEExecute DDEInitate DDEPoke DDERequest syn keyword tsaltFunction DDETerminate DDETerminateAll "END FUNCTIONS "PREDEFINED VARAIABLES syn keyword tsaltSysVar _add_lf _alarm_on _answerback_str _asc_rcrtrans syn keyword tsaltSysVar _asc_remabort _asc_rlftrans _asc_scpacing syn keyword tsaltSysVar _asc_scrtrans _asc_secho _asc_slpacing syn keyword tsaltSysVar _asc_spacechr _asc_striph _back_color syn keyword tsaltSysVar _capture_fname _connect_str _dest_bs syn keyword tsaltSysVar _dial_pause _dial_time _dial_post syn keyword tsaltSysVar _dial_pref1 _dial_pref2 _dial_pref3 syn keyword tsaltSysVar _dial_pref4 _dir_prog _down_dir syn keyword tsaltSysVar _entry_bbstype _entry_comment _entry_enum syn keyword tsaltSysVar _entry_name _entry_num _entry_logonname syn keyword tsaltSysVar _entry_pass _fore_color _image_file syn keyword tsaltSysVar _local_echo _mdm_hang_str _mdm_init_str syn keyword tsaltSysVar _no_connect1 _no_connect2 _no_connect3 syn keyword tsaltSysVar _no_connect4 _no_connect5 _redial_stop syn keyword tsaltSysVar _scr_chk_key _script_dir _sound_on syn keyword tsaltSysVar _strip_high _swap_bs _telix_dir _up_dir syn keyword tsaltSysVar _usage_fname _zmodauto _zmod_rcrash syn keyword tsaltSysVar _zmod_scrash "END PREDEFINED VARAIABLES "TYPE syn keyword tsaltType str int "END TYPE "KEYWORDS syn keyword tsaltStatement goto break return continue syn keyword tsaltConditional if then else syn keyword tsaltRepeat while for do "END KEYWORDS syn keyword tsaltTodo contained TODO " the rest is pretty close to C ----------------------------------------- " String and Character constants " Highlight special characters (those which have a backslash) differently syn match tsaltSpecial contained "\^\d\d\d\|\^." syn region tsaltString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tsaltSpecial syn match tsaltCharacter "'[^\\]'" syn match tsaltSpecialCharacter "'\\.'" "catch errors caused by wrong parenthesis syn region tsaltParen transparent start='(' end=')' contains=ALLBUT,tsaltParenError,tsaltIncluded,tsaltSpecial,tsaltTodo syn match tsaltParenError ")" syn match tsaltInParen contained "[{}]" hi link tsaltParenError tsaltError hi link tsaltInParen tsaltError "integer number, or floating point number without a dot and with "f". syn match tsaltNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" "floating point number, with dot, optional exponent syn match tsaltFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, starting with a dot, optional exponent syn match tsaltFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent syn match tsaltFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" "hex number syn match tsaltNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" "syn match cIdentifier "\<[a-z_][a-z0-9_]*\>" syn region tsaltComment start="/\*" end="\*/" contains=cTodo syn match tsaltComment "//.*" contains=cTodo syn match tsaltCommentError "\*/" syn region tsaltPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=tsaltComment,tsaltString,tsaltCharacter,tsaltNumber,tsaltCommentError syn region tsaltIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match tsaltIncluded contained "<[^>]*>" syn match tsaltInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=tsaltIncluded "syn match TelixSalyLineSkip "\\$" syn region tsaltDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,tsaltPreCondit,tsaltIncluded,tsaltInclude,tsaltDefine,tsaltInParen syn region tsaltPreProc start="^[ \t]*#[ \t]*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,tsaltPreCondit,tsaltIncluded,tsaltInclude,tsaltDefine,tsaltInParen " Highlight User Labels syn region tsaltMulti transparent start='?' end=':' contains=ALLBUT,tsaltIncluded,tsaltSpecial,tsaltTodo syn sync ccomment tsaltComment " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_tsalt_syntax_inits") if version < 508 let did_tsalt_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink tsaltFunction Statement HiLink tsaltSysVar Type "HiLink tsaltLibFunc UserDefFunc "HiLink tsaltConstants Type "HiLink tsaltFuncArg Type "HiLink tsaltOperator Operator "HiLink tsaltLabel Label "HiLink tsaltUserLabel Label HiLink tsaltConditional Conditional HiLink tsaltRepeat Repeat HiLink tsaltCharacter SpecialChar HiLink tsaltSpecialCharacter SpecialChar HiLink tsaltNumber Number HiLink tsaltFloat Float HiLink tsaltCommentError tsaltError HiLink tsaltInclude Include HiLink tsaltPreProc PreProc HiLink tsaltDefine Macro HiLink tsaltIncluded tsaltString HiLink tsaltError Error HiLink tsaltStatement Statement HiLink tsaltPreCondit PreCondit HiLink tsaltType Type HiLink tsaltString String HiLink tsaltComment Comment HiLink tsaltSpecial Special HiLink tsaltTodo Todo delcommand HiLink endif let b:current_syntax = "tsalt" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8
zyz2011-vim
runtime/syntax/tsalt.vim
Vim Script
gpl2
8,637
" Vim syntax file " Language: Cheetah template engine " Maintainer: Max Ischenko <mfi@ukr.net> " Last Change: 2003-05-11 " " Missing features: " match invalid syntax, like bad variable ref. or unmatched closing tag " PSP-style tags: <% .. %> (obsoleted feature) " doc-strings and header comments (rarely used feature) " 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") finish endif syntax case match syn keyword cheetahKeyword contained if else unless elif for in not syn keyword cheetahKeyword contained while repeat break continue pass end syn keyword cheetahKeyword contained set del attr def global include raw echo syn keyword cheetahKeyword contained import from extends implements syn keyword cheetahKeyword contained assert raise try catch finally syn keyword cheetahKeyword contained errorCatcher breakpoint silent cache filter syn match cheetahKeyword contained "\<compiler-settings\>" " Matches cached placeholders syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?\h\w*\(\.\h\w*\)*" display syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?{\h\w*\(\.\h\w*\)*}" display syn match cheetahDirective "^\s*#[^#].*$" contains=cheetahPlaceHolder,cheetahKeyword,cheetahComment display syn match cheetahContinuation "\\$" syn match cheetahComment "##.*$" display syn region cheetahMultiLineComment start="#\*" end="\*#" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_cheetah_syn_inits") if version < 508 let did_cheetah_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink cheetahPlaceHolder Identifier HiLink cheetahDirective PreCondit HiLink cheetahKeyword Define HiLink cheetahContinuation Special HiLink cheetahComment Comment HiLink cheetahMultiLineComment Comment delcommand HiLink endif let b:current_syntax = "cheetah"
zyz2011-vim
runtime/syntax/cheetah.vim
Vim Script
gpl2
2,135
" Vim syntax file " Language: xinetd.conf(5) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword xinetdTodo contained TODO FIXME XXX NOTE syn region xinetdComment display oneline start='^\s*#' end='$' \ contains=xinetdTodo,@Spell syn match xinetdService '^\s*service\>' \ nextgroup=xinetdServiceName skipwhite syn match xinetdServiceName contained '\S\+' \ nextgroup=xinetdServiceGroup skipwhite skipnl syn match xinetdDefaults '^\s*defaults' \ nextgroup=xinetdServiceGroup skipwhite skipnl syn region xinetdServiceGroup contained transparent \ matchgroup=xinetdServiceGroupD start='{' \ matchgroup=xinetdServiceGroupD end='}' \ contains=xinetdAttribute,xinetdReqAttribute, \ xinetdDisable syn keyword xinetdReqAttribute contained user server protocol \ nextgroup=xinetdStringEq skipwhite syn keyword xinetdAttribute contained id group bind \ interface \ nextgroup=xinetdStringEq skipwhite syn match xinetdStringEq contained display '=' \ nextgroup=xinetdString skipwhite syn match xinetdString contained display '\S\+' syn keyword xinetdAttribute contained type nextgroup=xinetdTypeEq skipwhite syn match xinetdTypeEq contained display '=' \ nextgroup=xinetdType skipwhite syn keyword xinetdType contained RPC INTERNAL TCPMUX TCPMUXPLUS \ UNLISTED \ nextgroup=xinetdType skipwhite syn keyword xinetdAttribute contained flags \ nextgroup=xinetdFlagsEq skipwhite syn cluster xinetdFlagsC contains=xinetdFlags,xinetdDeprFlags syn match xinetdFlagsEq contained display '=' \ nextgroup=@xinetdFlagsC skipwhite syn keyword xinetdFlags contained INTERCEPT NORETRY IDONLY NAMEINARGS \ NODELAY KEEPALIVE NOLIBWRAP SENSOR IPv4 IPv6 \ nextgroup=@xinetdFlagsC skipwhite syn keyword xinetdDeprFlags contained REUSE nextgroup=xinetdFlagsC skipwhite syn keyword xinetdDisable contained disable \ nextgroup=xinetdBooleanEq skipwhite syn match xinetdBooleanEq contained display '=' \ nextgroup=xinetdBoolean skipwhite syn keyword xinetdBoolean contained yes no syn keyword xinetdReqAttribute contained socket_type \ nextgroup=xinetdSocketTypeEq skipwhite syn match xinetdSocketTypeEq contained display '=' \ nextgroup=xinetdSocketType skipwhite syn keyword xinetdSocketType contained stream dgram raw seqpacket syn keyword xinetdReqAttribute contained wait \ nextgroup=xinetdBooleanEq skipwhite syn keyword xinetdAttribute contained groups mdns \ nextgroup=xinetdBooleanEq skipwhite syn keyword xinetdAttribute contained instances per_source rlimit_cpu \ rlimit_data rlimit_rss rlimit_stack \ nextgroup=xinetdUNumberEq skipwhite syn match xinetdUNumberEq contained display '=' \ nextgroup=xinetdUnlimited,xinetdNumber \ skipwhite syn keyword xinetdUnlimited contained UNLIMITED syn match xinetdNumber contained display '\<\d\+\>' syn keyword xinetdAttribute contained nice \ nextgroup=xinetdSignedNumEq skipwhite syn match xinetdSignedNumEq contained display '=' \ nextgroup=xinetdSignedNumber skipwhite syn match xinetdSignedNumber contained display '[+-]\=\d\+\>' syn keyword xinetdAttribute contained server_args \ enabled \ nextgroup=xinetdStringsEq skipwhite syn match xinetdStringsEq contained display '=' \ nextgroup=xinetdStrings skipwhite syn match xinetdStrings contained display '\S\+' \ nextgroup=xinetdStrings skipwhite syn keyword xinetdAttribute contained only_from no_access passenv \ nextgroup=xinetdStringsAdvEq skipwhite syn match xinetdStringsAdvEq contained display '[+-]\==' \ nextgroup=xinetdStrings skipwhite syn keyword xinetdAttribute contained access_times \ nextgroup=xinetdTimeRangesEq skipwhite syn match xinetdTimeRangesEq contained display '=' \ nextgroup=xinetdTimeRanges skipwhite syn match xinetdTimeRanges contained display \ '\%(0?\d\|1\d\|2[0-3]\):\%(0?\d\|[1-5]\d\)-\%(0?\d\|1\d\|2[0-3]\):\%(0?\d\|[1-5]\d\)' \ nextgroup=xinetdTimeRanges skipwhite syn keyword xinetdAttribute contained log_type nextgroup=xinetdLogTypeEq \ skipwhite syn match xinetdLogTypeEq contained display '=' \ nextgroup=xinetdLogType skipwhite syn keyword xinetdLogType contained SYSLOG nextgroup=xinetdSyslogType \ skipwhite syn keyword xinetdLogType contained FILE nextgroup=xinetdLogFile skipwhite syn keyword xinetdSyslogType contained daemon auth authpriv user mail lpr \ news uucp ftp local0 local1 local2 local3 \ local4 local5 local6 local7 \ nextgroup=xinetdSyslogLevel skipwhite syn keyword xinetdSyslogLevel contained emerg alert crit err warning notice \ info debug syn match xinetdLogFile contained display '\S\+' \ nextgroup=xinetdLogSoftLimit skipwhite syn match xinetdLogSoftLimit contained display '\<\d\+\>' \ nextgroup=xinetdLogHardLimit skipwhite syn match xinetdLogHardLimit contained display '\<\d\+\>' syn keyword xinetdAttribute contained log_on_success \ nextgroup=xinetdLogSuccessEq skipwhite syn match xinetdLogSuccessEq contained display '[+-]\==' \ nextgroup=xinetdLogSuccess skipwhite syn keyword xinetdLogSuccess contained PID HOST USERID EXIT DURATION TRAFFIC \ nextgroup=xinetdLogSuccess skipwhite syn keyword xinetdAttribute contained log_on_failure \ nextgroup=xinetdLogFailureEq skipwhite syn match xinetdLogFailureEq contained display '[+-]\==' \ nextgroup=xinetdLogFailure skipwhite syn keyword xinetdLogFailure contained HOST USERID ATTEMPT \ nextgroup=xinetdLogFailure skipwhite syn keyword xinetdReqAttribute contained rpc_version \ nextgroup=xinetdRPCVersionEq skipwhite syn match xinetdRPCVersionEq contained display '=' \ nextgroup=xinetdRPCVersion skipwhite syn match xinetdRPCVersion contained display '\d\+\%(-\d\+\)\=\>' syn keyword xinetdReqAttribute contained rpc_number port \ nextgroup=xinetdNumberEq skipwhite syn match xinetdNumberEq contained display '=' \ nextgroup=xinetdNumber skipwhite syn keyword xinetdAttribute contained env nextgroup=xinetdEnvEq skipwhite syn match xinetdEnvEq contained display '+\==' \ nextgroup=xinetdEnvName skipwhite syn match xinetdEnvName contained display '[^=]\+' \ nextgroup=xinetdEnvNameEq syn match xinetdEnvNameEq contained display '=' nextgroup=xinetdEnvValue syn match xinetdEnvValue contained display '\S\+' \ nextgroup=xinetdEnvName skipwhite syn keyword xinetdAttribute contained banner banner_success banner_failure \ nextgroup=xinetdPathEq skipwhite syn keyword xinetdPPAttribute include includedir \ nextgroup=xinetdPath skipwhite syn match xinetdPathEq contained display '=' \ nextgroup=xinetdPath skipwhite syn match xinetdPath contained display '\S\+' syn keyword xinetdAttribute contained redirect nextgroup=xinetdRedirectEq \ skipwhite syn match xinetdRedirectEq contained display '=' \ nextgroup=xinetdRedirectIP skipwhite syn match xinetdRedirectIP contained display '\S\+' \ nextgroup=xinetdNumber skipwhite syn keyword xinetdAttribute contained cps nextgroup=xinetdCPSEq skipwhite syn match xinetdCPSEq contained display '=' \ nextgroup=xinetdCPS skipwhite syn match xinetdCPS contained display '\<\d\+\>' \ nextgroup=xinetdNumber skipwhite syn keyword xinetdAttribute contained max_load nextgroup=xinetdFloatEq \ skipwhite syn match xinetdFloatEq contained display '=' \ nextgroup=xinetdFloat skipwhite syn match xinetdFloat contained display '\d\+\.\d*\|\.\d\+' syn keyword xinetdAttribute contained umask nextgroup=xinetdOctalEq \ skipwhite syn match xinetdOctalEq contained display '=' \ nextgroup=xinetdOctal,xinetdOctalError \ skipwhite syn match xinetdOctal contained display '\<0\o\+\>' \ contains=xinetdOctalZero syn match xinetdOctalZero contained display '\<0' syn match xinetdOctalError contained display '\<0\o*[89]\d*\>' syn keyword xinetdAttribute contained rlimit_as nextgroup=xinetdASEq \ skipwhite syn match xinetdASEq contained display '=' \ nextgroup=xinetdAS,xinetdUnlimited \ skipwhite syn match xinetdAS contained display '\d\+' nextgroup=xinetdASMult syn match xinetdASMult contained display '[KM]' syn keyword xinetdAttribute contained deny_time nextgroup=xinetdDenyTimeEq \ skipwhite syn match xinetdDenyTimeEq contained display '=' \ nextgroup=xinetdDenyTime,xinetdNumber \ skipwhite syn keyword xinetdDenyTime contained FOREVER NEVER hi def link xinetdTodo Todo hi def link xinetdComment Comment hi def link xinetdService Keyword hi def link xinetdServiceName String hi def link xinetdDefaults Keyword hi def link xinetdServiceGroupD Delimiter hi def link xinetdReqAttribute Keyword hi def link xinetdAttribute Type hi def link xinetdEq Operator hi def link xinetdStringEq xinetdEq hi def link xinetdString String hi def link xinetdTypeEq xinetdEq hi def link xinetdType Identifier hi def link xinetdFlagsEq xinetdEq hi def link xinetdFlags xinetdType hi def link xinetdDeprFlags WarningMsg hi def link xinetdDisable Special hi def link xinetdBooleanEq xinetdEq hi def link xinetdBoolean Boolean hi def link xinetdSocketTypeEq xinetdEq hi def link xinetdSocketType xinetdType hi def link xinetdUNumberEq xinetdEq hi def link xinetdUnlimited Define hi def link xinetdNumber Number hi def link xinetdSignedNumEq xinetdEq hi def link xinetdSignedNumber xinetdNumber hi def link xinetdStringsEq xinetdEq hi def link xinetdStrings xinetdString hi def link xinetdStringsAdvEq xinetdEq hi def link xinetdTimeRangesEq xinetdEq hi def link xinetdTimeRanges Number hi def link xinetdLogTypeEq xinetdEq hi def link xinetdLogType Keyword hi def link xinetdSyslogType xinetdType hi def link xinetdSyslogLevel Number hi def link xinetdLogFile xinetdPath hi def link xinetdLogSoftLimit xinetdNumber hi def link xinetdLogHardLimit xinetdNumber hi def link xinetdLogSuccessEq xinetdEq hi def link xinetdLogSuccess xinetdType hi def link xinetdLogFailureEq xinetdEq hi def link xinetdLogFailure xinetdType hi def link xinetdRPCVersionEq xinetdEq hi def link xinetdRPCVersion xinetdNumber hi def link xinetdNumberEq xinetdEq hi def link xinetdEnvEq xinetdEq hi def link xinetdEnvName Identifier hi def link xinetdEnvNameEq xinetdEq hi def link xinetdEnvValue String hi def link xinetdPPAttribute PreProc hi def link xinetdPathEq xinetdEq hi def link xinetdPath String hi def link xinetdRedirectEq xinetdEq hi def link xinetdRedirectIP String hi def link xinetdCPSEq xinetdEq hi def link xinetdCPS xinetdNumber hi def link xinetdFloatEq xinetdEq hi def link xinetdFloat xinetdNumber hi def link xinetdOctalEq xinetdEq hi def link xinetdOctal xinetdNumber hi def link xinetdOctalZero PreProc hi def link xinetdOctalError Error hi def link xinetdASEq xinetdEq hi def link xinetdAS xinetdNumber hi def link xinetdASMult PreProc hi def link xinetdDenyTimeEq xinetdEq hi def link xinetdDenyTime PreProc let b:current_syntax = "xinetd" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/xinetd.vim
Vim Script
gpl2
14,196
" Vim syntax file " Filename: foxpro.vim " Version: 1.0 " Language: FoxPro for DOS/UNIX v2.6 " Maintainer: Bill W. Smith, Jr. <donal@brewich.com> " Last Change: 15 May 2006 " This file replaces the FoxPro for DOS v2.x syntax file " maintained by Powing Tse <powing@mcmug.org> " " Change Log: added support for FoxPro Codebook highlighting " corrected highlighting of comments that do NOT start in col 1 " corrected highlighting of comments at end of line (&&) " " if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " FoxPro Codebook Naming Conventions syn match foxproCBConst "\<[c][A-Z][A-Za-z0-9_]*\>" syn match foxproCBVar "\<[lgrt][acndlmf][A-Z][A-Za-z0-9_]*\>" syn match foxproCBField "\<[a-z0-9]*\.[A-Za-z0-9_]*\>" " PROPER CodeBook field names start with the data type and do NOT have _ syn match foxproCBField "\<[A-Za-z0-9]*\.[acndlm][A-Z][A-Za-z0-9]*\>" syn match foxproCBWin "\<w[rbcm][A-Z][A-Za-z0-9_]*\>" " CodeBook 2.0 defined objects as follows " This uses the hotkey from the screen builder as the second character syn match foxproCBObject "\<[lgr][bfthnkoli][A-Z][A-Za-z0-9_]*\>" " A later version added the following conventions for objects syn match foxproCBObject "\<box[A-Z][A-Za-z0-9_]*\>" syn match foxproCBObject "\<fld[A-Z][A-Za-z0-9_]*\>" syn match foxproCBObject "\<txt[A-Z][A-Za-z0-9_]*\>" syn match foxproCBObject "\<phb[A-Z][A-Za-z0-9_]*\>" syn match foxproCBObject "\<rdo[A-Z][A-Za-z0-9_]*\>" syn match foxproCBObject "\<chk[A-Z][A-Za-z0-9_]*\>" syn match foxproCBObject "\<pop[A-Z][A-Za-z0-9_]*\>" syn match foxproCBObject "\<lst[A-Z][A-Za-z0-9_]*\>" syn match foxproCBObject "\<inv[A-Z][A-Za-z0-9_]*\>" syn match foxproCBObject "\<mnu[A-Z][A-Za-z0-9_]*\>" syntax case ignore " Highlight special characters syn match foxproSpecial "^\s*!" syn match foxproSpecial "&" syn match foxproSpecial ";\s*$" syn match foxproSpecial "^\s*=" syn match foxproSpecial "^\s*\\" syn match foxproSpecial "^\s*\\\\" syn match foxproSpecial "^\s*?" syn match foxproSpecial "^\s*??" syn match foxproSpecial "^\s*???" syn match foxproSpecial "\<m\>\." " @ Statements syn match foxproAtSymbol contained "^\s*@" syn match foxproAtCmd contained "\<say\>\|\<get\>\|\<edit\>\|\<box\>\|\<clea\%[r]\>\|\<fill\>\|\<menu\>\|\<prom\%[pt]\>\|\<scro\%[ll]\>\|\<to\>" syn match foxproAtStart transparent "^\s*@.*" contains=ALL " preprocessor directives syn match foxproPreProc "^\s*#\s*\(\<if\>\|\<elif\>\|\<else\>\|\<endi\%[f]\>\)" syn match foxproPreProc "^\s*#\s*\(\<defi\%[ne]\>\|\<unde\%[f]\>\)" syn match foxproPreProc "^\s*#\s*\<regi\%[on]\>" " Functions syn match foxproFunc "\<abs\>\s*("me=e-1 syn match foxproFunc "\<acop\%[y]\>\s*("me=e-1 syn match foxproFunc "\<acos\>\s*("me=e-1 syn match foxproFunc "\<adel\>\s*("me=e-1 syn match foxproFunc "\<adir\>\s*("me=e-1 syn match foxproFunc "\<aele\%[ment]\>\s*("me=e-1 syn match foxproFunc "\<afie\%[lds]\>\s*("me=e-1 syn match foxproFunc "\<afon\%[t]\>\s*("me=e-1 syn match foxproFunc "\<ains\>\s*("me=e-1 syn match foxproFunc "\<alen\>\s*("me=e-1 syn match foxproFunc "\<alia\%[s]\>\s*("me=e-1 syn match foxproFunc "\<allt\%[rim]\>\s*("me=e-1 syn match foxproFunc "\<ansi\%[tooem]\>\s*("me=e-1 syn match foxproFunc "\<asc\>\s*("me=e-1 syn match foxproFunc "\<asca\%[n]\>\s*("me=e-1 syn match foxproFunc "\<asin\>\s*("me=e-1 syn match foxproFunc "\<asor\%[t]\>\s*("me=e-1 syn match foxproFunc "\<asub\%[script]\>\s*("me=e-1 syn match foxproFunc "\<at\>\s*("me=e-1 syn match foxproFunc "\<atan\>\s*("me=e-1 syn match foxproFunc "\<atc\>\s*("me=e-1 syn match foxproFunc "\<atcl\%[ine]\>\s*("me=e-1 syn match foxproFunc "\<atli\%[ne]\>\s*("me=e-1 syn match foxproFunc "\<atn2\>\s*("me=e-1 syn match foxproFunc "\<bar\>\s*("me=e-1 syn match foxproFunc "\<barc\%[ount]\>\s*("me=e-1 syn match foxproFunc "\<barp\%[rompt]\>\s*("me=e-1 syn match foxproFunc "\<betw\%[een]\>\s*("me=e-1 syn match foxproFunc "\<bof\>\s*("me=e-1 syn match foxproFunc "\<caps\%[lock]\>\s*("me=e-1 syn match foxproFunc "\<cdow\>\s*("me=e-1 syn match foxproFunc "\<cdx\>\s*("me=e-1 syn match foxproFunc "\<ceil\%[ing]\>\s*("me=e-1 syn match foxproFunc "\<chr\>\s*("me=e-1 syn match foxproFunc "\<chrs\%[aw]\>\s*("me=e-1 syn match foxproFunc "\<chrt\%[ran]\>\s*("me=e-1 syn match foxproFunc "\<cmon\%[th]\>\s*("me=e-1 syn match foxproFunc "\<cntb\%[ar]\>\s*("me=e-1 syn match foxproFunc "\<cntp\%[ad]\>\s*("me=e-1 syn match foxproFunc "\<col\>\s*("me=e-1 syn match foxproFunc "\<cos\>\s*("me=e-1 syn match foxproFunc "\<cpco\%[nvert]\>\s*("me=e-1 syn match foxproFunc "\<cpcu\%[rrent]\>\s*("me=e-1 syn match foxproFunc "\<cpdb\%[f]\>\s*("me=e-1 syn match foxproFunc "\<ctod\>\s*("me=e-1 syn match foxproFunc "\<curd\%[ir]\>\s*("me=e-1 syn match foxproFunc "\<date\>\s*("me=e-1 syn match foxproFunc "\<day\>\s*("me=e-1 syn match foxproFunc "\<dbf\>\s*("me=e-1 syn match foxproFunc "\<ddea\%[borttrans]\>\s*("me=e-1 syn match foxproFunc "\<ddea\%[dvise]\>\s*("me=e-1 syn match foxproFunc "\<ddee\%[nabled]\>\s*("me=e-1 syn match foxproFunc "\<ddee\%[xecute]\>\s*("me=e-1 syn match foxproFunc "\<ddei\%[nitiate]\>\s*("me=e-1 syn match foxproFunc "\<ddel\%[asterror]\>\s*("me=e-1 syn match foxproFunc "\<ddep\%[oke]\>\s*("me=e-1 syn match foxproFunc "\<dder\%[equest]\>\s*("me=e-1 syn match foxproFunc "\<ddes\%[etoption]\>\s*("me=e-1 syn match foxproFunc "\<ddes\%[etservice]\>\s*("me=e-1 syn match foxproFunc "\<ddes\%[ettopic]\>\s*("me=e-1 syn match foxproFunc "\<ddet\%[erminate]\>\s*("me=e-1 syn match foxproFunc "\<dele\%[ted]\>\s*("me=e-1 syn match foxproFunc "\<desc\%[ending]\>\s*("me=e-1 syn match foxproFunc "\<diff\%[erence]\>\s*("me=e-1 syn match foxproFunc "\<disk\%[space]\>\s*("me=e-1 syn match foxproFunc "\<dmy\>\s*("me=e-1 syn match foxproFunc "\<dow\>\s*("me=e-1 syn match foxproFunc "\<dtoc\>\s*("me=e-1 syn match foxproFunc "\<dtor\>\s*("me=e-1 syn match foxproFunc "\<dtos\>\s*("me=e-1 syn match foxproFunc "\<empt\%[y]\>\s*("me=e-1 syn match foxproFunc "\<eof\>\s*("me=e-1 syn match foxproFunc "\<erro\%[r]\>\s*("me=e-1 syn match foxproFunc "\<eval\%[uate]\>\s*("me=e-1 syn match foxproFunc "\<exp\>\s*("me=e-1 syn match foxproFunc "\<fchs\%[ize]\>\s*("me=e-1 syn match foxproFunc "\<fclo\%[se]\>\s*("me=e-1 syn match foxproFunc "\<fcou\%[nt]\>\s*("me=e-1 syn match foxproFunc "\<fcre\%[ate]\>\s*("me=e-1 syn match foxproFunc "\<fdat\%[e]\>\s*("me=e-1 syn match foxproFunc "\<feof\>\s*("me=e-1 syn match foxproFunc "\<ferr\%[or]\>\s*("me=e-1 syn match foxproFunc "\<fflu\%[sh]\>\s*("me=e-1 syn match foxproFunc "\<fget\%[s]\>\s*("me=e-1 syn match foxproFunc "\<fiel\%[d]\>\s*("me=e-1 syn match foxproFunc "\<file\>\s*("me=e-1 syn match foxproFunc "\<filt\%[er]\>\s*("me=e-1 syn match foxproFunc "\<fkla\%[bel]\>\s*("me=e-1 syn match foxproFunc "\<fkma\%[x]\>\s*("me=e-1 syn match foxproFunc "\<fldl\%[ist]\>\s*("me=e-1 syn match foxproFunc "\<floc\%[k]\>\s*("me=e-1 syn match foxproFunc "\<floo\%[r]\>\s*("me=e-1 syn match foxproFunc "\<font\%[metric]\>\s*("me=e-1 syn match foxproFunc "\<fope\%[n]\>\s*("me=e-1 syn match foxproFunc "\<for\>\s*("me=e-1 syn match foxproFunc "\<foun\%[d]\>\s*("me=e-1 syn match foxproFunc "\<fput\%[s]\>\s*("me=e-1 syn match foxproFunc "\<frea\%[d]\>\s*("me=e-1 syn match foxproFunc "\<fsee\%[k]\>\s*("me=e-1 syn match foxproFunc "\<fsiz\%[e]\>\s*("me=e-1 syn match foxproFunc "\<ftim\%[e]\>\s*("me=e-1 syn match foxproFunc "\<full\%[path]\>\s*("me=e-1 syn match foxproFunc "\<fv\>\s*("me=e-1 syn match foxproFunc "\<fwri\%[te]\>\s*("me=e-1 syn match foxproFunc "\<getb\%[ar]\>\s*("me=e-1 syn match foxproFunc "\<getd\%[ir]\>\s*("me=e-1 syn match foxproFunc "\<gete\%[nv]\>\s*("me=e-1 syn match foxproFunc "\<getf\%[ile]\>\s*("me=e-1 syn match foxproFunc "\<getf\%[ont]\>\s*("me=e-1 syn match foxproFunc "\<getp\%[ad]\>\s*("me=e-1 syn match foxproFunc "\<gomo\%[nth]\>\s*("me=e-1 syn match foxproFunc "\<head\%[er]\>\s*("me=e-1 syn match foxproFunc "\<home\>\s*("me=e-1 syn match foxproFunc "\<idxc\%[ollate]\>\s*("me=e-1 syn match foxproFunc "\<iif\>\s*("me=e-1 syn match foxproFunc "\<inke\%[y]\>\s*("me=e-1 syn match foxproFunc "\<inli\%[st]\>\s*("me=e-1 syn match foxproFunc "\<insm\%[ode]\>\s*("me=e-1 syn match foxproFunc "\<int\>\s*("me=e-1 syn match foxproFunc "\<isal\%[pha]\>\s*("me=e-1 syn match foxproFunc "\<isbl\%[ank]\>\s*("me=e-1 syn match foxproFunc "\<isco\%[lor]\>\s*("me=e-1 syn match foxproFunc "\<isdi\%[git]\>\s*("me=e-1 syn match foxproFunc "\<islo\%[wer]\>\s*("me=e-1 syn match foxproFunc "\<isre\%[adonly]\>\s*("me=e-1 syn match foxproFunc "\<isup\%[per]\>\s*("me=e-1 syn match foxproFunc "\<key\>\s*("me=e-1 syn match foxproFunc "\<keym\%[atch]\>\s*("me=e-1 syn match foxproFunc "\<last\%[key]\>\s*("me=e-1 syn match foxproFunc "\<left\>\s*("me=e-1 syn match foxproFunc "\<len\>\s*("me=e-1 syn match foxproFunc "\<like\>\s*("me=e-1 syn match foxproFunc "\<line\%[no]\>\s*("me=e-1 syn match foxproFunc "\<locf\%[ile]\>\s*("me=e-1 syn match foxproFunc "\<lock\>\s*("me=e-1 syn match foxproFunc "\<log\>\s*("me=e-1 syn match foxproFunc "\<log1\%[0]\>\s*("me=e-1 syn match foxproFunc "\<look\%[up]\>\s*("me=e-1 syn match foxproFunc "\<lowe\%[r]\>\s*("me=e-1 syn match foxproFunc "\<ltri\%[m]\>\s*("me=e-1 syn match foxproFunc "\<lupd\%[ate]\>\s*("me=e-1 syn match foxproFunc "\<max\>\s*("me=e-1 syn match foxproFunc "\<mcol\>\s*("me=e-1 syn match foxproFunc "\<mdow\%[n]\>\s*("me=e-1 syn match foxproFunc "\<mdx\>\s*("me=e-1 syn match foxproFunc "\<mdy\>\s*("me=e-1 syn match foxproFunc "\<meml\%[ines]\>\s*("me=e-1 syn match foxproFunc "\<memo\%[ry]\>\s*("me=e-1 syn match foxproFunc "\<menu\>\s*("me=e-1 syn match foxproFunc "\<mess\%[age]\>\s*("me=e-1 syn match foxproFunc "\<min\>\s*("me=e-1 syn match foxproFunc "\<mlin\%[e]\>\s*("me=e-1 syn match foxproFunc "\<mod\>\s*("me=e-1 syn match foxproFunc "\<mont\%[h]\>\s*("me=e-1 syn match foxproFunc "\<mrkb\%[ar]\>\s*("me=e-1 syn match foxproFunc "\<mrkp\%[ad]\>\s*("me=e-1 syn match foxproFunc "\<mrow\>\s*("me=e-1 syn match foxproFunc "\<mwin\%[dow]\>\s*("me=e-1 syn match foxproFunc "\<ndx\>\s*("me=e-1 syn match foxproFunc "\<norm\%[alize]\>\s*("me=e-1 syn match foxproFunc "\<numl\%[ock]\>\s*("me=e-1 syn match foxproFunc "\<objn\%[um]\>\s*("me=e-1 syn match foxproFunc "\<objv\%[ar]\>\s*("me=e-1 syn match foxproFunc "\<occu\%[rs]\>\s*("me=e-1 syn match foxproFunc "\<oemt\%[oansi]\>\s*("me=e-1 syn match foxproFunc "\<on\>\s*("me=e-1 syn match foxproFunc "\<orde\%[r]\>\s*("me=e-1 syn match foxproFunc "\<os\>\s*("me=e-1 syn match foxproFunc "\<pad\>\s*("me=e-1 syn match foxproFunc "\<padc\>\s*("me=e-1 syn match foxproFunc "\<padl\>\s*("me=e-1 syn match foxproFunc "\<padr\>\s*("me=e-1 syn match foxproFunc "\<para\%[meters]\>\s*("me=e-1 syn match foxproFunc "\<paym\%[ent]\>\s*("me=e-1 syn match foxproFunc "\<pcol\>\s*("me=e-1 syn match foxproFunc "\<pi\>\s*("me=e-1 syn match foxproFunc "\<popu\%[p]\>\s*("me=e-1 syn match foxproFunc "\<prin\%[tstatus]\>\s*("me=e-1 syn match foxproFunc "\<prmb\%[ar]\>\s*("me=e-1 syn match foxproFunc "\<prmp\%[ad]\>\s*("me=e-1 syn match foxproFunc "\<prog\%[ram]\>\s*("me=e-1 syn match foxproFunc "\<prom\%[pt]\>\s*("me=e-1 syn match foxproFunc "\<prop\%[er]\>\s*("me=e-1 syn match foxproFunc "\<prow\>\s*("me=e-1 syn match foxproFunc "\<prti\%[nfo]\>\s*("me=e-1 syn match foxproFunc "\<putf\%[ile]\>\s*("me=e-1 syn match foxproFunc "\<pv\>\s*("me=e-1 syn match foxproFunc "\<rand\>\s*("me=e-1 syn match foxproFunc "\<rat\>\s*("me=e-1 syn match foxproFunc "\<ratl\%[ine]\>\s*("me=e-1 syn match foxproFunc "\<rdle\%[vel]\>\s*("me=e-1 syn match foxproFunc "\<read\%[key]\>\s*("me=e-1 syn match foxproFunc "\<recc\%[ount]\>\s*("me=e-1 syn match foxproFunc "\<recn\%[o]\>\s*("me=e-1 syn match foxproFunc "\<recs\%[ize]\>\s*("me=e-1 syn match foxproFunc "\<rela\%[tion]\>\s*("me=e-1 syn match foxproFunc "\<repl\%[icate]\>\s*("me=e-1 syn match foxproFunc "\<rgbs\%[cheme]\>\s*("me=e-1 syn match foxproFunc "\<righ\%[t]\>\s*("me=e-1 syn match foxproFunc "\<rloc\%[k]\>\s*("me=e-1 syn match foxproFunc "\<roun\%[d]\>\s*("me=e-1 syn match foxproFunc "\<row\>\s*("me=e-1 syn match foxproFunc "\<rtod\>\s*("me=e-1 syn match foxproFunc "\<rtri\%[m]\>\s*("me=e-1 syn match foxproFunc "\<sche\%[me]\>\s*("me=e-1 syn match foxproFunc "\<scol\%[s]\>\s*("me=e-1 syn match foxproFunc "\<seco\%[nds]\>\s*("me=e-1 syn match foxproFunc "\<seek\>\s*("me=e-1 syn match foxproFunc "\<sele\%[ct]\>\s*("me=e-1 syn match foxproFunc "\<set\>\s*("me=e-1 syn match foxproFunc "\<sign\>\s*("me=e-1 syn match foxproFunc "\<sin\>\s*("me=e-1 syn match foxproFunc "\<skpb\%[ar]\>\s*("me=e-1 syn match foxproFunc "\<skpp\%[ad]\>\s*("me=e-1 syn match foxproFunc "\<soun\%[dex]\>\s*("me=e-1 syn match foxproFunc "\<spac\%[e]\>\s*("me=e-1 syn match foxproFunc "\<sqrt\>\s*("me=e-1 syn match foxproFunc "\<srow\%[s]\>\s*("me=e-1 syn match foxproFunc "\<str\>\s*("me=e-1 syn match foxproFunc "\<strt\%[ran]\>\s*("me=e-1 syn match foxproFunc "\<stuf\%[f]\>\s*("me=e-1 syn match foxproFunc "\<subs\%[tr]\>\s*("me=e-1 syn match foxproFunc "\<sysm\%[etric]\>\s*("me=e-1 syn match foxproFunc "\<sys\>\s*("me=e-1 syn match foxproFunc "\<tag\>\s*("me=e-1 syn match foxproFunc "\<tagc\%[ount]\>\s*("me=e-1 syn match foxproFunc "\<tagn\%[o]\>\s*("me=e-1 syn match foxproFunc "\<tan\>\s*("me=e-1 syn match foxproFunc "\<targ\%[et]\>\s*("me=e-1 syn match foxproFunc "\<time\>\s*("me=e-1 syn match foxproFunc "\<tran\%[sform]\>\s*("me=e-1 syn match foxproFunc "\<trim\>\s*("me=e-1 syn match foxproFunc "\<txtw\%[idth]\>\s*("me=e-1 syn match foxproFunc "\<type\>\s*("me=e-1 syn match foxproFunc "\<uniq\%[ue]\>\s*("me=e-1 syn match foxproFunc "\<upda\%[ted]\>\s*("me=e-1 syn match foxproFunc "\<uppe\%[r]\>\s*("me=e-1 syn match foxproFunc "\<used\>\s*("me=e-1 syn match foxproFunc "\<val\>\s*("me=e-1 syn match foxproFunc "\<varr\%[ead]\>\s*("me=e-1 syn match foxproFunc "\<vers\%[ion]\>\s*("me=e-1 syn match foxproFunc "\<wbor\%[der]\>\s*("me=e-1 syn match foxproFunc "\<wchi\%[ld]\>\s*("me=e-1 syn match foxproFunc "\<wcol\%[s]\>\s*("me=e-1 syn match foxproFunc "\<wexi\%[st]\>\s*("me=e-1 syn match foxproFunc "\<wfon\%[t]\>\s*("me=e-1 syn match foxproFunc "\<wlas\%[t]\>\s*("me=e-1 syn match foxproFunc "\<wlco\%[l]\>\s*("me=e-1 syn match foxproFunc "\<wlro\%[w]\>\s*("me=e-1 syn match foxproFunc "\<wmax\%[imum]\>\s*("me=e-1 syn match foxproFunc "\<wmin\%[imum]\>\s*("me=e-1 syn match foxproFunc "\<wont\%[op]\>\s*("me=e-1 syn match foxproFunc "\<wout\%[put]\>\s*("me=e-1 syn match foxproFunc "\<wpar\%[ent]\>\s*("me=e-1 syn match foxproFunc "\<wrea\%[d]\>\s*("me=e-1 syn match foxproFunc "\<wrow\%[s]\>\s*("me=e-1 syn match foxproFunc "\<wtit\%[le]\>\s*("me=e-1 syn match foxproFunc "\<wvis\%[ible]\>\s*("me=e-1 syn match foxproFunc "\<year\>\s*("me=e-1 " Commands syn match foxproCmd "^\s*\<acce\%[pt]\>" syn match foxproCmd "^\s*\<acti\%[vate]\>\s*\<menu\>" syn match foxproCmd "^\s*\<acti\%[vate]\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<acti\%[vate]\>\s*\<scre\%[en]\>" syn match foxproCmd "^\s*\<acti\%[vate]\>\s*\<wind\%[ow]\>" syn match foxproCmd "^\s*\<appe\%[nd]\>" syn match foxproCmd "^\s*\<appe\%[nd]\>\s*\<from\>" syn match foxproCmd "^\s*\<appe\%[nd]\>\s*\<from\>\s*\<arra\%[y]\>" syn match foxproCmd "^\s*\<appe\%[nd]\>\s*\<gene\%[ral]\>" syn match foxproCmd "^\s*\<appe\%[nd]\>\s*\<memo\>" syn match foxproCmd "^\s*\<assi\%[st]\>" syn match foxproCmd "^\s*\<aver\%[age]\>" syn match foxproCmd "^\s*\<blan\%[k]\>" syn match foxproCmd "^\s*\<brow\%[se]\>" syn match foxproCmd "^\s*\<buil\%[d]\>\s*\<app\>" syn match foxproCmd "^\s*\<buil\%[d]\>\s*\<exe\>" syn match foxproCmd "^\s*\<buil\%[d]\>\s*\<proj\%[ect]\>" syn match foxproCmd "^\s*\<calc\%[ulate]\>" syn match foxproCmd "^\s*\<call\>" syn match foxproCmd "^\s*\<canc\%[el]\>" syn match foxproCmd "^\s*\<chan\%[ge]\>" syn match foxproCmd "^\s*\<clea\%[r]\>" syn match foxproCmd "^\s*\<clos\%[e]\>" syn match foxproCmd "^\s*\<clos\%[e]\>\s*\<memo\>" syn match foxproCmd "^\s*\<comp\%[ile]\>" syn match foxproCmd "^\s*\<cont\%[inue]\>" syn match foxproCmd "^\s*\<copy\>\s*\<file\>" syn match foxproCmd "^\s*\<copy\>\s*\<inde\%[xes]\>" syn match foxproCmd "^\s*\<copy\>\s*\<memo\>" syn match foxproCmd "^\s*\<copy\>\s*\<stru\%[cture]\>" syn match foxproCmd "^\s*\<copy\>\s*\<stru\%[cture]\>\s*\<exte\%[nded]\>" syn match foxproCmd "^\s*\<copy\>\s*\<tag\>" syn match foxproCmd "^\s*\<copy\>\s*\<to\>" syn match foxproCmd "^\s*\<copy\>\s*\<to\>\s*\<arra\%[y]\>" syn match foxproCmd "^\s*\<coun\%[t]\>" syn match foxproCmd "^\s*\<crea\%[te]\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<colo\%[r]\>\s*\<set\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<curs\%[or]\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<from\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<labe\%[l]\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<menu\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<proj\%[ect]\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<quer\%[y]\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<repo\%[rt]\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<scre\%[en]\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<tabl\%[e]\>" syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<view\>" syn match foxproCmd "^\s*\<dde\>" syn match foxproCmd "^\s*\<deac\%[tivate]\>\s*\<menu\>" syn match foxproCmd "^\s*\<deac\%[tivate]\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<deac\%[tivate]\>\s*\<wind\%[ow]\>" syn match foxproCmd "^\s*\<decl\%[are]\>" syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<bar\>" syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<box\>" syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<menu\>" syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<pad\>" syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<wind\%[ow]\>" syn match foxproCmd "^\s*\<dele\%[te]\>" syn match foxproCmd "^\s*\<dele\%[te]\>\s*\<file\>" syn match foxproCmd "^\s*\<dele\%[te]\>\s*\<tag\>" syn match foxproCmd "^\s*\<dime\%[nsion]\>" syn match foxproCmd "^\s*\<dire\%[ctory]\>" syn match foxproCmd "^\s*\<disp\%[lay]\>" syn match foxproCmd "^\s*\<disp\%[lay]\>\s*\<file\%[s]\>" syn match foxproCmd "^\s*\<disp\%[lay]\>\s*\<memo\%[ry]\>" syn match foxproCmd "^\s*\<disp\%[lay]\>\s*\<stat\%[us]\>" syn match foxproCmd "^\s*\<disp\%[lay]\>\s*\<stru\%[cture]\>" syn match foxproCmd "^\s*\<do\>" syn match foxproCmd "^\s*\<edit\>" syn match foxproCmd "^\s*\<ejec\%[t]\>" syn match foxproCmd "^\s*\<ejec\%[t]\>\s*\<page\>" syn match foxproCmd "^\s*\<eras\%[e]\>" syn match foxproCmd "^\s*\<exit\>" syn match foxproCmd "^\s*\<expo\%[rt]\>" syn match foxproCmd "^\s*\<exte\%[rnal]\>" syn match foxproCmd "^\s*\<file\%[r]\>" syn match foxproCmd "^\s*\<find\>" syn match foxproCmd "^\s*\<flus\%[h]\>" syn match foxproCmd "^\s*\<func\%[tion]\>" syn match foxproCmd "^\s*\<gath\%[er]\>" syn match foxproCmd "^\s*\<gete\%[xpr]\>" syn match foxproCmd "^\s*\<go\>" syn match foxproCmd "^\s*\<goto\>" syn match foxproCmd "^\s*\<help\>" syn match foxproCmd "^\s*\<hide\>\s*\<menu\>" syn match foxproCmd "^\s*\<hide\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<hide\>\s*\<wind\%[ow]\>" syn match foxproCmd "^\s*\<impo\%[rt]\>" syn match foxproCmd "^\s*\<inde\%[x]\>" syn match foxproCmd "^\s*\<inpu\%[t]\>" syn match foxproCmd "^\s*\<inse\%[rt]\>" syn match foxproCmd "^\s*\<join\>" syn match foxproCmd "^\s*\<keyb\%[oard]\>" syn match foxproCmd "^\s*\<labe\%[l]\>" syn match foxproCmd "^\s*\<list\>" syn match foxproCmd "^\s*\<load\>" syn match foxproCmd "^\s*\<loca\%[te]\>" syn match foxproCmd "^\s*\<loop\>" syn match foxproCmd "^\s*\<menu\>" syn match foxproCmd "^\s*\<menu\>\s*\<to\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<comm\%[and]\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<file\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<gene\%[ral]\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<labe\%[l]\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<memo\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<menu\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<proj\%[ect]\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<quer\%[y]\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<repo\%[rt]\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<scre\%[en]\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<stru\%[cture]\>" syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<wind\%[ow]\>" syn match foxproCmd "^\s*\<move\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<move\>\s*\<wind\%[ow]\>" syn match foxproCmd "^\s*\<note\>" syn match foxproCmd "^\s*\<on\>\s*\<apla\%[bout]\>" syn match foxproCmd "^\s*\<on\>\s*\<bar\>" syn match foxproCmd "^\s*\<on\>\s*\<erro\%[r]\>" syn match foxproCmd "^\s*\<on\>\s*\<esca\%[pe]\>" syn match foxproCmd "^\s*\<on\>\s*\<exit\>\s*\<bar\>" syn match foxproCmd "^\s*\<on\>\s*\<exit\>\s*\<menu\>" syn match foxproCmd "^\s*\<on\>\s*\<exit\>\s*\<pad\>" syn match foxproCmd "^\s*\<on\>\s*\<exit\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<on\>\s*\<key\>" syn match foxproCmd "^\s*\<on\>\s*\<key\>\s*\<=\>" syn match foxproCmd "^\s*\<on\>\s*\<key\>\s*\<labe\%[l]\>" syn match foxproCmd "^\s*\<on\>\s*\<mach\%[elp]\>" syn match foxproCmd "^\s*\<on\>\s*\<pad\>" syn match foxproCmd "^\s*\<on\>\s*\<page\>" syn match foxproCmd "^\s*\<on\>\s*\<read\%[error]\>" syn match foxproCmd "^\s*\<on\>\s*\<sele\%[ction]\>\s*\<bar\>" syn match foxproCmd "^\s*\<on\>\s*\<sele\%[ction]\>\s*\<menu\>" syn match foxproCmd "^\s*\<on\>\s*\<sele\%[ction]\>\s*\<pad\>" syn match foxproCmd "^\s*\<on\>\s*\<sele\%[ction]\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<on\>\s*\<shut\%[down]\>" syn match foxproCmd "^\s*\<pack\>" syn match foxproCmd "^\s*\<para\%[meters]\>" syn match foxproCmd "^\s*\<play\>\s*\<macr\%[o]\>" syn match foxproCmd "^\s*\<pop\>\s*\<key\>" syn match foxproCmd "^\s*\<pop\>\s*\<menu\>" syn match foxproCmd "^\s*\<pop\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<priv\%[ate]\>" syn match foxproCmd "^\s*\<proc\%[edure]\>" syn match foxproCmd "^\s*\<publ\%[ic]\>" syn match foxproCmd "^\s*\<push\>\s*\<key\>" syn match foxproCmd "^\s*\<push\>\s*\<menu\>" syn match foxproCmd "^\s*\<push\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<quit\>" syn match foxproCmd "^\s*\<read\>" syn match foxproCmd "^\s*\<read\>\s*\<menu\>" syn match foxproCmd "^\s*\<reca\%[ll]\>" syn match foxproCmd "^\s*\<rein\%[dex]\>" syn match foxproCmd "^\s*\<rele\%[ase]\>" syn match foxproCmd "^\s*\<rele\%[ase]\>\s*\<modu\%[le]\>" syn match foxproCmd "^\s*\<rena\%[me]\>" syn match foxproCmd "^\s*\<repl\%[ace]\>" syn match foxproCmd "^\s*\<repl\%[ace]\>\s*\<from\>\s*\<arra\%[y]\>" syn match foxproCmd "^\s*\<repo\%[rt]\>" syn match foxproCmd "^\s*\<rest\%[ore]\>\s*\<from\>" syn match foxproCmd "^\s*\<rest\%[ore]\>\s*\<macr\%[os]\>" syn match foxproCmd "^\s*\<rest\%[ore]\>\s*\<scre\%[en]\>" syn match foxproCmd "^\s*\<rest\%[ore]\>\s*\<wind\%[ow]\>" syn match foxproCmd "^\s*\<resu\%[me]\>" syn match foxproCmd "^\s*\<retr\%[y]\>" syn match foxproCmd "^\s*\<retu\%[rn]\>" syn match foxproCmd "^\s*\<run\>" syn match foxproCmd "^\s*\<run\>\s*\/n" syn match foxproCmd "^\s*\<runs\%[cript]\>" syn match foxproCmd "^\s*\<save\>\s*\<macr\%[os]\>" syn match foxproCmd "^\s*\<save\>\s*\<scre\%[en]\>" syn match foxproCmd "^\s*\<save\>\s*\<to\>" syn match foxproCmd "^\s*\<save\>\s*\<wind\%[ows]\>" syn match foxproCmd "^\s*\<scat\%[ter]\>" syn match foxproCmd "^\s*\<scro\%[ll]\>" syn match foxproCmd "^\s*\<seek\>" syn match foxproCmd "^\s*\<sele\%[ct]\>" syn match foxproCmd "^\s*\<set\>" syn match foxproCmd "^\s*\<set\>\s*\<alte\%[rnate]\>" syn match foxproCmd "^\s*\<set\>\s*\<ansi\>" syn match foxproCmd "^\s*\<set\>\s*\<apla\%[bout]\>" syn match foxproCmd "^\s*\<set\>\s*\<auto\%[save]\>" syn match foxproCmd "^\s*\<set\>\s*\<bell\>" syn match foxproCmd "^\s*\<set\>\s*\<blin\%[k]\>" syn match foxproCmd "^\s*\<set\>\s*\<bloc\%[ksize]\>" syn match foxproCmd "^\s*\<set\>\s*\<bord\%[er]\>" syn match foxproCmd "^\s*\<set\>\s*\<brst\%[atus]\>" syn match foxproCmd "^\s*\<set\>\s*\<carr\%[y]\>" syn match foxproCmd "^\s*\<set\>\s*\<cent\%[ury]\>" syn match foxproCmd "^\s*\<set\>\s*\<clea\%[r]\>" syn match foxproCmd "^\s*\<set\>\s*\<cloc\%[k]\>" syn match foxproCmd "^\s*\<set\>\s*\<coll\%[ate]\>" syn match foxproCmd "^\s*\<set\>\s*\<colo\%[r]\>\s*\<of\>" syn match foxproCmd "^\s*\<set\>\s*\<colo\%[r]\>\s*\<of\>\s*\<sche\%[me]\>" syn match foxproCmd "^\s*\<set\>\s*\<colo\%[r]\>\s*\<set\>" syn match foxproCmd "^\s*\<set\>\s*\<colo\%[r]\>\s*\<to\>" syn match foxproCmd "^\s*\<set\>\s*\<comp\%[atible]\>" syn match foxproCmd "^\s*\<set\>\s*\<conf\%[irm]\>" syn match foxproCmd "^\s*\<set\>\s*\<cons\%[ole]\>" syn match foxproCmd "^\s*\<set\>\s*\<curr\%[ency]\>" syn match foxproCmd "^\s*\<set\>\s*\<curs\%[or]\>" syn match foxproCmd "^\s*\<set\>\s*\<date\>" syn match foxproCmd "^\s*\<set\>\s*\<debu\%[g]\>" syn match foxproCmd "^\s*\<set\>\s*\<deci\%[mals]\>" syn match foxproCmd "^\s*\<set\>\s*\<defa\%[ult]\>" syn match foxproCmd "^\s*\<set\>\s*\<dele\%[ted]\>" syn match foxproCmd "^\s*\<set\>\s*\<deli\%[miters]\>" syn match foxproCmd "^\s*\<set\>\s*\<deve\%[lopment]\>" syn match foxproCmd "^\s*\<set\>\s*\<devi\%[ce]\>" syn match foxproCmd "^\s*\<set\>\s*\<disp\%[lay]\>" syn match foxproCmd "^\s*\<set\>\s*\<dohi\%[story]\>" syn match foxproCmd "^\s*\<set\>\s*\<echo\>" syn match foxproCmd "^\s*\<set\>\s*\<esca\%[pe]\>" syn match foxproCmd "^\s*\<set\>\s*\<exac\%[t]\>" syn match foxproCmd "^\s*\<set\>\s*\<excl\%[usive]\>" syn match foxproCmd "^\s*\<set\>\s*\<fiel\%[ds]\>" syn match foxproCmd "^\s*\<set\>\s*\<filt\%[er]\>" syn match foxproCmd "^\s*\<set\>\s*\<fixe\%[d]\>" syn match foxproCmd "^\s*\<set\>\s*\<form\%[at]\>" syn match foxproCmd "^\s*\<set\>\s*\<full\%[path]\>" syn match foxproCmd "^\s*\<set\>\s*\<func\%[tion]\>" syn match foxproCmd "^\s*\<set\>\s*\<head\%[ings]\>" syn match foxproCmd "^\s*\<set\>\s*\<help\>" syn match foxproCmd "^\s*\<set\>\s*\<help\%[filter]\>" syn match foxproCmd "^\s*\<set\>\s*\<hour\%[s]\>" syn match foxproCmd "^\s*\<set\>\s*\<inde\%[x]\>" syn match foxproCmd "^\s*\<set\>\s*\<inte\%[nsity]\>" syn match foxproCmd "^\s*\<set\>\s*\<key\>" syn match foxproCmd "^\s*\<set\>\s*\<keyc\%[omp]\>" syn match foxproCmd "^\s*\<set\>\s*\<libr\%[ary]\>" syn match foxproCmd "^\s*\<set\>\s*\<lock\>" syn match foxproCmd "^\s*\<set\>\s*\<loge\%[rrors]\>" syn match foxproCmd "^\s*\<set\>\s*\<macd\%[esktop]\>" syn match foxproCmd "^\s*\<set\>\s*\<mach\%[elp]\>" syn match foxproCmd "^\s*\<set\>\s*\<mack\%[ey]\>" syn match foxproCmd "^\s*\<set\>\s*\<marg\%[in]\>" syn match foxproCmd "^\s*\<set\>\s*\<mark\>\s*\<of\>" syn match foxproCmd "^\s*\<set\>\s*\<mark\>\s*\<to\>" syn match foxproCmd "^\s*\<set\>\s*\<memo\%[width]\>" syn match foxproCmd "^\s*\<set\>\s*\<mess\%[age]\>" syn match foxproCmd "^\s*\<set\>\s*\<mous\%[e]\>" syn match foxproCmd "^\s*\<set\>\s*\<mult\%[ilocks]\>" syn match foxproCmd "^\s*\<set\>\s*\<near\>" syn match foxproCmd "^\s*\<set\>\s*\<nocp\%[trans]\>" syn match foxproCmd "^\s*\<set\>\s*\<noti\%[fy]\>" syn match foxproCmd "^\s*\<set\>\s*\<odom\%[eter]\>" syn match foxproCmd "^\s*\<set\>\s*\<opti\%[mize]\>" syn match foxproCmd "^\s*\<set\>\s*\<orde\%[r]\>" syn match foxproCmd "^\s*\<set\>\s*\<pale\%[tte]\>" syn match foxproCmd "^\s*\<set\>\s*\<path\>" syn match foxproCmd "^\s*\<set\>\s*\<pdse\%[tup]\>" syn match foxproCmd "^\s*\<set\>\s*\<poin\%[t]\>" syn match foxproCmd "^\s*\<set\>\s*\<prin\%[ter]\>" syn match foxproCmd "^\s*\<set\>\s*\<proc\%[edure]\>" syn match foxproCmd "^\s*\<set\>\s*\<read\%[border]\>" syn match foxproCmd "^\s*\<set\>\s*\<refr\%[esh]\>" syn match foxproCmd "^\s*\<set\>\s*\<rela\%[tion]\>" syn match foxproCmd "^\s*\<set\>\s*\<rela\%[tion]\>\s*\<off\>" syn match foxproCmd "^\s*\<set\>\s*\<repr\%[ocess]\>" syn match foxproCmd "^\s*\<set\>\s*\<reso\%[urce]\>" syn match foxproCmd "^\s*\<set\>\s*\<safe\%[ty]\>" syn match foxproCmd "^\s*\<set\>\s*\<scor\%[eboard]\>" syn match foxproCmd "^\s*\<set\>\s*\<sepa\%[rator]\>" syn match foxproCmd "^\s*\<set\>\s*\<shad\%[ows]\>" syn match foxproCmd "^\s*\<set\>\s*\<skip\>" syn match foxproCmd "^\s*\<set\>\s*\<skip\>\s*\<of\>" syn match foxproCmd "^\s*\<set\>\s*\<spac\%[e]\>" syn match foxproCmd "^\s*\<set\>\s*\<stat\%[us]\>" syn match foxproCmd "^\s*\<set\>\s*\<stat\%[us]\>\s*\<bar\>" syn match foxproCmd "^\s*\<set\>\s*\<step\>" syn match foxproCmd "^\s*\<set\>\s*\<stic\%[ky]\>" syn match foxproCmd "^\s*\<set\>\s*\<sysm\%[enu]\>" syn match foxproCmd "^\s*\<set\>\s*\<talk\>" syn match foxproCmd "^\s*\<set\>\s*\<text\%[merge]\>" syn match foxproCmd "^\s*\<set\>\s*\<text\%[merge]\>\s*\<deli\%[miters]\>" syn match foxproCmd "^\s*\<set\>\s*\<topi\%[c]\>" syn match foxproCmd "^\s*\<set\>\s*\<trbe\%[tween]\>" syn match foxproCmd "^\s*\<set\>\s*\<type\%[ahead]\>" syn match foxproCmd "^\s*\<set\>\s*\<udfp\%[arms]\>" syn match foxproCmd "^\s*\<set\>\s*\<uniq\%[ue]\>" syn match foxproCmd "^\s*\<set\>\s*\<view\>" syn match foxproCmd "^\s*\<set\>\s*\<volu\%[me]\>" syn match foxproCmd "^\s*\<set\>\s*\<wind\%[ow]\>\s*\<of\>\s*\<memo\>" syn match foxproCmd "^\s*\<set\>\s*\<xcmd\%[file]\>" syn match foxproCmd "^\s*\<show\>\s*\<get\>" syn match foxproCmd "^\s*\<show\>\s*\<gets\>" syn match foxproCmd "^\s*\<show\>\s*\<menu\>" syn match foxproCmd "^\s*\<show\>\s*\<obje\%[ct]\>" syn match foxproCmd "^\s*\<show\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<show\>\s*\<wind\%[ow]\>" syn match foxproCmd "^\s*\<size\>\s*\<popu\%[p]\>" syn match foxproCmd "^\s*\<skip\>" syn match foxproCmd "^\s*\<sort\>" syn match foxproCmd "^\s*\<stor\%[e]\>" syn match foxproCmd "^\s*\<sum\>" syn match foxproCmd "^\s*\<susp\%[end]\>" syn match foxproCmd "^\s*\<tota\%[l]\>" syn match foxproCmd "^\s*\<type\>" syn match foxproCmd "^\s*\<unlo\%[ck]\>" syn match foxproCmd "^\s*\<upda\%[te]\>" syn match foxproCmd "^\s*\<use\>" syn match foxproCmd "^\s*\<wait\>" syn match foxproCmd "^\s*\<zap\>" syn match foxproCmd "^\s*\<zoom\>\s*\<wind\%[ow]\>" " Enclosed Block syn match foxproEnBlk "^\s*\<do\>\s*\<case\>" syn match foxproEnBlk "^\s*\<case\>" syn match foxproEnBlk "^\s*\<othe\%[rwise]\>" syn match foxproEnBlk "^\s*\<endc\%[ase]\>" syn match foxproEnBlk "^\s*\<do\>\s*\<whil\%[e]\>" syn match foxproEnBlk "^\s*\<endd\%[o]\>" syn match foxproEnBlk "^\s*\<for\>" syn match foxproEnBlk "^\s*\<endf\%[or]\>" syn match foxproEnBlk "^\s*\<next\>" syn match foxproEnBlk "^\s*\<if\>" syn match foxproEnBlk "^\s*\<else\>" syn match foxproEnBlk "^\s*\<endi\%[f]\>" syn match foxproEnBlk "^\s*\<prin\%[tjob]\>" syn match foxproEnBlk "^\s*\<endp\%[rintjob]\>" syn match foxproEnBlk "^\s*\<scan\>" syn match foxproEnBlk "^\s*\<ends\%[can]\>" syn match foxproEnBlk "^\s*\<text\>" syn match foxproEnBlk "^\s*\<endt\%[ext]\>" " System Variables syn keyword foxproSysVar _alignment _assist _beautify _box _calcmem _calcvalue syn keyword foxproSysVar _cliptext _curobj _dblclick _diarydate _dos _foxdoc syn keyword foxproSysVar _foxgraph _gengraph _genmenu _genpd _genscrn _genxtab syn keyword foxproSysVar _indent _lmargin _mac _mline _padvance _pageno _pbpage syn keyword foxproSysVar _pcolno _pcopies _pdriver _pdsetup _pecode _peject _pepage syn keyword foxproSysVar _plength _plineno _ploffset _ppitch _pquality _pretext syn keyword foxproSysVar _pscode _pspacing _pwait _rmargin _shell _spellchk syn keyword foxproSysVar _startup _tabs _tally _text _throttle _transport _unix syn keyword foxproSysVar _windows _wrap " Strings syn region foxproString start=+"+ end=+"+ oneline syn region foxproString start=+'+ end=+'+ oneline syn region foxproString start=+\[+ end=+\]+ oneline " Constants syn match foxproConst "\.t\." syn match foxproConst "\.f\." "integer number, or floating point number without a dot and with "f". syn match foxproNumber "\<[0-9]\+\>" "floating point number, with dot, optional exponent syn match foxproFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\>" "floating point number, starting with a dot, optional exponent syn match foxproFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>" "floating point number, without dot, with exponent syn match foxproFloat "\<[0-9]\+e[-+]\=[0-9]\+\>" syn match foxproComment "^\s*\*.*" syn match foxproComment "&&.*" "catch errors caused by wrong parenthesis syn region foxproParen transparent start='(' end=')' contains=ALLBUT,foxproParenErr syn match foxproParenErr ")" syn sync minlines=1 maxlines=3 " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_foxpro_syn_inits") if version < 508 let did_foxpro_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink foxproSpecial Special HiLink foxproAtSymbol Special HiLink foxproAtCmd Statement HiLink foxproPreProc PreProc HiLink foxproFunc Identifier HiLink foxproCmd Statement HiLink foxproEnBlk Type HiLink foxproSysVar String HiLink foxproString String HiLink foxproConst Constant HiLink foxproNumber Number HiLink foxproFloat Float HiLink foxproComment Comment HiLink foxproParenErr Error HiLink foxproCBConst PreProc HiLink foxproCBField Special HiLink foxproCBVar Identifier HiLink foxproCBWin Special HiLink foxproCBObject Identifier delcommand HiLink endif let b:current_syntax = "foxpro"
zyz2011-vim
runtime/syntax/foxpro.vim
Vim Script
gpl2
33,150
" Vim syntax file " Language: S-Lang " Maintainer: Jan Hlavacek <lahvak@math.ohio-state.edu> " Last Change: 980216 " 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") finish endif syn keyword slangStatement break return continue EXECUTE_ERROR_BLOCK syn match slangStatement "\<X_USER_BLOCK[0-4]\>" syn keyword slangLabel case syn keyword slangConditional !if if else switch syn keyword slangRepeat while for _for loop do forever syn keyword slangDefinition define typedef variable struct syn keyword slangOperator or and andelse orelse shr shl xor not syn keyword slangBlock EXIT_BLOCK ERROR_BLOCK syn match slangBlock "\<USER_BLOCK[0-4]\>" syn keyword slangConstant NULL syn keyword slangType Integer_Type Double_Type Complex_Type String_Type Struct_Type Ref_Type Null_Type Array_Type DataType_Type syn match slangOctal "\<0\d\+\>" contains=slangOctalError syn match slangOctalError "[89]\+" contained syn match slangHex "\<0[xX][0-9A-Fa-f]*\>" syn match slangDecimal "\<[1-9]\d*\>" syn match slangFloat "\<\d\+\." syn match slangFloat "\<\d\+\.\d\+\([Ee][-+]\=\d\+\)\=\>" syn match slangFloat "\<\d\+\.[Ee][-+]\=\d\+\>" syn match slangFloat "\<\d\+[Ee][-+]\=\d\+\>" syn match slangFloat "\.\d\+\([Ee][-+]\=\d\+\)\=\>" syn match slangImaginary "\.\d\+\([Ee][-+]\=\d*\)\=[ij]\>" syn match slangImaginary "\<\d\+\(\.\d*\)\=\([Ee][-+]\=\d\+\)\=[ij]\>" syn region slangString oneline start='"' end='"' skip='\\"' syn match slangCharacter "'[^\\]'" syn match slangCharacter "'\\.'" syn match slangCharacter "'\\[0-7]\{1,3}'" syn match slangCharacter "'\\d\d\{1,3}'" syn match slangCharacter "'\\x[0-7a-fA-F]\{1,2}'" syn match slangDelim "[][{};:,]" syn match slangOperator "[-%+/&*=<>|!~^@]" "catch errors caused by wrong parenthesis syn region slangParen matchgroup=slangDelim transparent start='(' end=')' contains=ALLBUT,slangParenError syn match slangParenError ")" syn match slangComment "%.*$" syn keyword slangOperator sizeof syn region slangPreCondit start="^\s*#\s*\(ifdef\>\|ifndef\>\|iftrue\>\|ifnfalse\>\|iffalse\>\|ifntrue\>\|if\$\|ifn\$\|\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=cComment,slangString,slangCharacter,slangNumber " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_slang_syntax_inits") if version < 508 let did_slang_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink slangDefinition Type HiLink slangBlock slangDefinition HiLink slangLabel Label HiLink slangConditional Conditional HiLink slangRepeat Repeat HiLink slangCharacter Character HiLink slangFloat Float HiLink slangImaginary Float HiLink slangDecimal slangNumber HiLink slangOctal slangNumber HiLink slangHex slangNumber HiLink slangNumber Number HiLink slangParenError Error HiLink slangOctalError Error HiLink slangOperator Operator HiLink slangStructure Structure HiLink slangInclude Include HiLink slangPreCondit PreCondit HiLink slangError Error HiLink slangStatement Statement HiLink slangType Type HiLink slangString String HiLink slangConstant Constant HiLink slangRangeArray slangConstant HiLink slangComment Comment HiLink slangSpecial SpecialChar HiLink slangTodo Todo HiLink slangDelim Delimiter delcommand HiLink endif let b:current_syntax = "slang" " vim: ts=8
zyz2011-vim
runtime/syntax/slang.vim
Vim Script
gpl2
3,638
" Vim syntax file " Language: fstab file " Maintaner: Radu Dineiu <radu.dineiu@gmail.com> " URL: http://ld.yi.org/vim/fstab.vim " Last Change: 2009 Feb 04 " Version: 0.93 " " Credits: " David Necas (Yeti) <yeti@physics.muni.cz> " Stefano Zacchiroli <zack@debian.org> " Georgi Georgiev <chutz@gg3.net> " James Vega <jamessan@debian.org> " Elias Probst <mail@eliasprobst.eu> " " Options: " let fstab_unknown_fs_errors = 1 " highlight unknown filesystems as errors if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " General syn cluster fsGeneralCluster contains=fsComment syn match fsComment /\s*#.*/ syn match fsOperator /[,=:#]/ " Device syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:\.-]\|^\w\{-}\ze\W\)/ contained syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts sysfs usbfs syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID syn keyword fsDeviceKeyword contained sshfs nextgroup=fsDeviceSshfs syn match fsDeviceKeyword contained /^[a-zA-Z0-9.\-]\+\ze:/ syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator syn match fsDeviceUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator syn match fsDeviceSshfs contained /#[_=[:alnum:]\.\/+-]\+@[a-z0-9._-]\+\a\{2}:[^ \t]\+/hs=s+1 contains=fsOperator " Mount Point syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError syn match fsMountPointError /\%([^ \ta-zA-Z0-9_\/#@\.-]\|\s\+\zs\w\{-}\ze\s\)/ contained syn keyword fsMountPointKeyword contained none swap " Type syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown syn match fsTypeUnknown /\s\+\zs\w\+/ contained syn keyword fsTypeKeyword contained adfs ados affs atfs audiofs auto autofs befs bfs cd9660 cfs cifs coda cramfs devfs devpts e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse hfs hpfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix msdos ncpfs nfs none ntfs null nwfs overlay ovlfs portal proc procfs ptyfs qnx4 reiserfs romfs shm smbfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs " Options " ------- " Options: General syn cluster fsOptionsCluster contains=fsOperator,fsOptionsGeneral,fsOptionsKeywords,fsTypeUnknown syn match fsOptionsNumber /\d\+/ syn match fsOptionsNumberOctal /[0-8]\+/ syn match fsOptionsString /[a-zA-Z0-9_-]\+/ syn keyword fsOptionsYesNo yes no syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck syn keyword fsOptionsSize 512 1024 2048 syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand nosuid nosymfollow nouser owner rbind rdonly remount ro rq rw suid suiddir supermount sw sync union update user users xx syn match fsOptionsGeneral /_netdev/ " Options: adfs syn match fsOptionsKeywords contained /\<\%([ug]id\|o\%(wn\|th\)mask\)=/ nextgroup=fsOptionsNumber " Options: affs syn match fsOptionsKeywords contained /\<\%(set[ug]id\|mode\|reserved\)=/ nextgroup=fsOptionsNumber syn match fsOptionsKeywords contained /\<\%(prefix\|volume\|root\)=/ nextgroup=fsOptionsString syn match fsOptionsKeywords contained /\<bs=/ nextgroup=fsOptionsSize syn keyword fsOptionsKeywords contained protect usemp verbose " Options: cd9660 syn keyword fsOptionsKeywords contained extatt gens norrip nostrictjoilet " Options: devpts " -- everything already defined " Options: ext2 syn match fsOptionsKeywords contained /\<check=*/ nextgroup=@fsOptionsCheckCluster syn match fsOptionsKeywords contained /\<errors=/ nextgroup=fsOptionsExt2Errors syn match fsOptionsKeywords contained /\<\%(res[gu]id\|sb\)=/ nextgroup=fsOptionsNumber syn keyword fsOptionsExt2Check contained none normal strict syn keyword fsOptionsExt2Errors contained continue panic syn match fsOptionsExt2Errors contained /\<remount-ro\>/ syn keyword fsOptionsKeywords contained acl bsddf minixdf debug grpid bsdgroups minixdf noacl nocheck nogrpid oldalloc orlov sysvgroups nouid32 nobh user_xattr nouser_xattr " Options: ext3 syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt3Journal syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt3Data syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber syn keyword fsOptionsExt3Journal contained update inum syn keyword fsOptionsExt3Data contained journal ordered writeback syn keyword fsOptionsKeywords contained noload user_xattr nouser_xattr acl noacl " Options: ext4 syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt4Journal syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt4Data syn match fsOptionsKeywords contained /\<barrier=/ nextgroup=fsOptionsExt4Barrier syn match fsOptionsKeywords contained /\<journal_dev=/ nextgroup=fsOptionsNumber syn match fsOptionsKeywords contained /\<resuid=/ nextgroup=fsOptionsNumber syn match fsOptionsKeywords contained /\<resgid=/ nextgroup=fsOptionsNumber syn match fsOptionsKeywords contained /\<sb=/ nextgroup=fsOptionsNumber syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber syn keyword fsOptionsExt4Journal contained update inum syn keyword fsOptionsExt4Data contained journal ordered writeback syn match fsOptionsExt4Barrier /[0-1]/ syn keyword fsOptionsKeywords contained noload extents orlov oldalloc user_xattr nouser_xattr acl noacl reservation noreservation bsddf minixdf check=none nocheck debug grpid nogroupid sysvgroups bsdgroups quota noquota grpquota usrquota bh nobh " Options: fat syn match fsOptionsKeywords contained /\<blocksize=/ nextgroup=fsOptionsSize syn match fsOptionsKeywords contained /\<\%([dfu]mask\|codepage\)=/ nextgroup=fsOptionsNumberOctal syn match fsOptionsKeywords contained /\%(cvf_\%(format\|option\)\|iocharset\)=/ nextgroup=fsOptionsString syn match fsOptionsKeywords contained /\<check=/ nextgroup=@fsOptionsCheckCluster syn match fsOptionsKeywords contained /\<conv=*/ nextgroup=fsOptionsConv syn match fsOptionsKeywords contained /\<fat=/ nextgroup=fsOptionsFatType syn match fsOptionsKeywords contained /\<dotsOK=/ nextgroup=fsOptionsYesNo syn keyword fsOptionsFatCheck contained r n s relaxed normal strict syn keyword fsOptionsConv contained b t a binary text auto syn keyword fsOptionsFatType contained 12 16 32 syn keyword fsOptionsKeywords contained quiet sys_immutable showexec dots nodots " Options: hfs syn match fsOptionsKeywords contained /\<\%(creator|type\)=/ nextgroup=fsOptionsString syn match fsOptionsKeywords contained /\<\%(dir\|file\|\)_umask=/ nextgroup=fsOptionsNumberOctal syn match fsOptionsKeywords contained /\<\%(session\|part\)=/ nextgroup=fsOptionsNumber " Options: ffs syn keyword fsOptionsKeyWords contained softdep " Options: hpfs syn match fsOptionsKeywords contained /\<case=/ nextgroup=fsOptionsHpfsCase syn keyword fsOptionsHpfsCase contained lower asis " Options: iso9660 syn match fsOptionsKeywords contained /\<map=/ nextgroup=fsOptionsIsoMap syn match fsOptionsKeywords contained /\<block=/ nextgroup=fsOptionsSize syn match fsOptionsKeywords contained /\<\%(session\|sbsector\)=/ nextgroup=fsOptionsNumber syn keyword fsOptionsIsoMap contained n o a normal off acorn syn keyword fsOptionsKeywords contained norock nojoilet unhide cruft syn keyword fsOptionsConv contained m mtext " Options: jfs syn keyword fsOptionsKeywords nointegrity integrity " Options: nfs syn match fsOptionsKeywords contained /\<\%(rsize\|wsize\|timeo\|retrans\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mounthost\|mountprog\|mountvers\|nfsprog\|nfsvers\|namelen\)=/ nextgroup=fsOptionsString syn keyword fsOptionsKeywords contained bg fg soft hard intr cto ac tcp udp lock nobg nofg nosoft nohard nointr noposix nocto noac notcp noudp nolock " Options: ntfs syn match fsOptionsKeywords contained /\<\%(posix=*\|uni_xlate=\)/ nextgroup=fsOptionsNumber syn keyword fsOptionsKeywords contained utf8 " Options: proc " -- everything already defined " Options: reiserfs syn match fsOptionsKeywords contained /\<hash=/ nextgroup=fsOptionsReiserHash syn match fsOptionsKeywords contained /\<resize=/ nextgroup=fsOptionsNumber syn keyword fsOptionsReiserHash contained rupasov tea r5 detect syn keyword fsOptionsKeywords contained hashed_relocation noborder nolog notail no_unhashed_relocation replayonly " Options: sshfs syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\|cache\)=/ nextgroup=fsOptionsYesNo syn match fsOptionsKeywords contained /\<\%(ControlMaster\|StrictHostKeyChecking\|VerifyHostKeyDNS\)=/ nextgroup=fsOptionsSshYesNoAsk syn match fsOptionsKeywords contained /\<\%(AddressFamily\|BindAddress\|Cipher\|Ciphers\|ControlPath\|DynamicForward\|EscapeChar\|GlobalKnownHostsFile\|HostKeyAlgorithms\|HostKeyAlias\|HostName\|IdentityFile\|KbdInteractiveDevices\|LocalForward\|LogLevel\|MACs\|PreferredAuthentications\|Protocol\|ProxyCommand\|RemoteForward\|RhostsAuthentication\|SendEnv\|SmartcardDevice\|User\|UserKnownHostsFile\|XAuthLocation\|comment\|workaround\|idmap\|ssh_command\|sftp_server\|fsname\)=/ nextgroup=fsOptionsString syn match fsOptionsKeywords contained /\<\%(CompressionLevel\|ConnectionAttempts\|ConnectTimeout\|NumberOfPasswordPrompts\|Port\|ServerAliveCountMax\|ServerAliveInterval\|cache_timeout\|cache_X_timeout\|ssh_protocol\|directport\|max_read\|umask\|uid\|gid\|entry_timeout\|negative_timeout\|attr_timeout\)=/ nextgroup=fsOptionsNumber syn keyword fsOptionsKeywords contained reconnect sshfs_sync no_readahead sshfs_debug transform_symlinks allow_other allow_root nonempty default_permissions large_read hard_remove use_ino readdir_ino direct_io kernel_cache syn keyword fsOptionsSshYesNoAsk contained yes no ask " Options: subfs syn match fsOptionsKeywords contained /\<fs=/ nextgroup=fsOptionsString syn keyword fsOptionsKeywords contained procuid " Options: swap syn match fsOptionsKeywords contained /\<pri=/ nextgroup=fsOptionsNumber " Options: tmpfs syn match fsOptionsKeywords contained /\<nr_\%(blocks\|inodes\)=/ nextgroup=fsOptionsNumber " Options: udf syn match fsOptionsKeywords contained /\<\%(anchor\|partition\|lastblock\|fileset\|rootdir\)=/ nextgroup=fsOptionsString syn keyword fsOptionsKeywords contained unhide undelete strict novrs " Options: ufs syn match fsOptionsKeywords contained /\<ufstype=/ nextgroup=fsOptionsUfsType syn match fsOptionsKeywords contained /\<onerror=/ nextgroup=fsOptionsUfsError syn keyword fsOptionsUfsType contained old hp 44bsd sun sunx86 nextstep openstep syn match fsOptionsUfsType contained /\<nextstep-cd\>/ syn keyword fsOptionsUfsError contained panic lock umount repair " Options: usbfs syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)\%(id\|gid\)=/ nextgroup=fsOptionsNumber syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)mode=/ nextgroup=fsOptionsNumberOctal " Options: vfat syn keyword fsOptionsKeywords contained nonumtail posix utf8 syn match fsOptionsKeywords contained /shortname=/ nextgroup=fsOptionsVfatShortname syn keyword fsOptionsVfatShortname contained lower win95 winnt mixed " Options: xfs syn match fsOptionsKeywords contained /\%(biosize\|logbufs\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime noquota norecovery osyncisdsync quota usrquota uqnoenforce grpquota gqnoenforce " Frequency / Pass No. syn cluster fsFreqPassCluster contains=fsFreqPassNumber,fsFreqPassError syn match fsFreqPassError /\s\+\zs\%(\D.*\|\S.*\|\d\+\s\+[^012]\)\ze/ contained syn match fsFreqPassNumber /\d\+\s\+[012]\s*/ contained " Groups syn match fsDevice /^\s*\zs.\{-1,}\s/me=e-1 nextgroup=fsMountPoint contains=@fsDeviceCluster,@fsGeneralCluster syn match fsMountPoint /\s\+.\{-}\s/me=e-1 nextgroup=fsType contains=@fsMountPointCluster,@fsGeneralCluster contained syn match fsType /\s\+.\{-}\s/me=e-1 nextgroup=fsOptions contains=@fsTypeCluster,@fsGeneralCluster contained syn match fsOptions /\s\+.\{-}\s/me=e-1 nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster contained " Whole line comments syn match fsCommentLine /^#.*$/ if version >= 508 || !exists("did_config_syntax_inits") if version < 508 let did_config_syntax_inits = 1 command! -nargs=+ HiLink hi link <args> else command! -nargs=+ HiLink hi def link <args> endif HiLink fsOperator Operator HiLink fsComment Comment HiLink fsCommentLine Comment HiLink fsTypeKeyword Type HiLink fsDeviceKeyword Identifier HiLink fsDeviceLabel String HiLink fsDeviceUUID String HiLink fsDeviceSshfs String HiLink fsFreqPassNumber Number if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1 HiLink fsTypeUnknown Error endif HiLink fsDeviceError Error HiLink fsMountPointError Error HiLink fsMountPointKeyword Keyword HiLink fsFreqPassError Error HiLink fsOptionsGeneral Type HiLink fsOptionsKeywords Keyword HiLink fsOptionsNumber Number HiLink fsOptionsNumberOctal Number HiLink fsOptionsString String HiLink fsOptionsSize Number HiLink fsOptionsExt2Check String HiLink fsOptionsExt2Errors String HiLink fsOptionsExt3Journal String HiLink fsOptionsExt3Data String HiLink fsOptionsExt4Journal String HiLink fsOptionsExt4Data String HiLink fsOptionsExt4Barrier Number HiLink fsOptionsFatCheck String HiLink fsOptionsConv String HiLink fsOptionsFatType Number HiLink fsOptionsYesNo String HiLink fsOptionsHpfsCase String HiLink fsOptionsIsoMap String HiLink fsOptionsReiserHash String HiLink fsOptionsSshYesNoAsk String HiLink fsOptionsUfsType String HiLink fsOptionsUfsError String HiLink fsOptionsVfatShortname String delcommand HiLink endif let b:current_syntax = "fstab" " vim: ts=8 ft=vim
zyz2011-vim
runtime/syntax/fstab.vim
Vim Script
gpl2
14,457
" Vim syntax file " Language: Falcon " Maintainer: Steven Oliver <oliver.steven@gmail.com> " Website: http://github.com/steveno/vim-files/blob/master/syntax/falcon.vim " Credits: Thanks the ruby.vim authors, I borrowed a lot! " ------------------------------------------------------------------------------- " GetLatestVimScripts: 2745 1 :AutoInstall: falcon.vim " When wanted, highlight the trailing whitespace. if exists("c_space_errors") if !exists("c_no_trail_space_error") syn match falconSpaceError "\s\+$" endif if !exists("c_no_tab_space_error") syn match falconSpaceError " \+\t"me=e-1 endif endif " Symbols syn match falconSymbol "\(;\|,\|\.\)" syn match falconSymbolOther "\(#\|@\)" display " Operators syn match falconOperator "\(+\|-\|\*\|/\|=\|<\|>\|\*\*\|!=\|\~=\)" syn match falconOperator "\(<=\|>=\|=>\|\.\.\|<<\|>>\|\"\)" " Clusters syn region falconSymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@falconStringSpecial fold syn case match " Keywords syn keyword falconKeyword all allp any anyp as attributes brigade cascade catch choice class const syn keyword falconKeyword continue def directive do list dropping enum eq eval exit export from function syn keyword falconKeyword give global has hasnt in init innerfunc lambda launch launch len List list syn keyword falconKeyword load notin object pass print printl provides raise return self sender static to syn keyword falconKeyword try xamp " Error Type Keywords syn keyword falconKeyword CloneError CodeError Error InterruprtedError IoError MathError syn keyword falconKeyword ParamError RangeError SyntaxError TraceStep TypeError " Todo syn keyword falconTodo DEBUG FIXME NOTE TODO XXX " Conditionals syn keyword falconConditional and case default else end if iff syn keyword falconConditional elif or not switch select syn match falconConditional "end\s\if" " Loops syn keyword falconRepeat break for loop forfirst forlast formiddle while " Booleans syn keyword falconBool true false " Constants syn keyword falconConst PI E nil " Comments syn match falconCommentSkip contained "^\s*\*\($\|\s\+\)" syn region falconComment start="/\*" end="\*/" contains=@falconCommentGroup,falconSpaceError,falconTodo syn region falconCommentL start="//" end="$" keepend contains=@falconCommentGroup,falconSpaceError,falconTodo syn match falconSharpBang "\%^#!.*" display syn sync ccomment falconComment " Numbers syn match falconNumbers transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=falconIntLiteral,falconFloatLiteral,falconHexadecimal,falconOctal syn match falconNumbersCom contained transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=falconIntLiteral,falconFloatLiteral,falconHexadecimal,falconOctal syn match falconHexadecimal contained "\<0x\x\+\>" syn match falconOctal contained "\<0\o\+\>" syn match falconIntLiteral contained "[+-]\<d\+\(\d\+\)\?\>" syn match falconFloatLiteral contained "[+-]\=\d\+\.\d*" syn match falconFloatLiteral contained "[+-]\=\d*\.\d*" " Includes syn keyword falconInclude load import " Expression Substitution and Backslash Notation syn match falconStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display syn match falconStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display syn region falconSymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=falconStringEscape fold " Normal String and Shell Command Output syn region falconString matchgroup=falconStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=falconStringEscape fold syn region falconString matchgroup=falconStringDelimiter start="'" end="'" skip="\\\\\|\\'" fold syn region falconString matchgroup=falconStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=falconStringEscape fold " Generalized Single Quoted String, Symbol and Array of Strings syn region falconString matchgroup=falconStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold syn region falconString matchgroup=falconStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=falconDelimEscape syn region falconString matchgroup=falconStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=falconDelimEscape syn region falconString matchgroup=falconStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=falconDelimEscape syn region falconString matchgroup=falconStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=falconDelimEscape syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]{" end="}" skip="\\\\\|\\}" fold contains=falconDelimEscape syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]<" end=">" skip="\\\\\|\\>" fold contains=falconDelimEscape syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]\[" end="\]" skip="\\\\\|\\\]" fold contains=falconDelimEscape syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s](" end=")" skip="\\\\\|\\)" fold contains=falconDelimEscape " Generalized Double Quoted String and Array of Strings and Shell Command Output syn region falconString matchgroup=falconStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=falconStringEscape fold syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=falconStringEscape fold syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=falconStringEscape,falconDelimEscape fold syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=falconStringEscape,falconDelimEscape fold syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=falconStringEscape,falconDelimEscape fold syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=falconStringEscape,falconDelimEscape fold syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<\z(\h\w*\)\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ contains=falconStringEscape fold keepend syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<"\z([^"]*\)"\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ contains=falconStringEscape fold keepend syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<'\z([^']*\)'\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ fold keepend syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<`\z([^`]*\)`\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ contains=falconStringEscape fold keepend syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-\z(\h\w*\)\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-"\z([^"]*\)"\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-'\z([^']*\)'\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ fold keepend syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-`\z([^`]*\)`\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend " Syntax Synchronizing syn sync minlines=10 maxlines=100 " Define the default highlighting if !exists("did_falcon_syn_inits") command -nargs=+ HiLink hi def link <args> HiLink falconKeyword Keyword HiLink falconCommentString String HiLink falconTodo Todo HiLink falconConditional Keyword HiLink falconRepeat Repeat HiLink falconcommentSkip Comment HiLink falconComment Comment HiLink falconCommentL Comment HiLink falconConst Constant HiLink falconOperator Operator HiLink falconSymbol Normal HiLink falconSpaceError Error HiLink falconHexadecimal Number HiLink falconOctal Number HiLink falconIntLiteral Number HiLink falconFloatLiteral Float HiLink falconStringEscape Special HiLink falconStringDelimiter Delimiter HiLink falconString String HiLink falconBool Constant HiLink falconSharpBang PreProc HiLink falconInclude Include HiLink falconSymbol Constant HiLink falconSymbolOther Delimiter delcommand HiLink endif let b:current_syntax = "falcon" " vim: set sw=4 sts=4 et tw=80 :
zyz2011-vim
runtime/syntax/falcon.vim
Vim Script
gpl2
9,009
" Vim syntax file " Language: Stored Procedures (STP) " Maintainer: Jeff Lanzarotta (jefflanzarotta@yahoo.com) " URL: http://lanzarotta.tripod.com/vim/syntax/stp.vim.zip " Last Change: March 05, 2002 " 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") finish endif syn case ignore " Specials. syn keyword stpSpecial null " Keywords. syn keyword stpKeyword begin break call case create deallocate dynamic syn keyword stpKeyword execute from function go grant syn keyword stpKeyword index insert into leave max min on output procedure syn keyword stpKeyword public result return returns scroll table to syn keyword stpKeyword when syn match stpKeyword "\<end\>" " Conditional. syn keyword stpConditional if else elseif then syn match stpConditional "\<end\s\+if\>" " Repeats. syn keyword stpRepeat for while loop syn match stpRepeat "\<end\s\+loop\>" " Operators. syn keyword stpOperator asc not and or desc group having in is any some all syn keyword stpOperator between exists like escape with union intersect minus syn keyword stpOperator out prior distinct sysdate " Statements. syn keyword stpStatement alter analyze as audit avg by close clustered comment syn keyword stpStatement commit continue count create cursor declare delete syn keyword stpStatement drop exec execute explain fetch from index insert syn keyword stpStatement into lock max min next noaudit nonclustered open syn keyword stpStatement order output print raiserror recompile rename revoke syn keyword stpStatement rollback savepoint select set sum transaction syn keyword stpStatement truncate unique update values where " Functions. syn keyword stpFunction abs acos ascii asin atan atn2 avg ceiling charindex syn keyword stpFunction charlength convert col_name col_length cos cot count syn keyword stpFunction curunreservedpgs datapgs datalength dateadd datediff syn keyword stpFunction datename datepart db_id db_name degree difference syn keyword stpFunction exp floor getdate hextoint host_id host_name index_col syn keyword stpFunction inttohex isnull lct_admin log log10 lower ltrim max syn keyword stpFunction min now object_id object_name patindex pi pos power syn keyword stpFunction proc_role radians rand replace replicate reserved_pgs syn keyword stpFunction reverse right rtrim rowcnt round show_role sign sin syn keyword stpFunction soundex space sqrt str stuff substr substring sum syn keyword stpFunction suser_id suser_name tan tsequal upper used_pgs user syn keyword stpFunction user_id user_name valid_name valid_user message " Types. syn keyword stpType binary bit char datetime decimal double float image syn keyword stpType int integer long money nchar numeric precision real syn keyword stpType smalldatetime smallint smallmoney text time tinyint syn keyword stpType timestamp varbinary varchar " Globals. syn match stpGlobals '@@char_convert' syn match stpGlobals '@@cient_csname' syn match stpGlobals '@@client_csid' syn match stpGlobals '@@connections' syn match stpGlobals '@@cpu_busy' syn match stpGlobals '@@error' syn match stpGlobals '@@identity' syn match stpGlobals '@@idle' syn match stpGlobals '@@io_busy' syn match stpGlobals '@@isolation' syn match stpGlobals '@@langid' syn match stpGlobals '@@language' syn match stpGlobals '@@max_connections' syn match stpGlobals '@@maxcharlen' syn match stpGlobals '@@ncharsize' syn match stpGlobals '@@nestlevel' syn match stpGlobals '@@pack_received' syn match stpGlobals '@@pack_sent' syn match stpGlobals '@@packet_errors' syn match stpGlobals '@@procid' syn match stpGlobals '@@rowcount' syn match stpGlobals '@@servername' syn match stpGlobals '@@spid' syn match stpGlobals '@@sqlstatus' syn match stpGlobals '@@testts' syn match stpGlobals '@@textcolid' syn match stpGlobals '@@textdbid' syn match stpGlobals '@@textobjid' syn match stpGlobals '@@textptr' syn match stpGlobals '@@textsize' syn match stpGlobals '@@thresh_hysteresis' syn match stpGlobals '@@timeticks' syn match stpGlobals '@@total_error' syn match stpGlobals '@@total_read' syn match stpGlobals '@@total_write' syn match stpGlobals '@@tranchained' syn match stpGlobals '@@trancount' syn match stpGlobals '@@transtate' syn match stpGlobals '@@version' " Todos. syn keyword stpTodo TODO FIXME XXX DEBUG NOTE " Strings and characters. syn match stpStringError "'.*$" syn match stpString "'\([^']\|''\)*'" " Numbers. syn match stpNumber "-\=\<\d*\.\=[0-9_]\>" " Comments. syn region stpComment start="/\*" end="\*/" contains=stpTodo syn match stpComment "--.*" contains=stpTodo syn sync ccomment stpComment " Parens. syn region stpParen transparent start='(' end=')' contains=ALLBUT,stpParenError syn match stpParenError ")" " Syntax Synchronizing. syn sync minlines=10 maxlines=100 " Define the default highlighting. " For version 5.x and earlier, only when not done already. " For version 5.8 and later, only when and item doesn't have highlighting yet. if version >= 508 || !exists("did_stp_syn_inits") if version < 508 let did_stp_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink stpConditional Conditional HiLink stpComment Comment HiLink stpKeyword Keyword HiLink stpNumber Number HiLink stpOperator Operator HiLink stpSpecial Special HiLink stpStatement Statement HiLink stpString String HiLink stpStringError Error HiLink stpType Type HiLink stpTodo Todo HiLink stpFunction Function HiLink stpGlobals Macro HiLink stpParen Normal HiLink stpParenError Error HiLink stpSQLKeyword Function HiLink stpRepeat Repeat delcommand HiLink endif let b:current_syntax = "stp" " vim ts=8 sw=2
zyz2011-vim
runtime/syntax/stp.vim
Vim Script
gpl2
5,789
" Vim syntax file " Language: TAK2, TAK3, TAK2000 thermal modeling compare file " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.cmp " URL: http://www.naglenet.org/vim/syntax/takcmp.vim " MAIN URL: http://www.naglenet.org/vim/ " 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") finish endif " Ignore case syn case ignore " " " Begin syntax definitions for compare files. " " Define keywords for TAK compare syn keyword takcmpUnit celsius fahrenheit " Define matches for TAK compare syn match takcmpTitle "Steady State Temperature Comparison" syn match takcmpLabel "Run Date:" syn match takcmpLabel "Run Time:" syn match takcmpLabel "Temp. File \d Units:" syn match takcmpLabel "Filename:" syn match takcmpLabel "Output Units:" syn match takcmpHeader "^ *Node\( *File \d\)* *Node Description" syn match takcmpDate "\d\d\/\d\d\/\d\d" syn match takcmpTime "\d\d:\d\d:\d\d" syn match takcmpInteger "^ *-\=\<[0-9]*\>" syn match takcmpFloat "-\=\<[0-9]*\.[0-9]*" " Define the default highlighting " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_takcmp_syntax_inits") if version < 508 let did_takcmp_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink takcmpTitle Type HiLink takcmpUnit PreProc HiLink takcmpLabel Statement HiLink takcmpHeader takHeader HiLink takcmpDate Identifier HiLink takcmpTime Identifier HiLink takcmpInteger Number HiLink takcmpFloat Special delcommand HiLink endif let b:current_syntax = "takcmp" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/takcmp.vim
Vim Script
gpl2
1,991
" Vim syntax file " Language: man.conf(5) - man configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword manconfTodo contained TODO FIXME XXX NOTE syn region manconfComment display oneline start='^#' end='$' \ contains=manconfTodo,@Spell if !has("win32") && $OSTYPE =~ 'bsd' syn match manconfBegin display '^' \ nextgroup=manconfKeyword,manconfSection, \ manconfComment skipwhite syn keyword manconfKeyword contained _build _crunch \ nextgroup=manconfExtCmd skipwhite syn keyword manconfKeyword contained _suffix \ nextgroup=manconfExt skipwhite syn keyword manconfKeyword contained _crunch syn keyword manconfKeyword contained _subdir _version _whatdb \ nextgroup=manconfPaths skipwhite syn match manconfExtCmd contained display '\.\S\+' \ nextgroup=manconfPaths skipwhite syn match manconfSection contained '[^#_ \t]\S*' \ nextgroup=manconfPaths skipwhite syn keyword manconfSection contained _default \ nextgroup=manconfPaths skipwhite syn match manconfPaths contained display '\S\+' \ nextgroup=manconfPaths skipwhite syn match manconfExt contained display '\.\S\+' hi def link manconfExtCmd Type hi def link manconfSection Identifier hi def link manconfPaths String else syn match manconfBegin display '^' \ nextgroup=manconfBoolean,manconfKeyword, \ manconfDecompress,manconfComment skipwhite syn keyword manconfBoolean contained FSSTND FHS NOAUTOPATH NOCACHE syn keyword manconfKeyword contained MANBIN \ nextgroup=manconfPath skipwhite syn keyword manconfKeyword contained MANPATH MANPATH_MAP \ nextgroup=manconfFirstPath skipwhite syn keyword manconfKeyword contained APROPOS WHATIS TROFF NROFF JNROFF EQN \ NEQN JNEQN TBL COL REFER PIC VGRIND GRAP \ PAGER BROWSER HTMLPAGER CMP CAT COMPRESS \ DECOMPRESS MANDEFOPTIONS \ nextgroup=manconfCommand skipwhite syn keyword manconfKeyword contained COMPRESS_EXT \ nextgroup=manconfExt skipwhite syn keyword manconfKeyword contained MANSECT \ nextgroup=manconfManSect skipwhite syn match manconfPath contained display '\S\+' syn match manconfFirstPath contained display '\S\+' \ nextgroup=manconfSecondPath skipwhite syn match manconfSecondPath contained display '\S\+' syn match manconfCommand contained display '\%(/[^/ \t]\+\)\+' \ nextgroup=manconfCommandOpt skipwhite syn match manconfCommandOpt contained display '\S\+' \ nextgroup=manconfCommandOpt skipwhite syn match manconfExt contained display '\.\S\+' syn match manconfManSect contained '[^:]\+' nextgroup=manconfManSectSep syn match manconfManSectSep contained ':' nextgroup=manconfManSect syn match manconfDecompress contained '\.\S\+' \ nextgroup=manconfCommand skipwhite hi def link manconfBoolean Boolean hi def link manconfPath String hi def link manconfFirstPath manconfPath hi def link manconfSecondPath manconfPath hi def link manconfCommand String hi def link manconfCommandOpt Special hi def link manconfManSect Identifier hi def link manconfManSectSep Delimiter hi def link manconfDecompress Type endif hi def link manconfTodo Todo hi def link manconfComment Comment hi def link manconfKeyword Keyword hi def link manconfExt Type let b:current_syntax = "manconf" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/manconf.vim
Vim Script
gpl2
4,332
" Vim syntax file " Language: Hercules " Maintainer: Dana Edwards <Dana_Edwards@avanticorp.com> " Extensions: *.vc,*.ev,*.rs " Last change: Nov. 9, 2001 " Comment: Hercules physical IC design verification software ensures " that an IC's physical design matches its logical design and " satisfies manufacturing rules. " 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") finish endif " Ignore case syn case ignore " Hercules runset sections syn keyword herculesType header assign_property alias assign syn keyword herculesType options preprocess_options syn keyword herculesType explode_options technology_options syn keyword herculesType drc_options database_options syn keyword herculesType text_options lpe_options evaccess_options syn keyword herculesType check_point compare_group environment syn keyword herculesType grid_check include layer_stats load_group syn keyword herculesType restart run_only self_intersect set snap syn keyword herculesType system variable waiver " Hercules commands syn keyword herculesStatement attach_property boolean cell_extent syn keyword herculesStatement common_hierarchy connection_points syn keyword herculesStatement copy data_filter alternate delete syn keyword herculesStatement explode explode_all fill_pattern find_net syn keyword herculesStatement flatten syn keyword herculesStatement level negate polygon_features push syn keyword herculesStatement rectangles relocate remove_overlap reverse select syn keyword herculesStatement select_cell select_contains select_edge select_net size syn keyword herculesStatement text_polygon text_property vertex area cut syn keyword herculesStatement density enclose external inside_edge syn keyword herculesStatement internal notch vectorize center_to_center syn keyword herculesStatement length mask_align moscheck rescheck syn keyword herculesStatement analysis buildsub init_lpe_db capacitor syn keyword herculesStatement device gendev nmos pmos diode npn pnp syn keyword herculesStatement resistor set_param save_property syn keyword herculesStatement connect disconnect text text_boolean syn keyword herculesStatement replace_text create_ports label graphics syn keyword herculesStatement save_netlist_database lpe_stats netlist syn keyword herculesStatement spice graphics_property graphics_netlist syn keyword herculesStatement write_milkyway multi_rule_enclose syn keyword herculesStatement if error_property equate compare syn keyword herculesStatement antenna_fix c_thru dev_connect_check syn keyword herculesStatement dev_net_count device_count net_filter syn keyword herculesStatement net_path_check ratio process_text_opens " Hercules keywords syn keyword herculesStatement black_box_file block compare_dir equivalence syn keyword herculesStatement format gdsin_dir group_dir group_dir_usage syn keyword herculesStatement inlib layout_path outlib output_format syn keyword herculesStatement output_layout_path schematic schematic_format syn keyword herculesStatement scheme_file output_block else syn keyword herculesStatement and or not xor andoverlap inside outside by to syn keyword herculesStatement with connected connected_all texted_with texted syn keyword herculesStatement by_property cutting edge_touch enclosing inside syn keyword herculesStatement inside_hole interact touching vertex " Hercules comments syn region herculesComment start="/\*" skip="/\*" end="\*/" contains=herculesTodo syn match herculesComment "//.*" contains=herculesTodo " Preprocessor directives syn match herculesPreProc "^#.*" syn match herculesPreProc "^@.*" syn match herculesPreProc "macros" " Hercules COMMENT option syn match herculesCmdCmnt "comment.*=.*" " Spacings, Resolutions, Ranges, Ratios, etc. syn match herculesNumber "-\=\<[0-9]\+L\=\>\|0[xX][0-9]\+\>" " Parenthesis sanity checker syn region herculesZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,herculesError,herculesBraceError,herculesCurlyError syn region herculesZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,herculesError,herculesBraceError,herculesParenError syn region herculesZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,herculesError,herculesCurlyError,herculesParenError syn match herculesError "[)\]}]" syn match herculesBraceError "[)}]" contained syn match herculesCurlyError "[)\]]" contained syn match herculesParenError "[\]}]" contained " Hercules output format "syn match herculesOutput "([0-9].*)" "syn match herculesOutput "([0-9].*\;.*)" syn match herculesOutput "perm\s*=.*(.*)" syn match herculesOutput "temp\s*=\s*" syn match herculesOutput "error\s*=\s*(.*)" "Modify the following as needed. The trade-off is performance versus functionality. syn sync lines=100 " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_hercules_syntax_inits") if version < 508 let did_hercules_syntax_inits = 1 " Default methods for highlighting. command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink herculesStatement Statement HiLink herculesType Type HiLink herculesComment Comment HiLink herculesPreProc PreProc HiLink herculesTodo Todo HiLink herculesOutput Include HiLink herculesCmdCmnt Identifier HiLink herculesNumber Number HiLink herculesBraceError herculesError HiLink herculesCurlyError herculesError HiLink herculesParenError herculesError HiLink herculesError Error delcommand HiLink endif let b:current_syntax = "hercules" " vim: ts=8
zyz2011-vim
runtime/syntax/hercules.vim
Vim Script
gpl2
6,150
" Vim syntax file " Language: FlexWiki, http://www.flexwiki.com/ " Maintainer: George V. Reilly <george@reilly.org> " Home: http://www.georgevreilly.com/vim/flexwiki/ " Other Home: http://www.vim.org/scripts/script.php?script_id=1529 " Author: George V. Reilly " Filenames: *.wiki " Last Change: Wed Apr 26 11:00 PM 2006 P " Version: 0.3 " Note: The horrible regexps were reverse-engineered from " FlexWikiCore\EngineSource\Formatter.cs, with help from the Regex Analyzer " in The Regulator, http://regulator.sourceforge.net/ .NET uses Perl-style " regexes, which use a different syntax than Vim (fewer \s). " The primary test case is FlexWiki\FormattingRules.wiki " Quit if syntax file is already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " A WikiWord (unqualifiedWikiName) syntax match flexwikiWord /\%(_\?\([A-Z]\{2,}[a-z0-9]\+[A-Za-z0-9]*\)\|\([A-Z][a-z0-9]\+[A-Za-z0-9]*[A-Z]\+[A-Za-z0-9]*\)\)/ " A [bracketed wiki word] syntax match flexwikiWord /\[[[:alnum:]\s]\+\]/ " text: "this is a link (optional tooltip)":http://www.microsoft.com " TODO: check URL syntax against RFC syntax match flexwikiLink `\("[^"(]\+\((\([^)]\+\))\)\?":\)\?\(https\?\|ftp\|gopher\|telnet\|file\|notes\|ms-help\):\(\(\(//\)\|\(\\\\\)\)\+[A-Za-z0-9:#@%/;$~_?+-=.&\-\\\\]*\)` " text: *strong* syntax match flexwikiBold /\(^\|\W\)\zs\*\([^ ].\{-}\)\*/ " '''bold''' syntax match flexwikiBold /'''\([^'].\{-}\)'''/ " text: _emphasis_ syntax match flexwikiItalic /\(^\|\W\)\zs_\([^ ].\{-}\)_/ " ''italic'' syntax match flexwikiItalic /''\([^'].\{-}\)''/ " ``deemphasis`` syntax match flexwikiDeEmphasis /``\([^`].\{-}\)``/ " text: @code@ syntax match flexwikiCode /\(^\|\s\|(\|\[\)\zs@\([^@]\+\)@/ " text: -deleted text- syntax match flexwikiDelText /\(^\|\s\+\)\zs-\([^ <a ]\|[^ <img ]\|[^ -].*\)-/ " text: +inserted text+ syntax match flexwikiInsText /\(^\|\W\)\zs+\([^ ].\{-}\)+/ " text: ^superscript^ syntax match flexwikiSuperScript /\(^\|\W\)\zs^\([^ ].\{-}\)^/ " text: ~subscript~ syntax match flexwikiSubScript /\(^\|\W\)\zs\~\([^ ].\{-}\)\~/ " text: ??citation?? syntax match flexwikiCitation /\(^\|\W\)\zs??\([^ ].\{-}\)??/ " Emoticons: must come after the Textilisms, as later rules take precedence " over earlier ones. This match is an approximation for the ~70 distinct " patterns that FlexWiki knows. syntax match flexwikiEmoticons /\((.)\|:[()|$@]\|:-[DOPS()\]|$@]\|;)\|:'(\)/ " Aggregate all the regular text highlighting into flexwikiText syntax cluster flexwikiText contains=flexwikiItalic,flexwikiBold,flexwikiCode,flexwikiDeEmphasis,flexwikiDelText,flexwikiInsText,flexwikiSuperScript,flexwikiSubScript,flexwikiCitation,flexwikiLink,flexwikiWord,flexwikiEmoticons " single-line WikiPropertys syntax match flexwikiSingleLineProperty /^:\?[A-Z_][_a-zA-Z0-9]\+:/ " TODO: multi-line WikiPropertys " Header levels, 1-6 syntax match flexwikiH1 /^!.*$/ syntax match flexwikiH2 /^!!.*$/ syntax match flexwikiH3 /^!!!.*$/ syntax match flexwikiH4 /^!!!!.*$/ syntax match flexwikiH5 /^!!!!!.*$/ syntax match flexwikiH6 /^!!!!!!.*$/ " <hr>, horizontal rule syntax match flexwikiHR /^----.*$/ " Formatting can be turned off by ""enclosing it in pairs of double quotes"" syntax match flexwikiEscape /"".\{-}""/ " Tables. Each line starts and ends with '||'; each cell is separated by '||' syntax match flexwikiTable /||/ " Bulleted list items start with one or tabs, followed by whitespace, then '*' " Numeric list items start with one or tabs, followed by whitespace, then '1.' " Eight spaces at the beginning of the line is equivalent to the leading tab. syntax match flexwikiList /^\(\t\| \{8}\)\s*\(\*\|1\.\).*$/ contains=@flexwikiText " Treat all other lines that start with spaces as PRE-formatted text. syntax match flexwikiPre /^[ \t]\+[^ \t*1].*$/ " Link FlexWiki syntax items to colors hi def link flexwikiH1 Title hi def link flexwikiH2 flexwikiH1 hi def link flexwikiH3 flexwikiH2 hi def link flexwikiH4 flexwikiH3 hi def link flexwikiH5 flexwikiH4 hi def link flexwikiH6 flexwikiH5 hi def link flexwikiHR flexwikiH6 hi def flexwikiBold term=bold cterm=bold gui=bold hi def flexwikiItalic term=italic cterm=italic gui=italic hi def link flexwikiCode Statement hi def link flexwikiWord Underlined hi def link flexwikiEscape Todo hi def link flexwikiPre PreProc hi def link flexwikiLink Underlined hi def link flexwikiList Type hi def link flexwikiTable Type hi def link flexwikiEmoticons Constant hi def link flexwikiDelText Comment hi def link flexwikiDeEmphasis Comment hi def link flexwikiInsText Constant hi def link flexwikiSuperScript Constant hi def link flexwikiSubScript Constant hi def link flexwikiCitation Constant hi def link flexwikiSingleLineProperty Identifier let b:current_syntax="FlexWiki" " vim:tw=0:
zyz2011-vim
runtime/syntax/flexwiki.vim
Vim Script
gpl2
5,468
" Vim syntax file " Language: po (gettext) " Maintainer: Dwayne Bailey <dwayne@translate.org.za> " Last Change: 2012 Apr 30 " Contributors: Dwayne Bailey (Most advanced syntax highlighting) " Leonardo Fontenelle (Spell checking) " Nam SungHyun <namsh@kldp.org> (Original maintainer) " 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") finish endif let s:keepcpo= &cpo set cpo&vim syn sync minlines=10 " Identifiers syn match poStatementMsgCTxt "^msgctxt" syn match poStatementMsgidplural "^msgid_plural" contained syn match poPluralCaseN "[0-9]" contained syn match poStatementMsgstr "^msgstr\(\[[0-9]\]\)" contains=poPluralCaseN " Simple HTML and XML highlighting syn match poHtml "<\_[^<>]\+>" contains=poHtmlTranslatables,poLineBreak syn match poHtmlNot +"<[^<]\+>"+ms=s+1,me=e-1 syn region poHtmlTranslatables start=+\(abbr\|alt\|content\|summary\|standby\|title\)=\\"+ms=e-1 end=+\\"+ contained contains=@Spell syn match poLineBreak +"\n"+ contained " Translation blocks syn region poMsgCTxt matchgroup=poStatementMsgCTxt start=+^msgctxt "+rs=e-1 matchgroup=poStringCTxt end=+^msgid "+me=s-1 contains=poStringCTxt syn region poMsgID matchgroup=poStatementMsgid start=+^msgid "+rs=e-1 matchgroup=poStringID end=+^msgstr\(\|\[[\]0\[]\]\) "+me=s-1 contains=poStringID,poStatementMsgidplural,poStatementMsgid syn region poMsgSTR matchgroup=poStatementMsgstr start=+^msgstr\(\|\[[\]0\[]\]\) "+rs=e-1 matchgroup=poStringSTR end=+\n\n+me=s-1 contains=poStringSTR,poStatementMsgstr syn region poStringCTxt start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region poStringID start=+"+ skip=+\\\\\|\\"+ end=+"+ contained \ contains=poSpecial,poFormat,poCommentKDE,poPluralKDE,poKDEdesktopFile,poHtml,poAcceleratorId,poHtmlNot,poVariable syn region poStringSTR start=+"+ skip=+\\\\\|\\"+ end=+"+ contained \ contains=@Spell,poSpecial,poFormat,poHeaderItem,poCommentKDEError,poHeaderUndefined,poPluralKDEError,poMsguniqError,poKDEdesktopFile,poHtml,poAcceleratorStr,poHtmlNot,poVariable " Header and Copyright syn match poHeaderItem "\(Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Creation-Date\|PO-Revision-Date\|Last-Translator\|Language-Team\|Language\|MIME-Version\|Content-Type\|Content-Transfer-Encoding\|Plural-Forms\|X-Generator\): " contained syn match poHeaderUndefined "\(PACKAGE VERSION\|YEAR-MO-DA HO:MI+ZONE\|FULL NAME <EMAIL@ADDRESS>\|LANGUAGE <LL@li.org>\|CHARSET\|ENCODING\|INTEGER\|EXPRESSION\)" contained syn match poCopyrightUnset "SOME DESCRIPTIVE TITLE\|FIRST AUTHOR <EMAIL@ADDRESS>, YEAR\|Copyright (C) YEAR Free Software Foundation, Inc\|YEAR THE PACKAGE\'S COPYRIGHT HOLDER\|PACKAGE" contained " Translation comment block including: translator comment, automatic coments, flags and locations syn match poComment "^#.*$" syn keyword poFlagFuzzy fuzzy contained syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset syn match poCommentAutomatic "^#\..*$" syn match poCommentSources "^#:.*$" syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy " Translations (also includes header fields as they appear in a translation msgstr) syn region poCommentKDE start=+"_: +ms=s+1 end="\\n" end="\"\n^msgstr"me=s-1 contained syn region poCommentKDEError start=+"\(\|\s\+\)_:+ms=s+1 end="\\n" end=+"\n\n+me=s-1 contained syn match poPluralKDE +"_n: +ms=s+1 contained syn region poPluralKDEError start=+"\(\|\s\+\)_n:+ms=s+1 end="\"\n\n"me=s-1 contained syn match poSpecial contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" syn match poFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained syn match poFormat "%%" contained " msguniq and msgcat conflicts syn region poMsguniqError matchgroup=poMsguniqErrorMarkers start="#-#-#-#-#" end='#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)-\("\n"\|\)#\("\n"\|\)\\n' contained " Obsolete messages syn match poObsolete "^#\~.*$" " KDE Name= handling syn match poKDEdesktopFile "\"\(Name\|Comment\|GenericName\|Description\|Keywords\|About\)="ms=s+1,me=e-1 " Accelerator keys - this messes up if the preceding or following char is a multibyte unicode char syn match poAcceleratorId contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 syn match poAcceleratorStr contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 contains=@Spell " Variables simple syn match poVariable contained "%\d" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_po_syn_inits") if version < 508 let did_po_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink poCommentSources PreProc HiLink poComment Comment HiLink poCommentAutomatic Comment HiLink poCommentTranslator Comment HiLink poCommentFlags Special HiLink poCopyrightUnset Todo HiLink poFlagFuzzy Todo HiLink poObsolete Comment HiLink poStatementMsgid Statement HiLink poStatementMsgstr Statement HiLink poStatementMsgidplural Statement HiLink poStatementMsgCTxt Statement HiLink poPluralCaseN Constant HiLink poStringCTxt Comment HiLink poStringID String HiLink poStringSTR String HiLink poCommentKDE Comment HiLink poCommentKDEError Error HiLink poPluralKDE Comment HiLink poPluralKDEError Error HiLink poHeaderItem Identifier HiLink poHeaderUndefined Todo HiLink poKDEdesktopFile Identifier HiLink poHtml Identifier HiLink poHtmlNot String HiLink poHtmlTranslatables String HiLink poLineBreak String HiLink poFormat poSpecial HiLink poSpecial Special HiLink poAcceleratorId Special HiLink poAcceleratorStr Special HiLink poVariable Special HiLink poMsguniqError Special HiLink poMsguniqErrorMarkers Comment delcommand HiLink endif let b:current_syntax = "po" let &cpo = s:keepcpo unlet s:keepcpo " vim:set ts=8 sts=2 sw=2 noet:
zyz2011-vim
runtime/syntax/po.vim
Vim Script
gpl2
6,363
" Vim syntax file " Language: SKILL for Diva " Maintainer: Toby Schaffer <jtschaff@eos.ncsu.edu> " Last Change: 2001 May 09 " Comments: SKILL is a Lisp-like programming language for use in EDA " tools from Cadence Design Systems. It allows you to have " a programming environment within the Cadence environment " that gives you access to the complete tool set and design " database. These items are for Diva verification rules decks. " Don't remove any old syntax stuff hanging around! We need stuff " from skill.vim. if !exists("did_skill_syntax_inits") if version < 600 so <sfile>:p:h/skill.vim else runtime! syntax/skill.vim endif endif syn keyword divaDRCKeywords area enc notch ovlp sep width syn keyword divaDRCKeywords app diffNet length lengtha lengthb syn keyword divaDRCKeywords notParallel only_perp opposite parallel syn keyword divaDRCKeywords sameNet shielded with_perp syn keyword divaDRCKeywords edge edgea edgeb fig figa figb syn keyword divaDRCKeywords normalGrow squareGrow message raw syn keyword divaMeasKeywords perimeter length bends_all bends_full syn keyword divaMeasKeywords bends_part corners_all corners_full syn keyword divaMeasKeywords corners_part angles_all angles_full syn keyword divaMeasKeywords angles_part fig_count butting coincident syn keyword divaMeasKeywords over not_over outside inside enclosing syn keyword divaMeasKeywords figure one_net two_net three_net grounded syn keyword divaMeasKeywords polarized limit keep ignore syn match divaCtrlFunctions "(ivIf\>"hs=s+1 syn match divaCtrlFunctions "\<ivIf("he=e-1 syn match divaCtrlFunctions "(switch\>"hs=s+1 syn match divaCtrlFunctions "\<switch("he=e-1 syn match divaCtrlFunctions "(and\>"hs=s+1 syn match divaCtrlFunctions "\<and("he=e-1 syn match divaCtrlFunctions "(or\>"hs=s+1 syn match divaCtrlFunctions "\<or("he=e-1 syn match divaCtrlFunctions "(null\>"hs=s+1 syn match divaCtrlFunctions "\<null("he=e-1 syn match divaExtFunctions "(save\(Interconnect\|Property\|Parameter\|Recognition\)\>"hs=s+1 syn match divaExtFunctions "\<save\(Interconnect\|Property\|Parameter\|Recognition\)("he=e-1 syn match divaExtFunctions "(\(save\|measure\|attach\|multiLevel\|calculate\)Parasitic\>"hs=s+1 syn match divaExtFunctions "\<\(save\|measure\|attach\|multiLevel\|calculate\)Parasitic("he=e-1 syn match divaExtFunctions "(\(calculate\|measure\)Parameter\>"hs=s+1 syn match divaExtFunctions "\<\(calculate\|measure\)Parameter("he=e-1 syn match divaExtFunctions "(measure\(Resistance\|Fringe\)\>"hs=s+1 syn match divaExtFunctions "\<measure\(Resistance\|Fringe\)("he=e-1 syn match divaExtFunctions "(extract\(Device\|MOS\)\>"hs=s+1 syn match divaExtFunctions "\<extract\(Device\|MOS\)("he=e-1 syn match divaDRCFunctions "(checkAllLayers\>"hs=s+1 syn match divaDRCFunctions "\<checkAllLayers("he=e-1 syn match divaDRCFunctions "(checkLayer\>"hs=s+1 syn match divaDRCFunctions "\<checkLayer("he=e-1 syn match divaDRCFunctions "(drc\>"hs=s+1 syn match divaDRCFunctions "\<drc("he=e-1 syn match divaDRCFunctions "(drcAntenna\>"hs=s+1 syn match divaDRCFunctions "\<drcAntenna("he=e-1 syn match divaFunctions "(\(drcExtract\|lvs\)Rules\>"hs=s+1 syn match divaFunctions "\<\(drcExtract\|lvs\)Rules("he=e-1 syn match divaLayerFunctions "(saveDerived\>"hs=s+1 syn match divaLayerFunctions "\<saveDerived("he=e-1 syn match divaLayerFunctions "(copyGraphics\>"hs=s+1 syn match divaLayerFunctions "\<copyGraphics("he=e-1 syn match divaChkFunctions "(dubiousData\>"hs=s+1 syn match divaChkFunctions "\<dubiousData("he=e-1 syn match divaChkFunctions "(offGrid\>"hs=s+1 syn match divaChkFunctions "\<offGrid("he=e-1 syn match divaLVSFunctions "(compareDeviceProperty\>"hs=s+1 syn match divaLVSFunctions "\<compareDeviceProperty("he=e-1 syn match divaLVSFunctions "(ignoreTerminal\>"hs=s+1 syn match divaLVSFunctions "\<ignoreTerminal("he=e-1 syn match divaLVSFunctions "(parameterMatchType\>"hs=s+1 syn match divaLVSFunctions "\<parameterMatchType("he=e-1 syn match divaLVSFunctions "(\(permute\|prune\|remove\)Device\>"hs=s+1 syn match divaLVSFunctions "\<\(permute\|prune\|remove\)Device("he=e-1 syn match divaGeomFunctions "(geom\u\a\+\(45\|90\)\=\>"hs=s+1 syn match divaGeomFunctions "\<geom\u\a\+\(45\|90\)\=("he=e-1 " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_diva_syntax_inits") if version < 508 let did_diva_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink divaDRCKeywords Statement HiLink divaMeasKeywords Statement HiLink divaCtrlFunctions Conditional HiLink divaExtFunctions Function HiLink divaDRCFunctions Function HiLink divaFunctions Function HiLink divaLayerFunctions Function HiLink divaChkFunctions Function HiLink divaLVSFunctions Function HiLink divaGeomFunctions Function delcommand HiLink endif let b:current_syntax = "diva" " vim:ts=4
zyz2011-vim
runtime/syntax/diva.vim
Vim Script
gpl2
5,071
" Vim syntax file " Language: Clean " Author: Pieter van Engelen <pietere@sci.kun.nl> " Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl> " Last Change: 2011 Dec 25 by Thilo Six " 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") finish endif let s:cpo_save = &cpo set cpo&vim " Some Clean-keywords syn keyword cleanConditional if case syn keyword cleanLabel let! with where in of syn keyword cleanInclude from import syn keyword cleanSpecial Start syn keyword cleanKeyword infixl infixr infix syn keyword cleanBasicType Int Real Char Bool String syn keyword cleanSpecialType World ProcId Void Files File syn keyword cleanModuleSystem module implementation definition system syn keyword cleanTypeClass class instance export " To do some Denotation Highlighting syn keyword cleanBoolDenot True False syn region cleanStringDenot start=+"+ end=+"+ syn match cleanCharDenot "'.'" syn match cleanCharsDenot "'[^'\\]*\(\\.[^'\\]\)*'" contained syn match cleanIntegerDenot "[+-~]\=\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>" syn match cleanRealDenot "[+-~]\=\<\d\+\.\d+\(E[+-~]\=\d+\)\=" " To highlight the use of lists, tuples and arrays syn region cleanList start="\[" end="\]" contains=ALL syn region cleanRecord start="{" end="}" contains=ALL syn region cleanArray start="{:" end=":}" contains=ALL syn match cleanTuple "([^=]*,[^=]*)" contains=ALL " To do some Comment Highlighting syn region cleanComment start="/\*" end="\*/" contains=cleanComment syn match cleanComment "//.*" " Now for some useful typedefinitionrecognition syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)[ \t]*\(infix[lr]\=\)\=[ \t]*\d\=[ \t]*::.*->.*" contains=cleanSpecial " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_clean_syntax_init") if version < 508 let did_clean_syntax_init = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif " Comments HiLink cleanComment Comment " Constants and denotations HiLink cleanCharsDenot String HiLink cleanStringDenot String HiLink cleanCharDenot Character HiLink cleanIntegerDenot Number HiLink cleanBoolDenot Boolean HiLink cleanRealDenot Float " Identifiers " Statements HiLink cleanTypeClass Keyword HiLink cleanConditional Conditional HiLink cleanLabel Label HiLink cleanKeyword Keyword " Generic Preprocessing HiLink cleanInclude Include HiLink cleanModuleSystem PreProc " Type HiLink cleanBasicType Type HiLink cleanSpecialType Type HiLink cleanFuncTypeDef Typedef " Special HiLink cleanSpecial Special HiLink cleanList Special HiLink cleanArray Special HiLink cleanRecord Special HiLink cleanTuple Special " Error " Todo delcommand HiLink endif let b:current_syntax = "clean" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=4
zyz2011-vim
runtime/syntax/clean.vim
Vim Script
gpl2
3,163
" Vim syntax file " Language: services(5) - Internet network services list " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match servicesBegin display '^' \ nextgroup=servicesName,servicesComment syn match servicesName contained display '[[:graph:]]\+' \ nextgroup=servicesPort skipwhite syn match servicesPort contained display '\d\+' \ nextgroup=servicesPPDiv,servicesPPDivDepr \ skipwhite syn match servicesPPDiv contained display '/' \ nextgroup=servicesProtocol skipwhite syn match servicesPPDivDepr contained display ',' \ nextgroup=servicesProtocol skipwhite syn match servicesProtocol contained display '\S\+' \ nextgroup=servicesAliases,servicesComment \ skipwhite syn match servicesAliases contained display '\S\+' \ nextgroup=servicesAliases,servicesComment \ skipwhite syn keyword servicesTodo contained TODO FIXME XXX NOTE syn region servicesComment display oneline start='#' end='$' \ contains=servicesTodo,@Spell hi def link servicesTodo Todo hi def link servicesComment Comment hi def link servicesName Identifier hi def link servicesPort Number hi def link servicesPPDiv Delimiter hi def link servicesPPDivDepr Error hi def link servicesProtocol Type hi def link servicesAliases Macro let b:current_syntax = "services" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/services.vim
Vim Script
gpl2
1,811
" Vim syntax file " Language: XML " Maintainer: Johannes Zellner <johannes@zellner.org> " Author and previous maintainer: " Paul Siegmann <pauls@euronet.nl> " Last Change: 2009-07-13 21:26:55 " Filenames: *.xml " $Id: xml.vim,v 1.3 2006/04/11 21:32:00 vimboss Exp $ " CONFIGURATION: " syntax folding can be turned on by " " let g:xml_syntax_folding = 1 " " before the syntax file gets loaded (e.g. in ~/.vimrc). " This might slow down syntax highlighting significantly, " especially for large files. " " CREDITS: " The original version was derived by Paul Siegmann from " Claudio Fleiner's html.vim. " " REFERENCES: " [1] http://www.w3.org/TR/2000/REC-xml-20001006 " [2] http://www.w3.org/XML/1998/06/xmlspec-report-19980910.htm " " as <hirauchi@kiwi.ne.jp> pointed out according to reference [1] " " 2.3 Common Syntactic Constructs " [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender " [5] Name ::= (Letter | '_' | ':') (NameChar)* " " NOTE: " 1) empty tag delimiters "/>" inside attribute values (strings) " confuse syntax highlighting. " 2) for large files, folding can be pretty slow, especially when " loading a file the first time and viewoptions contains 'folds' " so that folds of previous sessions are applied. " Don't use 'foldmethod=syntax' in this case. " Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif let s:xml_cpo_save = &cpo set cpo&vim syn case match " mark illegal characters syn match xmlError "[<&]" " strings (inside tags) aka VALUES " " EXAMPLE: " " <tag foo.attribute = "value"> " ^^^^^^^ syn region xmlString contained start=+"+ end=+"+ contains=xmlEntity,@Spell display syn region xmlString contained start=+'+ end=+'+ contains=xmlEntity,@Spell display " punctuation (within attributes) e.g. <tag xml:foo.attribute ...> " ^ ^ " syn match xmlAttribPunct +[-:._]+ contained display syn match xmlAttribPunct +[:.]+ contained display " no highlighting for xmlEqual (xmlEqual has no highlighting group) syn match xmlEqual +=+ display " attribute, everything before the '=' " " PROVIDES: @xmlAttribHook " " EXAMPLE: " " <tag foo.attribute = "value"> " ^^^^^^^^^^^^^ " syn match xmlAttrib \ +[-'"<]\@<!\<[a-zA-Z:_][-.0-9a-zA-Z0-9:_]*\>\(['">]\@!\|$\)+ \ contained \ contains=xmlAttribPunct,@xmlAttribHook \ display " namespace spec " " PROVIDES: @xmlNamespaceHook " " EXAMPLE: " " <xsl:for-each select = "lola"> " ^^^ " if exists("g:xml_namespace_transparent") syn match xmlNamespace \ +\(<\|</\)\@<=[^ /!?<>"':]\+[:]\@=+ \ contained \ contains=@xmlNamespaceHook \ transparent \ display else syn match xmlNamespace \ +\(<\|</\)\@<=[^ /!?<>"':]\+[:]\@=+ \ contained \ contains=@xmlNamespaceHook \ display endif " tag name " " PROVIDES: @xmlTagHook " " EXAMPLE: " " <tag foo.attribute = "value"> " ^^^ " syn match xmlTagName \ +[<]\@<=[^ /!?<>"']\++ \ contained \ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook \ display if exists('g:xml_syntax_folding') " start tag " use matchgroup=xmlTag to skip over the leading '<' " " PROVIDES: @xmlStartTagHook " " EXAMPLE: " " <tag id="whoops"> " s^^^^^^^^^^^^^^^e " syn region xmlTag \ matchgroup=xmlTag start=+<[^ /!?<>"']\@=+ \ matchgroup=xmlTag end=+>+ \ contained \ contains=xmlError,xmlTagName,xmlAttrib,xmlEqual,xmlString,@xmlStartTagHook " highlight the end tag " " PROVIDES: @xmlTagHook " (should we provide a separate @xmlEndTagHook ?) " " EXAMPLE: " " </tag> " ^^^^^^ " syn match xmlEndTag \ +</[^ /!?<>"']\+>+ \ contained \ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook " tag elements with syntax-folding. " NOTE: NO HIGHLIGHTING -- highlighting is done by contained elements " " PROVIDES: @xmlRegionHook " " EXAMPLE: " " <tag id="whoops"> " <!-- comment --> " <another.tag></another.tag> " <empty.tag/> " some data " </tag> " syn region xmlRegion \ start=+<\z([^ /!?<>"']\+\)+ \ skip=+<!--\_.\{-}-->+ \ end=+</\z1\_\s\{-}>+ \ matchgroup=xmlEndTag end=+/>+ \ fold \ contains=xmlTag,xmlEndTag,xmlCdata,xmlRegion,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook,@Spell \ keepend \ extend else " no syntax folding: " - contained attribute removed " - xmlRegion not defined " syn region xmlTag \ matchgroup=xmlTag start=+<[^ /!?<>"']\@=+ \ matchgroup=xmlTag end=+>+ \ contains=xmlError,xmlTagName,xmlAttrib,xmlEqual,xmlString,@xmlStartTagHook syn match xmlEndTag \ +</[^ /!?<>"']\+>+ \ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook endif " &entities; compare with dtd syn match xmlEntity "&[^; \t]*;" contains=xmlEntityPunct syn match xmlEntityPunct contained "[&.;]" if exists('g:xml_syntax_folding') " The real comments (this implements the comments as defined by xml, " but not all xml pages actually conform to it. Errors are flagged. syn region xmlComment \ start=+<!+ \ end=+>+ \ contains=xmlCommentStart,xmlCommentError \ extend \ fold else " no syntax folding: " - fold attribute removed " syn region xmlComment \ start=+<!+ \ end=+>+ \ contains=xmlCommentStart,xmlCommentError \ extend endif syn match xmlCommentStart contained "<!" nextgroup=xmlCommentPart syn keyword xmlTodo contained TODO FIXME XXX syn match xmlCommentError contained "[^><!]" syn region xmlCommentPart \ start=+--+ \ end=+--+ \ contained \ contains=xmlTodo,@xmlCommentHook,@Spell " CData sections " " PROVIDES: @xmlCdataHook " syn region xmlCdata \ start=+<!\[CDATA\[+ \ end=+]]>+ \ contains=xmlCdataStart,xmlCdataEnd,@xmlCdataHook,@Spell \ keepend \ extend " using the following line instead leads to corrupt folding at CDATA regions " syn match xmlCdata +<!\[CDATA\[\_.\{-}]]>+ contains=xmlCdataStart,xmlCdataEnd,@xmlCdataHook syn match xmlCdataStart +<!\[CDATA\[+ contained contains=xmlCdataCdata syn keyword xmlCdataCdata CDATA contained syn match xmlCdataEnd +]]>+ contained " Processing instructions " This allows "?>" inside strings -- good idea? syn region xmlProcessing matchgroup=xmlProcessingDelim start="<?" end="?>" contains=xmlAttrib,xmlEqual,xmlString if exists('g:xml_syntax_folding') " DTD -- we use dtd.vim here syn region xmlDocType matchgroup=xmlDocTypeDecl \ start="<!DOCTYPE"he=s+2,rs=s+2 end=">" \ fold \ contains=xmlDocTypeKeyword,xmlInlineDTD,xmlString else " no syntax folding: " - fold attribute removed " syn region xmlDocType matchgroup=xmlDocTypeDecl \ start="<!DOCTYPE"he=s+2,rs=s+2 end=">" \ contains=xmlDocTypeKeyword,xmlInlineDTD,xmlString endif syn keyword xmlDocTypeKeyword contained DOCTYPE PUBLIC SYSTEM syn region xmlInlineDTD contained matchgroup=xmlDocTypeDecl start="\[" end="]" contains=@xmlDTD syn include @xmlDTD <sfile>:p:h/dtd.vim unlet b:current_syntax " synchronizing " TODO !!! to be improved !!! syn sync match xmlSyncDT grouphere xmlDocType +\_.\(<!DOCTYPE\)\@=+ " syn sync match xmlSyncDT groupthere NONE +]>+ if exists('g:xml_syntax_folding') syn sync match xmlSync grouphere xmlRegion +\_.\(<[^ /!?<>"']\+\)\@=+ " syn sync match xmlSync grouphere xmlRegion "<[^ /!?<>"']*>" syn sync match xmlSync groupthere xmlRegion +</[^ /!?<>"']\+>+ endif syn sync minlines=100 " The default highlighting. hi def link xmlTodo Todo hi def link xmlTag Function hi def link xmlTagName Function hi def link xmlEndTag Identifier if !exists("g:xml_namespace_transparent") hi def link xmlNamespace Tag endif hi def link xmlEntity Statement hi def link xmlEntityPunct Type hi def link xmlAttribPunct Comment hi def link xmlAttrib Type hi def link xmlString String hi def link xmlComment Comment hi def link xmlCommentStart xmlComment hi def link xmlCommentPart Comment hi def link xmlCommentError Error hi def link xmlError Error hi def link xmlProcessingDelim Comment hi def link xmlProcessing Type hi def link xmlCdata String hi def link xmlCdataCdata Statement hi def link xmlCdataStart Type hi def link xmlCdataEnd Type hi def link xmlDocTypeDecl Function hi def link xmlDocTypeKeyword Statement hi def link xmlInlineDTD Function let b:current_syntax = "xml" let &cpo = s:xml_cpo_save unlet s:xml_cpo_save " vim: ts=8
zyz2011-vim
runtime/syntax/xml.vim
Vim Script
gpl2
8,617
" Vim syntax file " Language: LOTOS (Language Of Temporal Ordering Specifications, IS8807) " Maintainer: Daniel Amyot <damyot@csi.uottawa.ca> " Last Change: Wed Aug 19 1998 " URL: http://lotos.csi.uottawa.ca/~damyot/vim/lotos.vim " This file is an adaptation of pascal.vim by Mario Eusebio " I'm not sure I understand all of the syntax highlight language, " but this file seems to do the job for standard LOTOS. " 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") finish endif syn case ignore "Comments in LOTOS are between (* and *) syn region lotosComment start="(\*" end="\*)" contains=lotosTodo "Operators [], [...], >>, ->, |||, |[...]|, ||, ;, !, ?, :, =, ,, := syn match lotosDelimiter "[][]" syn match lotosDelimiter ">>" syn match lotosDelimiter "->" syn match lotosDelimiter "\[>" syn match lotosDelimiter "[|;!?:=,]" "Regular keywords syn keyword lotosStatement specification endspec process endproc syn keyword lotosStatement where behaviour behavior syn keyword lotosStatement any let par accept choice hide of in syn keyword lotosStatement i stop exit noexit "Operators from the Abstract Data Types in IS8807 syn keyword lotosOperator eq ne succ and or xor implies iff syn keyword lotosOperator not true false syn keyword lotosOperator Insert Remove IsIn NotIn Union Ints syn keyword lotosOperator Minus Includes IsSubsetOf syn keyword lotosOperator lt le ge gt 0 "Sorts in IS8807 syn keyword lotosSort Boolean Bool FBoolean FBool Element syn keyword lotosSort Set String NaturalNumber Nat HexString syn keyword lotosSort HexDigit DecString DecDigit syn keyword lotosSort OctString OctDigit BitString Bit syn keyword lotosSort Octet OctetString "Keywords for ADTs syn keyword lotosType type endtype library endlib sorts formalsorts syn keyword lotosType eqns formaleqns opns formalopns forall ofsort is syn keyword lotosType for renamedby actualizedby sortnames opnnames syn keyword lotosType using syn sync lines=250 " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_lotos_syntax_inits") if version < 508 let did_lotos_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink lotosStatement Statement HiLink lotosProcess Label HiLink lotosOperator Operator HiLink lotosSort Function HiLink lotosType Type HiLink lotosComment Comment HiLink lotosDelimiter String delcommand HiLink endif let b:current_syntax = "lotos" " vim: ts=8
zyz2011-vim
runtime/syntax/lotos.vim
Vim Script
gpl2
2,760
" Vim syntax file " Language: bin using xxd " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> " Last Change: Sep 06, 2005 " Version: 7 " Notes: use :help xxd to see how to invoke it " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " 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") finish endif syn match xxdAddress "^[0-9a-f]\+:" contains=xxdSep syn match xxdSep contained ":" syn match xxdAscii " .\{,16\}\r\=$"hs=s+2 contains=xxdDot syn match xxdDot contained "[.\r]" " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_xxd_syntax_inits") if version < 508 let did_xxd_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink xxdAddress Constant HiLink xxdSep Identifier HiLink xxdAscii Statement delcommand HiLink endif let b:current_syntax = "xxd" " vim: ts=4
zyz2011-vim
runtime/syntax/xxd.vim
Vim Script
gpl2
1,191
" Vim syntax file " Language: B (A Formal Method with refinement and mathematical proof) " Maintainer: Mathieu Clabaut <mathieu.clabaut@gmail.com> " Contributor: Csaba Hoch " LastChange: 8 Dec 2007 " 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") finish endif " A bunch of useful B keywords syn keyword bStatement MACHINE MODEL SEES OPERATIONS INCLUDES DEFINITIONS CONSTRAINTS CONSTANTS VARIABLES CONCRETE_CONSTANTS CONCRETE_VARIABLES ABSTRACT_CONSTANTS ABSTRACT_VARIABLES HIDDEN_CONSTANTS HIDDEN_VARIABLES ASSERT ASSERTIONS EXTENDS IMPLEMENTATION REFINEMENT IMPORTS USES INITIALISATION INVARIANT PROMOTES PROPERTIES REFINES SETS VALUES VARIANT VISIBLE_CONSTANTS VISIBLE_VARIABLES THEORY XLS THEOREMS LOCAL_OPERATIONS syn keyword bLabel CASE IN EITHER OR CHOICE DO OF syn keyword bConditional IF ELSE SELECT ELSIF THEN WHEN syn keyword bRepeat WHILE FOR syn keyword bOps bool card conc closure closure1 dom first fnc front not or id inter iseq iseq1 iterate last max min mod perm pred prj1 prj2 ran rel rev seq seq1 size skip succ tail union syn keyword bKeywords LET VAR BE IN BEGIN END POW POW1 FIN FIN1 PRE SIGMA STRING UNION IS ANY WHERE syn keyword bBoolean TRUE FALSE bfalse btrue syn keyword bConstant PI MAXINT MININT User_Pass PatchProver PatchProverH0 PatchProverB0 FLAT ARI DED SUB RES syn keyword bGuard binhyp band bnot bguard bsearch bflat bfresh bguardi bget bgethyp barith bgetresult bresult bgoal bmatch bmodr bnewv bnum btest bpattern bprintf bwritef bsubfrm bvrb blvar bcall bappend bclose syn keyword bLogic or not syn match bLogic "\(!\|#\|%\|&\|+->>\|+->\|-->>\|->>\|-->\|->\|/:\|/<:\|/<<:\|/=\|/\\\|/|\\\|::\|:\|;:\|<+\|<->\|<--\|<-\|<:\|<<:\|<<|\|<=>\|<|\|==\|=>\|>+>>\|>->\|>+>\|||\||->\)" syn match bNothing /:=/ syn keyword cTodo contained TODO FIXME XXX " String and Character constants " Highlight special characters (those which have a backslash) differently syn match bSpecial contained "\\[0-7][0-7][0-7]\=\|\\." syn region bString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=bSpecial syn match bCharacter "'[^\\]'" syn match bSpecialCharacter "'\\.'" syn match bSpecialCharacter "'\\[0-7][0-7]'" syn match bSpecialCharacter "'\\[0-7][0-7][0-7]'" "catch errors caused by wrong parenthesis syn region bParen transparent start='(' end=')' contains=ALLBUT,bParenError,bIncluded,bSpecial,bTodo,bUserLabel,bBitField syn match bParenError ")" syn match bInParen contained "[{}]" "integer number, or floating point number without a dot and with "f". syn case ignore syn match bNumber "\<[0-9]\+\>" "syn match bIdentifier "\<[a-z_][a-z0-9_]*\>" syn case match syn region bComment start="/\*" end="\*/" contains=bTodo syn match bComment "//.*" contains=bTodo syntax match bCommentError "\*/" syn keyword bType INT INTEGER BOOL NAT NATURAL NAT1 NATURAL1 syn region bPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=bComment,bString,bCharacter,bNumber,bCommentError syn region bIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match bIncluded contained "<[^>]*>" syn match bInclude "^\s*#\s*include\>\s*["<]" contains=bIncluded syn region bDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,bPreCondit,bIncluded,bInclude,bDefine,bInParen syn region bPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,bPreCondit,bIncluded,bInclude,bDefine,bInParen syn sync ccomment bComment minlines=10 " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_b_syntax_inits") if version < 508 let did_b_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif " The default methods for highlighting. Can be overridden later HiLink bLabel Label HiLink bUserLabel Label HiLink bConditional Conditional HiLink bRepeat Repeat HiLink bLogic Special HiLink bCharacter Character HiLink bSpecialCharacter bSpecial HiLink bNumber Number HiLink bFloat Float HiLink bOctalError bError HiLink bParenError bError " HiLink bInParen bError HiLink bCommentError bError HiLink bBoolean Identifier HiLink bConstant Identifier HiLink bGuard Identifier HiLink bOperator Operator HiLink bKeywords Operator HiLink bOps Identifier HiLink bStructure Structure HiLink bStorageClass StorageClass HiLink bInclude Include HiLink bPreProc PreProc HiLink bDefine Macro HiLink bIncluded bString HiLink bError Error HiLink bStatement Statement HiLink bPreCondit PreCondit HiLink bType Type HiLink bCommentError bError HiLink bCommentString bString HiLink bComment2String bString HiLink bCommentSkip bComment HiLink bString String HiLink bComment Comment HiLink bSpecial SpecialChar HiLink bTodo Todo "hi link bIdentifier Identifier delcommand HiLink endif let b:current_syntax = "b" " vim: ts=8
zyz2011-vim
runtime/syntax/b.vim
Vim Script
gpl2
5,215
" Vim syntax support file " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2001 Sep 04 " This file is used for ":syntax on". " It installs the autocommands and starts highlighting for all buffers. if !has("syntax") finish endif " If Syntax highlighting appears to be on already, turn it off first, so that " any leftovers are cleared. if exists("syntax_on") || exists("syntax_manual") so <sfile>:p:h/nosyntax.vim endif " Load the Syntax autocommands and set the default methods for highlighting. runtime syntax/synload.vim " Load the FileType autocommands if not done yet. if exists("did_load_filetypes") let s:did_ft = 1 else filetype on let s:did_ft = 0 endif " Set up the connection between FileType and Syntax autocommands. " This makes the syntax automatically set when the file type is detected. augroup syntaxset au! FileType * exe "set syntax=" . expand("<amatch>") augroup END " Execute the syntax autocommands for the each buffer. " If the filetype wasn't detected yet, do that now. " Always do the syntaxset autocommands, for buffers where the 'filetype' " already was set manually (e.g., help buffers). doautoall syntaxset FileType if !s:did_ft doautoall filetypedetect BufRead endif
zyz2011-vim
runtime/syntax/syntax.vim
Vim Script
gpl2
1,228
" Vim syntax file " Language: KixTart 95, Kix2001 Windows script language http://kixtart.org/ " Maintainer: Richard Howarth <rhowarth@sgb.co.uk> " Last Change: 2003 May 11 " URL: http://www.howsoft.demon.co.uk/ " KixTart files identified by *.kix extension. " Amendment History: " 26 April 2001: RMH " Removed development comments from distro version " Renamed "Kix*" to "kix*" for consistancy " Changes made in preperation for VIM version 5.8/6.00 " TODO: " Handle arrays highlighting " Handle object highlighting " The next two may not be possible: " Work out how to error too many "(", i.e. (() should be an error. " Similarly, "if" without "endif" and similar constructs should error. " Clear legacy syntax rules for version 5.x, exit if already processed for version 6+ if version < 600 syn clear elseif exists("b:current_syntax") finish endif syn case match syn keyword kixTODO TODO FIX XXX contained " Case insensitive language. syn case ignore " Kix statements syn match kixStatement "?" syn keyword kixStatement beep big break syn keyword kixStatement call cd cls color cookie1 copy syn keyword kixStatement del dim display syn keyword kixStatement exit syn keyword kixStatement flushkb syn keyword kixStatement get gets global go gosub goto syn keyword kixStatement md syn keyword kixStatement password play syn keyword kixStatement quit syn keyword kixStatement rd return run syn keyword kixStatement set setl setm settime shell sleep small syn keyword kixStatement use " Kix2001 syn keyword kixStatement debug function endfunction redim " Simple variables syn match kixNotVar "\$\$\|@@\|%%" transparent contains=NONE syn match kixLocalVar "\$\w\+" syn match kixMacro "@\w\+" syn match kixEnvVar "%\w\+" " Destination labels syn match kixLabel ":\w\+\>" " Identify strings, trap unterminated strings syn match kixStringError +".*\|'.*+ syn region kixDoubleString oneline start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=kixLocalVar,kixMacro,kixEnvVar,kixNotVar syn region kixSingleString oneline start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=kixLocalVar,kixMacro,kixEnvVar,kixNotVar " Operators syn match kixOperator "+\|-\|\*\|/\|=\|&\||" syn keyword kixOperator and or " Kix2001 syn match kixOperator "==" syn keyword kixOperator not " Numeric constants syn match kixInteger "-\=\<\d\+\>" contains=NONE syn match kixFloat "-\=\.\d\+\>\|-\=\<\d\+\.\d\+\>" contains=NONE " Hex numeric constants syn match kixHex "\&\x\+\>" contains=NONE " Other contants " Kix2001 syn keyword kixConstant on off " Comments syn match kixComment ";.*$" contains=kixTODO " Trap unmatched parenthesis syn match kixParenCloseError ")" syn region kixParen oneline transparent start="(" end=")" contains=ALLBUT,kixParenCloseError " Functions (Builtin + UDF) syn match kixFunction "\w\+("he=e-1,me=e-1 contains=ALL " Trap unmatched brackets syn match kixBrackCloseError "\]" syn region kixBrack transparent start="\[" end="\]" contains=ALLBUT,kixBrackCloseError " Clusters for ALLBUT shorthand syn cluster kixIfBut contains=kixIfError,kixSelectOK,kixDoOK,kixWhileOK,kixForEachOK,kixForNextOK syn cluster kixSelectBut contains=kixSelectError,kixIfOK,kixDoOK,kixWhileOK,kixForEachOK,kixForNextOK syn cluster kixDoBut contains=kixDoError,kixSelectOK,kixIfOK,kixWhileOK,kixForEachOK,kixForNextOK syn cluster kixWhileBut contains=kixWhileError,kixSelectOK,kixIfOK,kixDoOK,kixForEachOK,kixForNextOK syn cluster kixForEachBut contains=kixForEachError,kixSelectOK,kixIfOK,kixDoOK,kixForNextOK,kixWhileOK syn cluster kixForNextBut contains=kixForNextError,kixSelectOK,kixIfOK,kixDoOK,kixForEachOK,kixWhileOK " Condtional construct errors. syn match kixIfError "\<if\>\|\<else\>\|\<endif\>" syn match kixIfOK contained "\<if\>\|\<else\>\|\<endif\>" syn region kixIf transparent matchgroup=kixIfOK start="\<if\>" end="\<endif\>" contains=ALLBUT,@kixIfBut syn match kixSelectError "\<select\>\|\<case\>\|\<endselect\>" syn match kixSelectOK contained "\<select\>\|\<case\>\|\<endselect\>" syn region kixSelect transparent matchgroup=kixSelectOK start="\<select\>" end="\<endselect\>" contains=ALLBUT,@kixSelectBut " Program control constructs. syn match kixDoError "\<do\>\|\<until\>" syn match kixDoOK contained "\<do\>\|\<until\>" syn region kixDo transparent matchgroup=kixDoOK start="\<do\>" end="\<until\>" contains=ALLBUT,@kixDoBut syn match kixWhileError "\<while\>\|\<loop\>" syn match kixWhileOK contained "\<while\>\|\<loop\>" syn region kixWhile transparent matchgroup=kixWhileOK start="\<while\>" end="\<loop\>" contains=ALLBUT,@kixWhileBut syn match kixForNextError "\<for\>\|\<to\>\|\<step\>\|\<next\>" syn match kixForNextOK contained "\<for\>\|\<to\>\|\<step\>\|\<next\>" syn region kixForNext transparent matchgroup=kixForNextOK start="\<for\>" end="\<next\>" contains=ALLBUT,@kixForBut syn match kixForEachError "\<for each\>\|\<in\>\|\<next\>" syn match kixForEachOK contained "\<for each\>\|\<in\>\|\<next\>" syn region kixForEach transparent matchgroup=kixForEachOK start="\<for each\>" end="\<next\>" contains=ALLBUT,@kixForEachBut " Expressions syn match kixExpression "<\|>\|<=\|>=\|<>" " Default highlighting. " Version < 5.8 set default highlight if file not already processed. " Version >= 5.8 set default highlight only if it doesn't already have a value. if version > 508 || !exists("did_kix_syn_inits") if version < 508 let did_kix_syn_inits=1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink kixDoubleString String HiLink kixSingleString String HiLink kixStatement Statement HiLink kixRepeat Repeat HiLink kixComment Comment HiLink kixBuiltin Function HiLink kixLocalVar Special HiLink kixMacro Special HiLink kixEnvVar Special HiLink kixLabel Type HiLink kixFunction Function HiLink kixInteger Number HiLink kixHex Number HiLink kixFloat Number HiLink kixOperator Operator HiLink kixExpression Operator HiLink kixParenCloseError Error HiLink kixBrackCloseError Error HiLink kixStringError Error HiLink kixWhileError Error HiLink kixWhileOK Conditional HiLink kixDoError Error HiLink kixDoOK Conditional HiLink kixIfError Error HiLink kixIfOK Conditional HiLink kixSelectError Error HiLink kixSelectOK Conditional HiLink kixForNextError Error HiLink kixForNextOK Conditional HiLink kixForEachError Error HiLink kixForEachOK Conditional delcommand HiLink endif let b:current_syntax = "kix" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/kix.vim
Vim Script
gpl2
6,579
" Vim syntax file " Language: TAK2, TAK3, TAK2000 thermal modeling output file " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.out " URL: http://www.naglenet.org/vim/syntax/takout.vim " MAIN URL: http://www.naglenet.org/vim/ " 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") finish endif " Ignore case syn case match " Load TAK syntax file if version < 600 source <sfile>:p:h/tak.vim else runtime! syntax/tak.vim endif unlet b:current_syntax " " " Begin syntax definitions for tak output files. " " Define keywords for TAK output syn case match syn keyword takoutPos ON SI syn keyword takoutNeg OFF ENG " Define matches for TAK output syn match takoutTitle "TAK III" syn match takoutTitle "Release \d.\d\d" syn match takoutTitle " K & K Associates *Thermal Analysis Kit III *Serial Number \d\d-\d\d\d" syn match takoutFile ": \w*\.TAK"hs=s+2 syn match takoutInteger "T\=[0-9]*\>"ms=s+1 syn match takoutSectionDelim "[-<>]\{4,}" contains=takoutSectionTitle syn match takoutSectionDelim ":\=\.\{4,}:\=" contains=takoutSectionTitle syn match takoutSectionTitle "[-<:] \w[0-9A-Za-z_() ]\+ [->:]"hs=s+1,me=e-1 syn match takoutHeaderDelim "=\{5,}" syn match takoutHeaderDelim "|\{5,}" syn match takoutHeaderDelim "+\{5,}" syn match takoutLabel "Input File:" contains=takoutFile syn match takoutLabel "Begin Solution: Routine" syn match takoutError "<<< Error >>>" " Define the default highlighting " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_takout_syntax_inits") if version < 508 let did_takout_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink takoutPos Statement HiLink takoutNeg PreProc HiLink takoutTitle Type HiLink takoutFile takIncludeFile HiLink takoutInteger takInteger HiLink takoutSectionDelim Delimiter HiLink takoutSectionTitle Exception HiLink takoutHeaderDelim SpecialComment HiLink takoutLabel Identifier HiLink takoutError Error delcommand HiLink endif let b:current_syntax = "takout" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/takout.vim
Vim Script
gpl2
2,451
" Vim syntax file " Language: .desktop, .directory files " according to freedesktop.org specification 0.9.4 " http://pdx.freedesktop.org/Standards/desktop-entry-spec/desktop-entry-spec-0.9.4.html " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) " Last Change: 2004 May 16 " Version Info: desktop.vim 0.9.4-1.2 " 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") finish endif " This syntax file can be used to all *nix configuration files similar to dos " ini format (eg. .xawtv, .radio, kde rc files) - this is default mode. But " you can also enforce strict following of freedesktop.org standard for " .desktop and .directory files . Set (eg. in vimrc) " let enforce_freedesktop_standard = 1 " and nonstandard extensions not following X- notation will not be highlighted. if exists("enforce_freedesktop_standard") let b:enforce_freedesktop_standard = 1 else let b:enforce_freedesktop_standard = 0 endif " case on syn case match " General if b:enforce_freedesktop_standard == 0 syn match dtNotStLabel "^.\{-}=\@=" nextgroup=dtDelim endif syn match dtGroup /^\s*\[.*\]/ syn match dtComment /^\s*#.*$/ syn match dtDelim /=/ contained " Locale syn match dtLocale /^\s*\<\(Name\|GenericName\|Comment\|SwallowTitle\|Icon\|UnmountIcon\)\>.*/ contains=dtLocaleKey,dtLocaleName,dtDelim transparent syn keyword dtLocaleKey Name GenericName Comment SwallowTitle Icon UnmountIcon nextgroup=dtLocaleName containedin=dtLocale syn match dtLocaleName /\(\[.\{-}\]\s*=\@=\|\)/ nextgroup=dtDelim containedin=dtLocale contained " Numeric syn match dtNumeric /^\s*\<Version\>/ contains=dtNumericKey,dtDelim syn keyword dtNumericKey Version nextgroup=dtDelim containedin=dtNumeric contained " Boolean syn match dtBoolean /^\s*\<\(StartupNotify\|ReadOnly\|Terminal\|Hidden\|NoDisplay\)\>.*/ contains=dtBooleanKey,dtDelim,dtBooleanValue transparent syn keyword dtBooleanKey StartupNotify ReadOnly Terminal Hidden NoDisplay nextgroup=dtDelim containedin=dtBoolean contained syn keyword dtBooleanValue true false containedin=dtBoolean contained " String syn match dtString /^\s*\<\(Encoding\|Icon\|Path\|Actions\|FSType\|MountPoint\|UnmountIcon\|URL\|Categories\|OnlyShowIn\|NotShowIn\|StartupWMClass\|FilePattern\|MimeType\)\>.*/ contains=dtStringKey,dtDelim transparent syn keyword dtStringKey Type Encoding TryExec Exec Path Actions FSType MountPoint URL Categories OnlyShowIn NotShowIn StartupWMClass FilePattern MimeType nextgroup=dtDelim containedin=dtString contained " Exec syn match dtExec /^\s*\<\(Exec\|TryExec\|SwallowExec\)\>.*/ contains=dtExecKey,dtDelim,dtExecParam transparent syn keyword dtExecKey Exec TryExec SwallowExec nextgroup=dtDelim containedin=dtExec contained syn match dtExecParam /%[fFuUnNdDickv]/ containedin=dtExec contained " Type syn match dtType /^\s*\<Type\>.*/ contains=dtTypeKey,dtDelim,dtTypeValue transparent syn keyword dtTypeKey Type nextgroup=dtDelim containedin=dtType contained syn keyword dtTypeValue Application Link FSDevice Directory containedin=dtType contained " X-Addition syn match dtXAdd /^\s*X-.*/ contains=dtXAddKey,dtDelim transparent syn match dtXAddKey /^\s*X-.\{-}\s*=\@=/ nextgroup=dtDelim containedin=dtXAdd contains=dtXLocale contained " Locale for X-Addition syn match dtXLocale /\[.\{-}\]\s*=\@=/ containedin=dtXAddKey contained " Locale for all syn match dtALocale /\[.\{-}\]\s*=\@=/ containedin=ALL " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_desktop_syntax_inits") if version < 508 let did_dosini_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink dtGroup Special HiLink dtComment Comment HiLink dtDelim String HiLink dtLocaleKey Type HiLink dtLocaleName Identifier HiLink dtXLocale Identifier HiLink dtALocale Identifier HiLink dtNumericKey Type HiLink dtBooleanKey Type HiLink dtBooleanValue Constant HiLink dtStringKey Type HiLink dtExecKey Type HiLink dtExecParam Special HiLink dtTypeKey Type HiLink dtTypeValue Constant HiLink dtNotStLabel Type HiLink dtXAddKey Type delcommand HiLink endif let b:current_syntax = "desktop" " vim:ts=8
zyz2011-vim
runtime/syntax/desktop.vim
Vim Script
gpl2
4,446
" Vim syntax file " Language: pilrc - a resource compiler for Palm OS development " Maintainer: Brian Schau <brian@schau.com> " Last change: 2003 May 11 " Available on: http://www.schau.com/pilrcvim/pilrc.vim " Remove any old syntax if version < 600 syn clear elseif exists("b:current_syntax") finish endif syn case ignore " Notes: TRANSPARENT, FONT and FONT ID are defined in the specials " section below. Beware of the order of the specials! " Look in the syntax.txt and usr_27.txt files in vim\vim{version}\doc " directory for regexps etc. " Keywords - basic syn keyword pilrcKeyword ALERT APPLICATION APPLICATIONICONNAME AREA syn keyword pilrcKeyword BITMAP BITMAPCOLOR BITMAPCOLOR16 BITMAPCOLOR16K syn keyword pilrcKeyword BITMAPFAMILY BITMAPFAMILYEX BITMAPFAMILYSPECIAL syn keyword pilrcKeyword BITMAPGREY BITMAPGREY16 BITMAPSCREENFAMILY syn keyword pilrcKeyword BOOTSCREENFAMILY BUTTON BUTTONS BYTELIST syn keyword pilrcKeyword CATEGORIES CHECKBOX COUNTRYLOCALISATION syn keyword pilrcKeyword DATA syn keyword pilrcKeyword FEATURE FIELD FONTINDEX FORM FORMBITMAP syn keyword pilrcKeyword GADGET GENERATEHEADER syn keyword pilrcKeyword GRAFFITIINPUTAREA GRAFFITISTATEINDICATOR syn keyword pilrcKeyword HEX syn keyword pilrcKeyword ICON ICONFAMILY ICONFAMILYEX INTEGER syn keyword pilrcKeyword KEYBOARD syn keyword pilrcKeyword LABEL LAUNCHERCATEGORY LIST LONGWORDLIST syn keyword pilrcKeyword MENU MENUITEM MESSAGE MIDI syn keyword pilrcKeyword PALETTETABLE POPUPLIST POPUPTRIGGER syn keyword pilrcKeyword PULLDOWN PUSHBUTTON syn keyword pilrcKeyword REPEATBUTTON RESETAUTOID syn keyword pilrcKeyword SCROLLBAR SELECTORTRIGGER SLIDER SMALLICON syn keyword pilrcKeyword SMALLICONFAMILY SMALLICONFAMILYEX STRING STRINGTABLE syn keyword pilrcKeyword TABLE TITLE TRANSLATION TRAP syn keyword pilrcKeyword VERSION syn keyword pilrcKeyword WORDLIST " Types syn keyword pilrcType AT AUTOSHIFT syn keyword pilrcType BACKGROUNDID BITMAPID BOLDFRAME BPP syn keyword pilrcType CHECKED COLORTABLE COLUMNS COLUMNWIDTHS COMPRESS syn keyword pilrcType COMPRESSBEST COMPRESSPACKBITS COMPRESSRLE COMPRESSSCANLINE syn keyword pilrcType CONFIRMATION COUNTRY CREATOR CURRENCYDECIMALPLACES syn keyword pilrcType CURRENCYNAME CURRENCYSYMBOL CURRENCYUNIQUESYMBOL syn keyword pilrcType DATEFORMAT DAYLIGHTSAVINGS DEFAULTBTNID DEFAULTBUTTON syn keyword pilrcType DENSITY DISABLED DYNAMICSIZE syn keyword pilrcType EDITABLE ENTRY ERROR EXTENDED syn keyword pilrcType FEEDBACK FILE FONTID FORCECOMPRESS FRAME syn keyword pilrcType GRAFFITI GRAPHICAL GROUP syn keyword pilrcType HASSCROLLBAR HELPID syn keyword pilrcType ID INDEX INFORMATION syn keyword pilrcType KEYDOWNCHR KEYDOWNKEYCODE KEYDOWNMODIFIERS syn keyword pilrcType LANGUAGE LEFTALIGN LEFTANCHOR LONGDATEFORMAT syn keyword pilrcType MAX MAXCHARS MEASUREMENTSYSTEM MENUID MIN LOCALE syn keyword pilrcType MINUTESWESTOFGMT MODAL MULTIPLELINES syn keyword pilrcType NAME NOCOLORTABLE NOCOMPRESS NOFRAME NONEDITABLE syn keyword pilrcType NONEXTENDED NONUSABLE NOSAVEBEHIND NUMBER NUMBERFORMAT syn keyword pilrcType NUMERIC syn keyword pilrcType PAGESIZE syn keyword pilrcType RECTFRAME RIGHTALIGN RIGHTANCHOR ROWS syn keyword pilrcType SAVEBEHIND SEARCH SCREEN SELECTEDBITMAPID SINGLELINE syn keyword pilrcType THUMBID TRANSPARENTINDEX TIMEFORMAT syn keyword pilrcType UNDERLINED USABLE syn keyword pilrcType VALUE VERTICAL VISIBLEITEMS syn keyword pilrcType WARNING WEEKSTARTDAY " Country syn keyword pilrcCountry Australia Austria Belgium Brazil Canada Denmark syn keyword pilrcCountry Finland France Germany HongKong Iceland Indian syn keyword pilrcCountry Indonesia Ireland Italy Japan Korea Luxembourg Malaysia syn keyword pilrcCountry Mexico Netherlands NewZealand Norway Philippines syn keyword pilrcCountry RepChina Singapore Spain Sweden Switzerland Thailand syn keyword pilrcCountry Taiwan UnitedKingdom UnitedStates " Language syn keyword pilrcLanguage English French German Italian Japanese Spanish " String syn match pilrcString "\"[^"]*\"" " Number syn match pilrcNumber "\<0x\x\+\>" syn match pilrcNumber "\<\d\+\>" " Comment syn region pilrcComment start="/\*" end="\*/" syn region pilrcComment start="//" end="$" " Constants syn keyword pilrcConstant AUTO AUTOID BOTTOM CENTER PREVBOTTOM PREVHEIGHT syn keyword pilrcConstant PREVLEFT PREVRIGHT PREVTOP PREVWIDTH RIGHT syn keyword pilrcConstant SEPARATOR " Identifier syn match pilrcIdentifier "\<\h\w*\>" " Specials syn match pilrcType "\<FONT\>" syn match pilrcKeyword "\<FONT\>\s*\<ID\>" syn match pilrcType "\<TRANSPARENT\>" " Function syn keyword pilrcFunction BEGIN END " Include syn match pilrcInclude "\#include" syn match pilrcInclude "\#define" syn keyword pilrcInclude equ syn keyword pilrcInclude package syn region pilrcInclude start="public class" end="}" syn sync ccomment pilrcComment if version >= 508 || !exists("did_pilrc_syntax_inits") if version < 508 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif let did_pilrc_syntax_inits = 1 " The default methods for highlighting HiLink pilrcKeyword Statement HiLink pilrcType Type HiLink pilrcError Error HiLink pilrcCountry SpecialChar HiLink pilrcLanguage SpecialChar HiLink pilrcString SpecialChar HiLink pilrcNumber Number HiLink pilrcComment Comment HiLink pilrcConstant Constant HiLink pilrcFunction Function HiLink pilrcInclude SpecialChar HiLink pilrcIdentifier Number delcommand HiLink endif let b:current_syntax = "pilrc"
zyz2011-vim
runtime/syntax/pilrc.vim
Vim Script
gpl2
5,505
" Vim syntax file " Language: grub(8) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword grubTodo contained TODO FIXME XXX NOTE syn region grubComment display oneline start='^#' end='$' \ contains=grubTodo,@Spell syn match grubDevice display \ '(\([fh]d\d\|\d\+\|0x\x\+\)\(,\d\+\)\=\(,\l\)\=)' syn match grubBlock display '\(\d\+\)\=+\d\+\(,\(\d\+\)\=+\d\+\)*' syn match grubNumbers display '+\=\<\d\+\|0x\x\+\>' syn match grubBegin display '^' \ nextgroup=@grubCommands,grubComment skipwhite syn cluster grubCommands contains=grubCommand,grubTitleCommand syn keyword grubCommand contained default fallback hiddenmenu timeout syn keyword grubTitleCommand contained title nextgroup=grubTitle skipwhite syn match grubTitle contained display '.*' syn keyword grubCommand contained bootp color device dhcp hide ifconfig \ pager partnew parttype password rarp serial setkey \ terminal tftpserver unhide blocklist boot cat \ chainloader cmp configfile debug displayapm \ displaymem embed find fstest geometry halt help \ impsprobe initrd install ioprobe kernel lock \ makeactive map md5crypt module modulenounzip pause \ quit reboot read root rootnoverify savedefault setup \ testload testvbe uppermem vbeprobe syn keyword grubSpecial saved syn match grubBlink display 'blink-' syn keyword grubBlack black syn keyword grubBlue blue syn keyword grubGreen green syn keyword grubRed red syn keyword grubMagenta magenta syn keyword grubBrown brown yellow syn keyword grubWhite white syn match grubLightGray display 'light-gray' syn match grubLightBlue display 'light-blue' syn match grubLightGreen display 'light-green' syn match grubLightCyan display 'light-cyan' syn match grubLightRed display 'light-red' syn match grubLightMagenta display 'light-magenta' syn match grubDarkGray display 'dark-gray' hi def link grubComment Comment hi def link grubTodo Todo hi def link grubNumbers Number hi def link grubDevice Identifier hi def link grubBlock Identifier hi def link grubCommand Keyword hi def link grubTitleCommand grubCommand hi def link grubTitle String hi def link grubSpecial Special hi def grubBlink cterm=inverse hi def grubBlack ctermfg=Black ctermbg=White guifg=Black guibg=White hi def grubBlue ctermfg=DarkBlue guifg=DarkBlue hi def grubGreen ctermfg=DarkGreen guifg=DarkGreen hi def grubRed ctermfg=DarkRed guifg=DarkRed hi def grubMagenta ctermfg=DarkMagenta guifg=DarkMagenta hi def grubBrown ctermfg=Brown guifg=Brown hi def grubWhite ctermfg=White ctermbg=Black guifg=White guibg=Black hi def grubLightGray ctermfg=LightGray guifg=LightGray hi def grubLightBlue ctermfg=LightBlue guifg=LightBlue hi def grubLightGreen ctermfg=LightGreen guifg=LightGreen hi def grubLightCyan ctermfg=LightCyan guifg=LightCyan hi def grubLightRed ctermfg=LightRed guifg=LightRed hi def grubLightMagenta ctermfg=LightMagenta guifg=LightMagenta hi def grubDarkGray ctermfg=DarkGray guifg=DarkGray let b:current_syntax = "grub" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/grub.vim
Vim Script
gpl2
3,870
" Vim syntax file " Language: WinBatch/Webbatch (*.wbt, *.web) " Maintainer: dominique@mggen.com " URL: http://www.mggen.com/vim/syntax/winbatch.zip " Last change: 2001 May 10 " 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") finish endif syn case ignore syn keyword winbatchCtl if then else endif break end return exit next syn keyword winbatchCtl while for gosub goto switch select to case syn keyword winbatchCtl endselect endwhile endselect endswitch " String syn region winbatchVar start=+%+ end=+%+ " %var% in strings syn region winbatchString start=+"+ end=+"+ contains=winbatchVar syn match winbatchComment ";.*$" syn match winbatchLabel "^\ *:[0-9a-zA-Z_\-]\+\>" " constant (bezgin by @) syn match winbatchConstant "@[0_9a-zA-Z_\-]\+" " number syn match winbatchNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>" syn keyword winbatchImplicit aboveicons acc_attrib acc_chng_nt acc_control acc_create syn keyword winbatchImplicit acc_delete acc_full_95 acc_full_nt acc_list acc_pfull_nt syn keyword winbatchImplicit acc_pmang_nt acc_print_nt acc_read acc_read_95 acc_read_nt syn keyword winbatchImplicit acc_write amc arrange ascending attr_a attr_a attr_ci attr_ci syn keyword winbatchImplicit attr_dc attr_dc attr_di attr_di attr_dm attr_dm attr_h attr_h syn keyword winbatchImplicit attr_ic attr_ic attr_p attr_p attr_ri attr_ri attr_ro attr_ro syn keyword winbatchImplicit attr_sh attr_sh attr_sy attr_sy attr_t attr_t attr_x attr_x syn keyword winbatchImplicit avogadro backscan boltzmann cancel capslock check columns syn keyword winbatchImplicit commonformat cr crlf ctrl default default deg2rad descending syn keyword winbatchImplicit disable drive electric enable eulers false faraday float8 syn keyword winbatchImplicit fwdscan gftsec globalgroup gmtsec goldenratio gravitation hidden syn keyword winbatchImplicit icon lbutton lclick ldblclick lf lightmps lightmtps localgroup syn keyword winbatchImplicit magfield major mbokcancel mbutton mbyesno mclick mdblclick minor syn keyword winbatchImplicit msformat multiple ncsaformat no none none noresize normal syn keyword winbatchImplicit notify nowait numlock off on open parsec parseonly pi syn keyword winbatchImplicit planckergs planckjoules printer rad2deg rbutton rclick rdblclick syn keyword winbatchImplicit regclasses regcurrent regmachine regroot regusers rows save syn keyword winbatchImplicit scrolllock server shift single sorted stack string tab tile syn keyword winbatchImplicit true uncheck unsorted wait wholesection word1 word2 word4 yes syn keyword winbatchImplicit zoomed about abs acos addextender appexist appwaitclose asin syn keyword winbatchImplicit askfilename askfiletext askitemlist askline askpassword askyesno syn keyword winbatchImplicit atan average beep binaryalloc binarycopy binaryeodget binaryeodset syn keyword winbatchImplicit binaryfree binaryhashrec binaryincr binaryincr2 binaryincr4 syn keyword winbatchImplicit binaryincrflt binaryindex binaryindexnc binaryoletype binarypeek syn keyword winbatchImplicit binarypeek2 binarypeek4 binarypeekflt binarypeekstr binarypoke syn keyword winbatchImplicit binarypoke2 binarypoke4 binarypokeflt binarypokestr binaryread syn keyword winbatchImplicit binarysort binarystrcnt binarywrite boxbuttondraw boxbuttonkill syn keyword winbatchImplicit boxbuttonstat boxbuttonwait boxcaption boxcolor syn keyword winbatchImplicit boxdataclear boxdatatag syn keyword winbatchImplicit boxdestroy boxdrawcircle boxdrawline boxdrawrect boxdrawtext syn keyword winbatchImplicit boxesup boxmapmode boxnew boxopen boxpen boxshut boxtext boxtextcolor syn keyword winbatchImplicit boxtextfont boxtitle boxupdates break buttonnames by call syn keyword winbatchImplicit callext ceiling char2num clipappend clipget clipput syn keyword winbatchImplicit continue cos cosh datetime syn keyword winbatchImplicit ddeexecute ddeinitiate ddepoke dderequest ddeterminate syn keyword winbatchImplicit ddetimeout debug debugdata decimals delay dialog syn keyword winbatchImplicit dialogbox dirattrget dirattrset dirchange direxist syn keyword winbatchImplicit dirget dirhome diritemize dirmake dirremove dirrename syn keyword winbatchImplicit dirwindows diskexist diskfree diskinfo diskscan disksize syn keyword winbatchImplicit diskvolinfo display dllcall dllfree dllhinst dllhwnd dllload syn keyword winbatchImplicit dosboxcursorx dosboxcursory dosboxgetall dosboxgetdata syn keyword winbatchImplicit dosboxheight dosboxscrmode dosboxversion dosboxwidth dosversion syn keyword winbatchImplicit drop edosgetinfo edosgetvar edoslistvars edospathadd edospathchk syn keyword winbatchImplicit edospathdel edossetvar syn keyword winbatchImplicit endsession envgetinfo envgetvar environment syn keyword winbatchImplicit environset envitemize envlistvars envpathadd envpathchk syn keyword winbatchImplicit envpathdel envsetvar errormode exclusive execute exetypeinfo syn keyword winbatchImplicit exp fabs fileappend fileattrget fileattrset fileclose syn keyword winbatchImplicit filecompare filecopy filedelete fileexist fileextension filefullname syn keyword winbatchImplicit fileitemize filelocate filemapname filemove filenameeval1 syn keyword winbatchImplicit filenameeval2 filenamelong filenameshort fileopen filepath syn keyword winbatchImplicit fileread filerename fileroot filesize filetimecode filetimeget syn keyword winbatchImplicit filetimeset filetimetouch fileverinfo filewrite fileymdhms syn keyword winbatchImplicit findwindow floor getexacttime gettickcount syn keyword winbatchImplicit iconarrange iconreplace ignoreinput inidelete inideletepvt syn keyword winbatchImplicit iniitemize iniitemizepvt iniread inireadpvt iniwrite iniwritepvt syn keyword winbatchImplicit installfile int intcontrol isdefined isfloat isint iskeydown syn keyword winbatchImplicit islicensed isnumber itemcount itemextract iteminsert itemlocate syn keyword winbatchImplicit itemremove itemselect itemsort keytoggleget keytoggleset syn keyword winbatchImplicit lasterror log10 logdisk loge max message min mod mouseclick syn keyword winbatchImplicit mouseclickbtn mousedrag mouseinfo mousemove msgtextget n3attach syn keyword winbatchImplicit n3captureend n3captureprt n3chgpassword n3detach n3dirattrget syn keyword winbatchImplicit n3dirattrset n3drivepath n3drivepath2 n3drivestatus n3fileattrget syn keyword winbatchImplicit n3fileattrset n3getloginid n3getmapped n3getnetaddr n3getuser syn keyword winbatchImplicit n3getuserid n3logout n3map n3mapdelete n3mapdir n3maproot n3memberdel syn keyword winbatchImplicit n3memberget n3memberset n3msgsend n3msgsendall n3serverinfo syn keyword winbatchImplicit n3serverlist n3setsrchdrv n3usergroups n3version n4attach syn keyword winbatchImplicit n4captureend n4captureprt n4chgpassword n4detach n4dirattrget syn keyword winbatchImplicit n4dirattrset n4drivepath n4drivestatus n4fileattrget n4fileattrset syn keyword winbatchImplicit n4getloginid n4getmapped n4getnetaddr n4getuser n4getuserid syn keyword winbatchImplicit n4login n4logout n4map n4mapdelete n4mapdir n4maproot n4memberdel syn keyword winbatchImplicit n4memberget n4memberset n4msgsend n4msgsendall n4serverinfo syn keyword winbatchImplicit n4serverlist n4setsrchdrv n4usergroups n4version netadddrive syn keyword winbatchImplicit netaddprinter netcancelcon netdirdialog netgetcon netgetuser syn keyword winbatchImplicit netinfo netresources netversion num2char objectclose syn keyword winbatchImplicit objectopen parsedata pause playmedia playmidi playwaveform syn keyword winbatchImplicit print random regapp regclosekey regconnect regcreatekey syn keyword winbatchImplicit regdeletekey regdelvalue regentrytype regloadhive regopenkey syn keyword winbatchImplicit regquerybin regquerydword regqueryex regqueryexpsz regqueryitem syn keyword winbatchImplicit regquerykey regquerymulsz regqueryvalue regsetbin syn keyword winbatchImplicit regsetdword regsetex regsetexpsz regsetmulsz regsetvalue syn keyword winbatchImplicit regunloadhive reload reload rtstatus run runenviron syn keyword winbatchImplicit runexit runhide runhidewait runicon runiconwait runshell runwait syn keyword winbatchImplicit runzoom runzoomwait sendkey sendkeyschild sendkeysto syn keyword winbatchImplicit sendmenusto shellexecute shortcutedit shortcutextra shortcutinfo syn keyword winbatchImplicit shortcutmake sin sinh snapshot sounds sqrt syn keyword winbatchImplicit srchfree srchinit srchnext strcat strcharcount strcmp syn keyword winbatchImplicit strfill strfix strfixchars stricmp strindex strlen syn keyword winbatchImplicit strlower strreplace strscan strsub strtrim strupper syn keyword winbatchImplicit tan tanh tcpaddr2host tcpftpchdir tcpftpclose tcpftpget syn keyword winbatchImplicit tcpftplist tcpftpmode tcpftpopen tcpftpput tcphost2addr tcphttpget syn keyword winbatchImplicit tcphttppost tcpparmget tcpparmset tcpping tcpsmtp terminate syn keyword winbatchImplicit textbox textboxsort textoutbufdel textoutbuffer textoutdebug syn keyword winbatchImplicit textoutfree textoutinfo textoutreset textouttrack textouttrackb syn keyword winbatchImplicit textouttrackp textoutwait textselect timeadd timedate syn keyword winbatchImplicit timedelay timediffdays timediffsecs timejulianday timejultoymd syn keyword winbatchImplicit timesubtract timewait timeymdhms version versiondll syn keyword winbatchImplicit w3addcon w3cancelcon w3dirbrowse w3getcaps w3getcon w3netdialog syn keyword winbatchImplicit w3netgetuser w3prtbrowse w3version w95accessadd w95accessdel syn keyword winbatchImplicit w95adddrive w95addprinter w95cancelcon w95dirdialog w95getcon syn keyword winbatchImplicit w95getuser w95resources w95shareadd w95sharedel w95shareset syn keyword winbatchImplicit w95version waitforkey wallpaper webbaseconv webcloselog syn keyword winbatchImplicit webcmddata webcondata webcounter webdatdata webdumperror webhashcode syn keyword winbatchImplicit webislocal weblogline webopenlog webout weboutfile webparamdata syn keyword winbatchImplicit webparamnames websettimeout webverifycard winactivate syn keyword winbatchImplicit winactivchild winarrange winclose winclosenot winconfig winexename syn keyword winbatchImplicit winexist winparset winparget winexistchild wingetactive syn keyword winbatchImplicit winhelp winhide winiconize winidget winisdos winitemchild syn keyword winbatchImplicit winitemize winitemnameid winmetrics winname winparmget syn keyword winbatchImplicit winparmset winplace winplaceget winplaceset syn keyword winbatchImplicit winposition winresources winshow winstate winsysinfo syn keyword winbatchImplicit wintitle winversion winwaitchild winwaitclose winwaitexist syn keyword winbatchImplicit winzoom wnaddcon wncancelcon wncmptrinfo wndialog syn keyword winbatchImplicit wndlgbrowse wndlgcon wndlgcon2 wndlgcon3 syn keyword winbatchImplicit wndlgcon4 wndlgdiscon wndlgnoshare wndlgshare wngetcaps syn keyword winbatchImplicit wngetcon wngetuser wnnetnames wnrestore wnservers wnsharecnt syn keyword winbatchImplicit wnsharename wnsharepath wnshares wntaccessadd wntaccessdel syn keyword winbatchImplicit wntaccessget wntadddrive wntaddprinter wntcancelcon wntdirdialog syn keyword winbatchImplicit wntgetcon wntgetuser wntlistgroups wntmemberdel wntmemberget syn keyword winbatchImplicit wntmembergrps wntmemberlist wntmemberset wntresources wntshareadd syn keyword winbatchImplicit wntsharedel wntshareset wntversion wnversion wnwrkgroups wwenvunload syn keyword winbatchImplicit xbaseconvert xcursorset xdisklabelget xdriveready xextenderinfo syn keyword winbatchImplicit xgetchildhwnd xgetelapsed xhex xmemcompact xmessagebox syn keyword winbatchImplicit xsendmessage xverifyccard yield " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_winbatch_syntax_inits") if version < 508 let did_winbatch_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink winbatchLabel PreProc HiLink winbatchCtl Operator HiLink winbatchStatement Statement HiLink winbatchTodo Todo HiLink winbatchString String HiLink winbatchVar Type HiLink winbatchComment Comment HiLink winbatchImplicit Special HiLink winbatchNumber Number HiLink winbatchConstant StorageClass delcommand HiLink endif let b:current_syntax = "winbatch" " vim: ts=8
zyz2011-vim
runtime/syntax/winbatch.vim
Vim Script
gpl2
12,548
" Vim syntax file for Fvwm-2.5.22 " Language: Fvwm{1,2} configuration file " Maintainer: Gautam Iyer <gi1242@users.sourceforge.net> " Previous Maintainer: Haakon Riiser <hakonrk@fys.uio.no> " Last Change: Sat 29 Sep 2007 11:08:34 AM PDT " " Thanks to David Necas (Yeti) for adding Fvwm 2.4 support. " " 2006-05-09 gi1242: Rewrote fvwm2 syntax completely. Also since fvwm1 is now " mostly obsolete, made the syntax file pick fvwm2 syntax by default. if exists("b:current_syntax") finish endif let s:keepcpo= &cpo set cpo&vim " Fvwm configuration files are case insensitive syn case ignore " Identifiers in Fvwm can contain most characters, so we only " include the most common ones here. setlocal iskeyword=_,-,+,.,a-z,A-Z,48-57 " Syntax items common to fvwm1 and fvwm2 config files syn cluster fvwmConstants contains=fvwmEnvVar,fvwmNumber syn match fvwmEnvVar "\$\w\+" syn match fvwmNumber '\v<(\d+|0x[0-9a-f]+)>' syn match fvwmModConf nextgroup=fvwmModArg "\v^\s*\*\a+" syn region fvwmModArg contained contains=fvwmString,fvwmRGBValue \ start='.' skip='\\$' end='$' syn region fvwmString contains=fvwmBackslash start='"' \ matchgroup=fvwmBackslash skip='\v\\"' end='"' syn region fvwmString contains=fvwmBackslash start='`' \ matchgroup=fvwmBackslash skip='\v\\`' end='`' syn region fvwmString contains=fvwmBackslash start="'" \ matchgroup=fvwmBackslash skip="\v\\'" end="'" syn match fvwmBackslash contained '\\[^"'`]' syn match fvwmRGBValue "#\x\{3}" syn match fvwmRGBValue "#\x\{6}" syn match fvwmRGBValue "#\x\{9}" syn match fvwmRGBValue "#\x\{12}" syn match fvwmRGBValue "rgb:\x\{1,4}/\x\{1,4}/\x\{1,4}" syn region fvwmComment contains=@Spell \ start='^\s*#\s' skip='\\$' end='$' syn region fvwmComment start="\v^\s*#(\S|$)" skip='\\$' end='$' if (exists("b:fvwm_version") && b:fvwm_version == 1) \ || (exists("use_fvwm_1") && use_fvwm_1) " " Syntax highlighting for Fvwm1 files. " " Moved from common syntax items syn match fvwmModule "\<Module\s\+\w\+"he=s+6 syn keyword fvwmExec Exec syn match fvwmPath "\<IconPath\s.*$"lc=8 contains=fvwmEnvVar syn match fvwmPath "\<ModulePath\s.*$"lc=10 contains=fvwmEnvVar syn match fvwmPath "\<PixmapPath\s.*$"lc=10 contains=fvwmEnvVar syn match fvwmKey "\<Key\s\+\w\+"he=s+3 " fvwm1 specific items syn match fvwmEnvVar "\$(\w\+)" syn match fvwmWhitespace contained "\s\+" syn region fvwmStyle oneline keepend \ contains=fvwmString,fvwmKeyword,fvwmWhiteSpace \ matchgroup=fvwmFunction \ start="^\s*Style\>"hs=e-5 end="$" syn keyword fvwmFunction AppsBackingStore AutoRaise BackingStore Beep \ BoundaryWidth ButtonStyle CenterOnCirculate \ CirculateDown CirculateHit CirculateSkip \ CirculateSkipIcons CirculateUp ClickTime \ ClickToFocus Close Cursor CursorMove \ DecorateTransients Delete Desk DeskTopScale \ DeskTopSize Destroy DontMoveOff \ EdgeResistance EdgeScroll EndFunction \ EndMenu EndPopup Focus Font Function \ GotoPage HiBackColor HiForeColor Icon \ IconBox IconFont Iconify IconPath Key \ Lenience Lower Maximize MenuBackColor \ MenuForeColor MenuStippleColor Module \ ModulePath Mouse Move MWMBorders MWMButtons \ MWMDecorHints MWMFunctionHints \ MWMHintOverride MWMMenus NoBorder \ NoBoundaryWidth Nop NoPPosition NoTitle \ OpaqueMove OpaqueResize Pager PagerBackColor \ PagerFont PagerForeColor PagingDefault \ PixmapPath Popup Quit Raise RaiseLower \ RandomPlacement Refresh Resize Restart \ SaveUnders Scroll SloppyFocus SmartPlacement \ StartsOnDesk StaysOnTop StdBackColor \ StdForeColor Stick Sticky StickyBackColor \ StickyForeColor StickyIcons \ StubbornIconPlacement StubbornIcons \ StubbornPlacement SuppressIcons Title \ TogglePage Wait Warp WindowFont WindowList \ WindowListSkip WindowsDesk WindowShade \ XORvalue " These keywords are only used after the "Style" command. To avoid " name collision with several commands, they are contained. syn keyword fvwmKeyword contained \ BackColor BorderWidth BoundaryWidth Button \ CirculateHit CirculateSkip Color DoubleClick \ ForeColor Handles HandleWidth Icon IconTitle \ NoBorder NoBoundaryWidth NoButton NoHandles \ NoIcon NoIconTitle NoTitle Slippery \ StartIconic StartNormal StartsAnyWhere \ StartsOnDesk StaysOnTop StaysPut Sticky \ Title WindowListHit WindowListSkip " elseif (exists("b:fvwm_version") && b:fvwm_version == 2) " \ || (exists("use_fvwm_2") && use_fvwm_2) else " " Syntax highlighting for fvwm2 files. " syn match fvwmEnvVar "\${\w\+}" syn match fvwmEnvVar "\$\[[^]]\+\]" syn match fvwmEnvVar "\$[$0-9*]" syn match fvwmDef contains=fvwmMenuString,fvwmWhitespace \ '^\s*+\s*".\{-}"' syn region fvwmMenuString contains=fvwmIcon,fvwmShortcutKey \ start='^\s*+\s*\zs"' skip='\v\\\\|\\\"' end='"' syn region fvwmIcon contained start='\v\%\%@!' end='%' syn match fvwmShortcutKey contained "&." syn keyword fvwmModuleName FvwmAnimate FvwmAudio FvwmAuto FvwmBacker \ FvwmBanner FvwmButtons FvwmCascade \ FvwmCommandS FvwmConsole FvwmConsoleC \ FvwmCpp FvwmDebug FvwmDragWell FvwmEvent \ FvwmForm FvwmGtkDebug FvwmIconBox \ FvwmIconMan FvwmIdent FvwmM4 FvwmPager \ FvwmPerl FvwmProxy FvwmRearrange FvwmSave \ FvwmSaveDesk FvwmScript FvwmScroll FvwmTabs \ FvwmTalk FvwmTaskBar FvwmTheme FvwmTile \ FvwmWharf FvwmWindowMenu FvwmWinList " Obsolete fvwmModuleName: FvwmTheme syn keyword fvwmKeyword AddToMenu ChangeMenuStyle CopyMenuStyle \ DestroyMenu DestroyMenuStyle Menu \ Popup TearMenuOff Title BugOpts BusyCursor \ ClickTime ColorLimit ColormapFocus \ DefaultColors DefaultColorset DefaultFont \ DefaultIcon DefaultLayers Deschedule Emulate \ EscapeFunc FakeClick FakeKeypress GlobalOpts \ HilightColor HilightColorset IconFont \ PrintInfo Repeat Schedule State WindowFont \ XSync XSynchronize AnimatedMove \ HideGeometryWindow Layer Lower Move \ MoveToDesk MoveThreshold MoveToPage \ MoveToScreen OpaqueMoveSize PlaceAgain Raise \ RaiseLower ResizeMaximize ResizeMove \ ResizeMoveMaximize RestackTransients \ SetAnimation SnapAttraction SnapGrid \ WindowsDesk XorPixmap XorValue CursorMove \ FlipFocus Focus WarpToWindow Close Delete \ Destroy Iconify Recapture RecaptureWindow \ Refresh RefreshWindow Stick StickAcrossPages \ StickAcrossDesks WindowShade \ WindowShadeAnimate IgnoreModifiers \ EdgeCommand EdgeLeaveCommand GnomeButton \ Stroke StrokeFunc FocusStyle DestroyStyle \ DestroyWindowStyle UpdateStyles AddToDecor \ BorderStyle ChangeDecor DestroyDecor \ UpdateDecor DesktopName DeskTopSize \ EdgeResistance EdgeScroll EdgeThickness \ EwmhBaseStruts EWMHNumberOfDesktops \ GotoDeskAndPage GotoPage Scroll Xinerama \ XineramaPrimaryScreen XineramaSls \ XineramaSlsSize XineramaSlsScreens AddToFunc \ Beep DestroyFunc Echo Exec ExecUseShell \ Function Nop PipeRead Read SetEnv Silent \ UnsetEnv Wait DestroyModuleConfig KillModule \ Module ModuleListenOnly ModuleSynchronous \ ModuleTimeout SendToModule Quit QuitScreen \ QuitSession Restart SaveSession \ SaveQuitSession KeepRc NoWindow Break \ CleanupColorsets EchoFuncDefinition " Conditional commands syn keyword fvwmKeyword nextgroup=fvwmCondition skipwhite \ All Any Current Next None Pick PointerWindow \ Prev ThisWindow syn keyword fvwmKeyword nextgroup=fvwmDirection skipwhite \ Direction syn keyword fvwmDirection contained nextgroup=fvwmDirection skipwhite \ FromPointer syn keyword fvwmDirection contained nextgroup=fvwmCondition skipwhite \ North Northeast East Southeast South \ Southwest West Northwest Center syn region fvwmCondition contained contains=fvwmCondNames,fvwmString \ matchgroup=fvwmKeyword start='(' skip=',' \ end=')' syn keyword fvwmCondNames contained \ AcceptsFocus AnyScreen CirculateHit \ CirculateHitIcon CirculateHitShaded Closable \ CurrentDesk CurrentGlobalPage \ CurrentGlobalPageAnyDesk CurrentPage \ CurrentPageAnyDesk CurrentScreen FixedSize \ Focused HasHandles HasPointer Iconic \ Iconifiable Maximizable Maximized \ Overlapped PlacedByButton PlacedByButton3 \ PlacedByFvwm Raised Shaded Sticky \ StickyAcrossDesks StickyAcrossPages \ Transient Visible StickyIcon \ StickyAcrossPagesIcon StickyAcrossDesksIcon syn keyword fvwmCondNames contained skipwhite nextgroup=@fvwmConstants \ State Layer " Test syn keyword fvwmKeyword nextgroup=fvwmTCond skipwhite \ Test syn region fvwmTCond contained contains=fvwmTCNames,fvwmString \ matchgroup=fvwmKeyword start='(' end=')' syn keyword fvwmTCNames contained \ Version EnvIsSet EnvMatch EdgeHasPointer \ EdgeIsActive Start Init Restart Exit Quit \ ToRestart True False F R W X I " TestRc syn keyword fvwmKeyword nextgroup=fvwmTRCond skipwhite \ TestRc syn region fvwmTRCond contained contains=fvwmTRNames,fvwmNumber \ matchgroup=fvwmKeyword start='(' end=')' syn keyword fvwmTRNames contained NoMatch Match Error Break " Colorsets syn keyword fvwmKeyword nextgroup=fvwmCSArgs skipwhite \ ColorSet syn region fvwmCSArgs contained transparent contains=fvwmCSNames,@fvwmConstants,fvwmString,fvwmRGBValue,fvwmGradient \ start='.' skip='\\$' end='$' syn keyword fvwmCSNames contained \ fg Fore Foreground bg Back Background hi \ Hilite Hilight sh Shade Shadow fgsh Pixmap \ TiledPixmap AspectPixmap RootTransparent \ Shape TiledShape AspectShape Tint fgTint \ bgTint Alpha fgAlpha Dither IconTint \ IconAlpha NoShape Plain Translucent syn match fvwmCSNames contained '\v<Transparent>' syn match fvwmGradient contained '\v<[HVDBSCRY]Gradient>' " Styles syn keyword fvwmKeyword nextgroup=fvwmStyleArgs skipwhite \ Style WindowStyle syn region fvwmStyleArgs contained transparent contains=fvwmStyleNames,@fvwmConstants,fvwmString,fvwmRGBValue \ start='.' skip='\\$' end='$' syn keyword fvwmStyleNames contained \ BorderWidth HandleWidth NoIcon Icon MiniIcon \ IconBox IconGrid IconFill IconSize NoTitle \ Title TitleAtBottom TitleAtLeft TitleAtRight \ TitleAtTop LeftTitleRotatedCW \ LeftTitleRotatedCCW RightTitleRotatedCCW \ RightTitleRotatedCW TopTitleRotated \ TopTitleNotRotated BottomTitleRotated \ BottomTitleNotRotated UseTitleDecorRotation \ StippledTitle StippledTitleOff \ IndexedWindowName ExactWindowName \ IndexedIconName ExactIconName Borders \ NoHandles Handles WindowListSkip \ WindowListHit CirculateSkip CirculateHit \ CirculateSkipShaded CirculateHitShaded Layer \ StaysOnTop StaysOnBottom StaysPut Sticky \ Slippery StickyAcrossPages StickyAcrossDesks \ StartIconic StartNormal Color ForeColor \ BackColor Colorset HilightFore HilightBack \ HilightColorset BorderColorset \ HilightBorderColorset IconTitleColorset \ HilightIconTitleColorset \ IconBackgroundColorset IconTitleRelief \ IconBackgroundRelief IconBackgroundPadding \ Font IconFont StartsOnDesk StartsOnPage \ StartsAnyWhere StartsOnScreen \ ManualPlacementHonorsStartsOnPage \ ManualPlacementIgnoresStartsOnPage \ CaptureHonorsStartsOnPage \ CaptureIgnoresStartsOnPage \ RecaptureHonorsStartsOnPage \ RecaptureIgnoresStartsOnPage \ StartsOnPageIncludesTransients \ StartsOnPageIgnoresTransients IconTitle \ NoIconTitle MwmButtons FvwmButtons MwmBorder \ FvwmBorder MwmDecor NoDecorHint MwmFunctions \ NoFuncHint HintOverride NoOverride NoButton \ Button ResizeHintOverride NoResizeOverride \ OLDecor NoOLDecor GNOMEUseHints \ GNOMEIgnoreHints StickyIcon SlipperyIcon \ StickyAcrossPagesIcon StickyAcrossDesksIcon \ ManualPlacement CascadePlacement \ MinOverlapPlacement \ MinOverlapPercentPlacement \ TileManualPlacement TileCascadePlacement \ MinOverlapPlacementPenalties \ MinOverlapPercentPlacementPenalties \ DecorateTransient NakedTransient \ DontRaiseTransient RaiseTransient \ DontLowerTransient LowerTransient \ DontStackTransientParent \ StackTransientParent SkipMapping ShowMapping \ ScatterWindowGroups KeepWindowGroupsOnDesk \ UseDecor UseStyle NoPPosition UsePPosition \ NoUSPosition UseUSPosition \ NoTransientPPosition UseTransientPPosition \ NoTransientUSPosition UseTransientUSPosition \ NoIconPosition UseIconPosition Lenience \ NoLenience ClickToFocus SloppyFocus \ MouseFocus FocusFollowsMouse NeverFocus \ ClickToFocusPassesClickOff \ ClickToFocusPassesClick \ ClickToFocusRaisesOff ClickToFocusRaises \ MouseFocusClickRaises \ MouseFocusClickRaisesOff GrabFocus \ GrabFocusOff GrabFocusTransientOff \ GrabFocusTransient FPFocusClickButtons \ FPFocusClickModifiers \ FPSortWindowlistByFocus FPClickRaisesFocused \ FPClickDecorRaisesFocused \ FPClickIconRaisesFocused \ FPClickRaisesUnfocused \ FPClickDecorRaisesUnfocused \ FPClickIconRaisesUnfocused FPClickToFocus \ FPClickDecorToFocus FPClickIconToFocus \ FPEnterToFocus FPLeaveToUnfocus \ FPFocusByProgram FPFocusByFunction \ FPFocusByFunctionWarpPointer FPLenient \ FPPassFocusClick FPPassRaiseClick \ FPIgnoreFocusClickMotion \ FPIgnoreRaiseClickMotion \ FPAllowFocusClickFunction \ FPAllowRaiseClickFunction FPGrabFocus \ FPGrabFocusTransient FPOverrideGrabFocus \ FPReleaseFocus FPReleaseFocusTransient \ FPOverrideReleaseFocus StartsLowered \ StartsRaised IgnoreRestack AllowRestack \ FixedPosition VariablePosition \ FixedUSPosition VariableUSPosition \ FixedPPosition VariablePPosition FixedSize \ VariableSize FixedUSSize VariableUSSize \ FixedPSize VariablePSize Closable \ Iconifiable Maximizable \ AllowMaximizeFixedSize IconOverride \ NoIconOverride NoActiveIconOverride \ DepressableBorder FirmBorder MaxWindowSize \ IconifyWindowGroups IconifyWindowGroupsOff \ ResizeOpaque ResizeOutline BackingStore \ BackingStoreOff BackingStoreWindowDefault \ Opacity ParentalRelativity SaveUnder \ SaveUnderOff WindowShadeShrinks \ WindowShadeScrolls WindowShadeSteps \ WindowShadeAlwaysLazy WindowShadeBusy \ WindowShadeLazy EWMHDonateIcon \ EWMHDontDonateIcon EWMHDonateMiniIcon \ EWMHDontDonateMiniIcon EWMHMiniIconOverride \ EWMHNoMiniIconOverride \ EWMHUseStackingOrderHints \ EWMHIgnoreStackingOrderHints \ EWMHIgnoreStateHints EWMHUseStateHints \ EWMHIgnoreStrutHints EWMHIgnoreWindowType \ EWMHUseStrutHints \ EWMHMaximizeIgnoreWorkingArea \ EWMHMaximizeUseWorkingArea \ EWMHMaximizeUseDynamicWorkingArea \ EWMHPlacementIgnoreWorkingArea \ EWMHPlacementUseWorkingArea \ EWMHPlacementUseDynamicWorkingArea \ MoveByProgramMethod Unmanaged State \ StippledIconTitle StickyStippledTitle \ StickyStippledIconTitle \ PositionPlacement \ UnderMousePlacementHonorsStartsOnPage \ UnderMousePlacementIgnoresStartsOnPage \ MinOverlapPlacementPenalties \ MinOverlapPercentPlacementPenalties \ MinWindowSize StartShaded " Cursor styles syn keyword fvwmKeyword nextgroup=fvwmCursorStyle skipwhite \ CursorStyle syn case match syn keyword fvwmCursorStyle contained \ POSITION TITLE DEFAULT SYS MOVE RESIZE WAIT \ MENU SELECT DESTROY TOP RIGHT BOTTOM LEFT \ TOP_LEFT TOP_RIGHT BOTTOM_LEFT BOTTOM_RIGHT \ TOP_EDGE RIGHT_EDGE BOTTOM_EDGE LEFT_EDGE \ ROOT STROKE syn case ignore " Menu style syn keyword fvwmKeyword nextgroup=fvwmMStyleArgs skipwhite \ MenuStyle syn region fvwmMStyleArgs contained transparent contains=fvwmMStyleNames,@fvwmConstants,fvwmString,fvwmGradient,fvwmRGBValue \ start='.' skip='\\$' end='$' syn keyword fvwmMStyleNames contained \ Fvwm Mwm Win BorderWidth Foreground \ Background Greyed HilightBack HilightBackOff \ ActiveFore ActiveForeOff MenuColorset \ ActiveColorset GreyedColorset Hilight3DThick \ Hilight3DThin Hilight3DOff \ Hilight3DThickness Animation AnimationOff \ Font MenuFace PopupDelay PopupOffset \ TitleWarp TitleWarpOff TitleUnderlines0 \ TitleUnderlines1 TitleUnderlines2 \ SeparatorsLong SeparatorsShort \ TrianglesSolid TrianglesRelief \ PopupImmediately PopupDelayed \ PopdownImmediately PopdownDelayed \ PopupActiveArea DoubleClickTime SidePic \ SideColor PopupAsRootMenu PopupAsSubmenu \ PopupIgnore PopupClose RemoveSubmenus \ HoldSubmenus SubmenusRight SubmenusLeft \ SelectOnRelease ItemFormat \ VerticalItemSpacing VerticalTitleSpacing \ AutomaticHotkeys AutomaticHotkeysOff \ TitleFont TitleColorset HilightTitleBack " Button style syn keyword fvwmKeyword nextgroup=fvwmBNum skipwhite \ ButtonStyle AddButtonStyle syn match fvwmBNum contained \ nextgroup=fvwmBState,fvwmBStyleArgs skipwhite \ '\v<([0-9]|All|Left|Right|Reset)>' syn keyword fvwmBState contained nextgroup=fvwmBStyleArgs skipwhite \ ActiveUp ActiveDown InactiveUp InactiveDown \ Active Inactive ToggledActiveUp \ ToggledActiveDown ToggledInactiveUp \ ToggledInactiveDown ToggledActive \ ToggledInactive AllNormal AllToggled \ AllActive AllInactive AllUp AllDown syn region fvwmBStyleArgs contained contains=fvwmBStyleFlags,fvwmBStyleNames,fvwmGradient,fvwmRGBValue,@fvwmConstants,fvwmString \ start='\S' skip='\\$' end='$' syn keyword fvwmBStyleNames contained \ Simple Default Solid Colorset Vector Pixmap \ AdjustedPixmap ShrunkPixmap StretchedPixmap \ TiledPixmap MiniIcon syn keyword fvwmBStyleFlags contained \ Raised Sunk Flat UseTitleStyle \ UseBorderStyle " Border style syn keyword fvwmKeyword skipwhite nextgroup=fvwmBdState,fvwmBdStyleArgs \ BorderStyle syn keyword fvwmBdState contained skipwhite nextgroup=fvwmBdStyleArgs \ Active Inactive syn region fvwmBdStyleArgs contained contains=fvwmBdStyNames,fvwmBdStyFlags \ start='\S' skip='\\$' end='$' syn keyword fvwmBdStyNames contained \ TiledPixmap Colorset syn keyword fvwmBdStyFlags contained \ HiddenHandles NoInset Raised Sunk Flat " Title styles syn keyword fvwmKeyword skipwhite nextgroup=fvwmTState,fvwmTStyleArgs \ TitleStyle AddTitleStyle syn keyword fvwmTState contained skipwhite nextgroup=fvwmTStyleArgs \ ActiveUp ActiveDown InactiveUp InactiveDown \ Active Inactive ToggledActiveUp \ ToggledActiveDown ToggledInactiveUp \ ToggledInactiveDown ToggledActive \ ToggledInactive AllNormal AllToggled \ AllActive AllInactive AllUp AllDown syn region fvwmTStyleArgs contained contains=fvwmBStyleNames,fvwmTStyleNames,fvwmMPmapNames,fvwmTStyleFlags,fvwmGradient,fvwmRGBValue,@fvwmConstants \ start='\S' skip='\\$' end='$' syn keyword fvwmTStyleNames contained \ MultiPixmap syn keyword fvwmTStyleNames contained \ LeftJustified Centered RightJustified Height \ MinHeight syn keyword fvwmMPmapNames contained \ Main LeftMain RightMain UnderText LeftOfText \ RightOfText LeftEnd RightEnd Buttons \ LeftButtons RightButtons syn keyword fvwmTStyleFlags contained \ Raised Flat Sunk " Button state syn keyword fvwmKeyword nextgroup=fvwmBStateArgs \ ButtonState syn region fvwmBStateArgs contained contains=fvwmBStateTF,fvwmBStateNames \ start='.' skip='\\$' end='$' syn keyword fvwmBStateNames contained ActiveDown Inactive InactiveDown syn keyword fvwmBStateTF contained True False " Paths syn keyword fvwmKeyword nextgroup=fvwmPath skipwhite \ IconPath ImagePath LocalePath PixmapPath \ ModulePath syn match fvwmPath contained contains=fvwmEnvVar '\v.+$' " Window list command syn keyword fvwmKeyword nextgroup=fvwmWLArgs skipwhite \ WindowList syn region fvwmWLArgs contained \ contains=fvwmCondition,@fvwmConstants,fvwmString,fvwmWLOpts \ start='.' skip='\\$' end='$' syn keyword fvwmWLOpts contained \ Geometry NoGeometry NoGeometryWithInfo \ NoDeskNum NoNumInDeskTitle \ NoCurrentDeskTitle MaxLabelWidth width \ TitleForAllDesks Function funcname Desk \ desknum CurrentDesk NoIcons Icons OnlyIcons \ NoNormal Normal OnlyNormal NoSticky Sticky \ OnlySticky NoStickyAcrossPages \ StickyAcrossPages OnlyStickyAcrossPages \ NoStickyAcrossDesks StickyAcrossDesks \ OnlyStickyAcrossDesks NoOnTop OnTop \ OnlyOnTop NoOnBottom OnBottom OnlyOnBottom \ Layer UseListSkip OnlyListSkip NoDeskSort \ ReverseOrder CurrentAtEnd IconifiedAtEnd \ UseIconName Alphabetic NotAlphabetic \ SortByResource SortByClass NoHotkeys \ SelectOnRelease syn keyword fvwmSpecialFn StartFunction InitFunction RestartFunction \ ExitFunction SessionInitFunction \ SessionRestartFunction SessionExitFunction \ MissingSubmenuFunction WindowListFunc syn keyword fvwmKeyword skipwhite nextgroup=fvwmKeyWin,fvwmKeyName \ Key PointerKey syn region fvwmKeyWin contained skipwhite nextgroup=fvwmKeyName \ start='(' end=')' syn case match syn match fvwmKeyName contained skipwhite nextgroup=fvwmKeyContext \ '\v<([a-zA-Z0-9]|F\d+|KP_\d)>' syn keyword fvwmKeyName contained skipwhite nextgroup=fvwmKeyContext \ BackSpace Begin Break Cancel Clear Delete \ Down End Escape Execute Find Help Home \ Insert KP_Add KP_Begin KP_Decimal KP_Delete \ KP_Divide KP_Down KP_End KP_Enter KP_Equal \ KP_Home KP_Insert KP_Left KP_Multiply \ KP_Next KP_Page_Down KP_Page_Up KP_Prior \ KP_Right KP_Separator KP_Space KP_Subtract \ KP_Tab KP_Up Left Linefeed Menu Mode_switch \ Next Num_Lock Page_Down Page_Up Pause Print \ Prior Redo Return Right script_switch \ Scroll_Lock Select Sys_Req Tab Undo Up space \ exclam quotedbl numbersign dollar percent \ ampersand apostrophe quoteright parenleft \ parenright asterisk plus comma minus period \ slash colon semicolon less equal greater \ question at bracketleft backslash \ bracketright asciicircum underscore grave \ quoteleft braceleft bar braceright \ asciitilde syn match fvwmKeyContext contained skipwhite nextgroup=fvwmKeyMods \ '\v<[][RWDTS_F<^>vI0-9AM-]+>' syn match fvwmKeyMods contained '\v[NCSMLA1-5]+' syn case ignore syn keyword fvwmKeyword skipwhite nextgroup=fvwmMouseWin,fvwmMouseButton \ Mouse syn region fvwmMouseWin contained skipwhite nextgroup=fvwmMouseButton \ start='(' end=')' syn match fvwmMouseButton contained skipwhite nextgroup=fvwmKeyContext \ '[0-5]' endif " Define syntax highlighting groups " " Common highlighting groups " hi def link fvwmComment Comment hi def link fvwmEnvVar Macro hi def link fvwmNumber Number hi def link fvwmKeyword Keyword hi def link fvwmPath Constant hi def link fvwmModConf Macro hi def link fvwmRGBValue Constant hi def link fvwmString String hi def link fvwmBackslash SpecialChar " " Highlighting groups for fvwm1 specific items " hi def link fvwmExec fvwmKeyword hi def link fvwmKey fvwmKeyword hi def link fvwmModule fvwmKeyword hi def link fvwmFunction Function " " Highlighting groups for fvwm2 specific items " hi def link fvwmSpecialFn Type hi def link fvwmCursorStyle fvwmStyleNames hi def link fvwmStyleNames Identifier hi def link fvwmMStyleNames fvwmStyleNames hi def link fvwmCSNames fvwmStyleNames hi def link fvwmGradient fvwmStyleNames hi def link fvwmCondNames fvwmStyleNames hi def link fvwmTCNames fvwmStyleNames hi def link fvwmTRNames fvwmStyleNames hi def link fvwmWLOpts fvwmStyleNames hi def link fvwmBNum Number hi def link fvwmBState Type hi def link fvwmBStyleNames fvwmStyleNames hi def link fvwmBStyleFlags Special hi def link fvwmBStateTF Constant hi def link fvwmBStateNames fvwmStyleNames hi def link fvwmBdState fvwmBState hi def link fvwmBdStyNames fvwmStyleNames hi def link fvwmBdStyFlags fvwmBStyleFlags hi def link fvwmTState fvwmBState hi def link fvwmTStyleNames fvwmStyleNames hi def link fvwmMPmapNames fvwmBStyleFlags hi def link fvwmTStyleFlags fvwmBStyleFlags hi def link fvwmDirection fvwmBStyleFlags hi def link fvwmKeyWin Constant hi def link fvwmMouseWin fvwmKeyWin hi def link fvwmKeyName Special hi def link fvwmKeyContext fvwmKeyName hi def link fvwmKeyMods fvwmKeyName hi def link fvwmMouseButton fvwmKeyName hi def link fvwmMenuString String hi def link fvwmIcon Type hi def link fvwmShortcutKey SpecialChar hi def link fvwmModuleName Function let b:current_syntax = "fvwm" let &cpo = s:keepcpo unlet s:keepcpo
zyz2011-vim
runtime/syntax/fvwm.vim
Vim Script
gpl2
25,026
" Vim syntax file " Language: Lisp " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> " Last Change: Nov 16, 2010 " Version: 22 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Thanks to F Xavier Noria for a list of 978 Common Lisp symbols " taken from the HyperSpec " Clisp additions courtesy of http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/emacs/lisp.vim " --------------------------------------------------------------------- " Load Once: {{{1 " For vim-version 5.x: Clear all syntax items " For vim-version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif if version >= 600 setlocal iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_ else set iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_ endif if exists("g:lispsyntax_ignorecase") || exists("g:lispsyntax_clisp") set ignorecase endif " --------------------------------------------------------------------- " Clusters: {{{1 syn cluster lispAtomCluster contains=lispAtomBarSymbol,lispAtomList,lispAtomNmbr0,lispComment,lispDecl,lispFunc,lispLeadWhite syn cluster lispBaseListCluster contains=lispAtom,lispAtomBarSymbol,lispAtomMark,lispBQList,lispBarSymbol,lispComment,lispConcat,lispDecl,lispFunc,lispKey,lispList,lispNumber,lispEscapeSpecial,lispSymbol,lispVar,lispLeadWhite if exists("g:lisp_instring") syn cluster lispListCluster contains=@lispBaseListCluster,lispString,lispInString,lispInStringString else syn cluster lispListCluster contains=@lispBaseListCluster,lispString endif syn case ignore " --------------------------------------------------------------------- " Lists: {{{1 syn match lispSymbol contained ![^()'`,"; \t]\+! syn match lispBarSymbol contained !|..\{-}|! if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 syn region lispParen0 matchgroup=hlLevel0 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen1 syn region lispParen1 contained matchgroup=hlLevel1 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen2 syn region lispParen2 contained matchgroup=hlLevel2 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen3 syn region lispParen3 contained matchgroup=hlLevel3 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen4 syn region lispParen4 contained matchgroup=hlLevel4 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen5 syn region lispParen5 contained matchgroup=hlLevel5 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen6 syn region lispParen6 contained matchgroup=hlLevel6 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen7 syn region lispParen7 contained matchgroup=hlLevel7 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen8 syn region lispParen8 contained matchgroup=hlLevel8 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen9 syn region lispParen9 contained matchgroup=hlLevel9 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen0 else syn region lispList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@lispListCluster syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster endif " --------------------------------------------------------------------- " Atoms: {{{1 syn match lispAtomMark "'" syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark syn region lispAtom start=+'"+ skip=+\\"+ end=+"+ syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString,lispEscapeSpecial syn match lispAtomNmbr contained "\<\d\+" syn match lispLeadWhite contained "^\s\+" " --------------------------------------------------------------------- " Standard Lisp Functions and Macros: {{{1 syn keyword lispFunc * find-method pprint-indent syn keyword lispFunc ** find-package pprint-linear syn keyword lispFunc *** find-restart pprint-logical-block syn keyword lispFunc + find-symbol pprint-newline syn keyword lispFunc ++ finish-output pprint-pop syn keyword lispFunc +++ first pprint-tab syn keyword lispFunc - fixnum pprint-tabular syn keyword lispFunc / flet prin1 syn keyword lispFunc // float prin1-to-string syn keyword lispFunc /// float-digits princ syn keyword lispFunc /= float-precision princ-to-string syn keyword lispFunc 1+ float-radix print syn keyword lispFunc 1- float-sign print-not-readable syn keyword lispFunc < floating-point-inexact print-not-readable-object syn keyword lispFunc <= floating-point-invalid-operation print-object syn keyword lispFunc = floating-point-overflow print-unreadable-object syn keyword lispFunc > floating-point-underflow probe-file syn keyword lispFunc >= floatp proclaim syn keyword lispFunc abort floor prog syn keyword lispFunc abs fmakunbound prog* syn keyword lispFunc access force-output prog1 syn keyword lispFunc acons format prog2 syn keyword lispFunc acos formatter progn syn keyword lispFunc acosh fourth program-error syn keyword lispFunc add-method fresh-line progv syn keyword lispFunc adjoin fround provide syn keyword lispFunc adjust-array ftruncate psetf syn keyword lispFunc adjustable-array-p ftype psetq syn keyword lispFunc allocate-instance funcall push syn keyword lispFunc alpha-char-p function pushnew syn keyword lispFunc alphanumericp function-keywords putprop syn keyword lispFunc and function-lambda-expression quote syn keyword lispFunc append functionp random syn keyword lispFunc apply gbitp random-state syn keyword lispFunc applyhook gcd random-state-p syn keyword lispFunc apropos generic-function rassoc syn keyword lispFunc apropos-list gensym rassoc-if syn keyword lispFunc aref gentemp rassoc-if-not syn keyword lispFunc arithmetic-error get ratio syn keyword lispFunc arithmetic-error-operands get-decoded-time rational syn keyword lispFunc arithmetic-error-operation get-dispatch-macro-character rationalize syn keyword lispFunc array get-internal-real-time rationalp syn keyword lispFunc array-dimension get-internal-run-time read syn keyword lispFunc array-dimension-limit get-macro-character read-byte syn keyword lispFunc array-dimensions get-output-stream-string read-char syn keyword lispFunc array-displacement get-properties read-char-no-hang syn keyword lispFunc array-element-type get-setf-expansion read-delimited-list syn keyword lispFunc array-has-fill-pointer-p get-setf-method read-eval-print syn keyword lispFunc array-in-bounds-p get-universal-time read-from-string syn keyword lispFunc array-rank getf read-line syn keyword lispFunc array-rank-limit gethash read-preserving-whitespace syn keyword lispFunc array-row-major-index go read-sequence syn keyword lispFunc array-total-size graphic-char-p reader-error syn keyword lispFunc array-total-size-limit handler-bind readtable syn keyword lispFunc arrayp handler-case readtable-case syn keyword lispFunc ash hash-table readtablep syn keyword lispFunc asin hash-table-count real syn keyword lispFunc asinh hash-table-p realp syn keyword lispFunc assert hash-table-rehash-size realpart syn keyword lispFunc assoc hash-table-rehash-threshold reduce syn keyword lispFunc assoc-if hash-table-size reinitialize-instance syn keyword lispFunc assoc-if-not hash-table-test rem syn keyword lispFunc atan host-namestring remf syn keyword lispFunc atanh identity remhash syn keyword lispFunc atom if remove syn keyword lispFunc base-char if-exists remove-duplicates syn keyword lispFunc base-string ignorable remove-if syn keyword lispFunc bignum ignore remove-if-not syn keyword lispFunc bit ignore-errors remove-method syn keyword lispFunc bit-and imagpart remprop syn keyword lispFunc bit-andc1 import rename-file syn keyword lispFunc bit-andc2 in-package rename-package syn keyword lispFunc bit-eqv in-package replace syn keyword lispFunc bit-ior incf require syn keyword lispFunc bit-nand initialize-instance rest syn keyword lispFunc bit-nor inline restart syn keyword lispFunc bit-not input-stream-p restart-bind syn keyword lispFunc bit-orc1 inspect restart-case syn keyword lispFunc bit-orc2 int-char restart-name syn keyword lispFunc bit-vector integer return syn keyword lispFunc bit-vector-p integer-decode-float return-from syn keyword lispFunc bit-xor integer-length revappend syn keyword lispFunc block integerp reverse syn keyword lispFunc boole interactive-stream-p room syn keyword lispFunc boole-1 intern rotatef syn keyword lispFunc boole-2 internal-time-units-per-second round syn keyword lispFunc boole-and intersection row-major-aref syn keyword lispFunc boole-andc1 invalid-method-error rplaca syn keyword lispFunc boole-andc2 invoke-debugger rplacd syn keyword lispFunc boole-c1 invoke-restart safety syn keyword lispFunc boole-c2 invoke-restart-interactively satisfies syn keyword lispFunc boole-clr isqrt sbit syn keyword lispFunc boole-eqv keyword scale-float syn keyword lispFunc boole-ior keywordp schar syn keyword lispFunc boole-nand labels search syn keyword lispFunc boole-nor lambda second syn keyword lispFunc boole-orc1 lambda-list-keywords sequence syn keyword lispFunc boole-orc2 lambda-parameters-limit serious-condition syn keyword lispFunc boole-set last set syn keyword lispFunc boole-xor lcm set-char-bit syn keyword lispFunc boolean ldb set-difference syn keyword lispFunc both-case-p ldb-test set-dispatch-macro-character syn keyword lispFunc boundp ldiff set-exclusive-or syn keyword lispFunc break least-negative-double-float set-macro-character syn keyword lispFunc broadcast-stream least-negative-long-float set-pprint-dispatch syn keyword lispFunc broadcast-stream-streams least-negative-normalized-double-float set-syntax-from-char syn keyword lispFunc built-in-class least-negative-normalized-long-float setf syn keyword lispFunc butlast least-negative-normalized-short-float setq syn keyword lispFunc byte least-negative-normalized-single-float seventh syn keyword lispFunc byte-position least-negative-short-float shadow syn keyword lispFunc byte-size least-negative-single-float shadowing-import syn keyword lispFunc call-arguments-limit least-positive-double-float shared-initialize syn keyword lispFunc call-method least-positive-long-float shiftf syn keyword lispFunc call-next-method least-positive-normalized-double-float short-float syn keyword lispFunc capitalize least-positive-normalized-long-float short-float-epsilon syn keyword lispFunc car least-positive-normalized-short-float short-float-negative-epsilon syn keyword lispFunc case least-positive-normalized-single-float short-site-name syn keyword lispFunc catch least-positive-short-float signal syn keyword lispFunc ccase least-positive-single-float signed-byte syn keyword lispFunc cdr length signum syn keyword lispFunc ceiling let simple-condition syn keyword lispFunc cell-error let* simple-array syn keyword lispFunc cell-error-name lisp simple-base-string syn keyword lispFunc cerror lisp-implementation-type simple-bit-vector syn keyword lispFunc change-class lisp-implementation-version simple-bit-vector-p syn keyword lispFunc char list simple-condition-format-arguments syn keyword lispFunc char-bit list* simple-condition-format-control syn keyword lispFunc char-bits list-all-packages simple-error syn keyword lispFunc char-bits-limit list-length simple-string syn keyword lispFunc char-code listen simple-string-p syn keyword lispFunc char-code-limit listp simple-type-error syn keyword lispFunc char-control-bit load simple-vector syn keyword lispFunc char-downcase load-logical-pathname-translations simple-vector-p syn keyword lispFunc char-equal load-time-value simple-warning syn keyword lispFunc char-font locally sin syn keyword lispFunc char-font-limit log single-flaot-epsilon syn keyword lispFunc char-greaterp logand single-float syn keyword lispFunc char-hyper-bit logandc1 single-float-epsilon syn keyword lispFunc char-int logandc2 single-float-negative-epsilon syn keyword lispFunc char-lessp logbitp sinh syn keyword lispFunc char-meta-bit logcount sixth syn keyword lispFunc char-name logeqv sleep syn keyword lispFunc char-not-equal logical-pathname slot-boundp syn keyword lispFunc char-not-greaterp logical-pathname-translations slot-exists-p syn keyword lispFunc char-not-lessp logior slot-makunbound syn keyword lispFunc char-super-bit lognand slot-missing syn keyword lispFunc char-upcase lognor slot-unbound syn keyword lispFunc char/= lognot slot-value syn keyword lispFunc char< logorc1 software-type syn keyword lispFunc char<= logorc2 software-version syn keyword lispFunc char= logtest some syn keyword lispFunc char> logxor sort syn keyword lispFunc char>= long-float space syn keyword lispFunc character long-float-epsilon special syn keyword lispFunc characterp long-float-negative-epsilon special-form-p syn keyword lispFunc check-type long-site-name special-operator-p syn keyword lispFunc cis loop speed syn keyword lispFunc class loop-finish sqrt syn keyword lispFunc class-name lower-case-p stable-sort syn keyword lispFunc class-of machine-instance standard syn keyword lispFunc clear-input machine-type standard-char syn keyword lispFunc clear-output machine-version standard-char-p syn keyword lispFunc close macro-function standard-class syn keyword lispFunc clrhash macroexpand standard-generic-function syn keyword lispFunc code-char macroexpand-1 standard-method syn keyword lispFunc coerce macroexpand-l standard-object syn keyword lispFunc commonp macrolet step syn keyword lispFunc compilation-speed make-array storage-condition syn keyword lispFunc compile make-array store-value syn keyword lispFunc compile-file make-broadcast-stream stream syn keyword lispFunc compile-file-pathname make-char stream-element-type syn keyword lispFunc compiled-function make-concatenated-stream stream-error syn keyword lispFunc compiled-function-p make-condition stream-error-stream syn keyword lispFunc compiler-let make-dispatch-macro-character stream-external-format syn keyword lispFunc compiler-macro make-echo-stream streamp syn keyword lispFunc compiler-macro-function make-hash-table streamup syn keyword lispFunc complement make-instance string syn keyword lispFunc complex make-instances-obsolete string-capitalize syn keyword lispFunc complexp make-list string-char syn keyword lispFunc compute-applicable-methods make-load-form string-char-p syn keyword lispFunc compute-restarts make-load-form-saving-slots string-downcase syn keyword lispFunc concatenate make-method string-equal syn keyword lispFunc concatenated-stream make-package string-greaterp syn keyword lispFunc concatenated-stream-streams make-pathname string-left-trim syn keyword lispFunc cond make-random-state string-lessp syn keyword lispFunc condition make-sequence string-not-equal syn keyword lispFunc conjugate make-string string-not-greaterp syn keyword lispFunc cons make-string-input-stream string-not-lessp syn keyword lispFunc consp make-string-output-stream string-right-strim syn keyword lispFunc constantly make-symbol string-right-trim syn keyword lispFunc constantp make-synonym-stream string-stream syn keyword lispFunc continue make-two-way-stream string-trim syn keyword lispFunc control-error makunbound string-upcase syn keyword lispFunc copy-alist map string/= syn keyword lispFunc copy-list map-into string< syn keyword lispFunc copy-pprint-dispatch mapc string<= syn keyword lispFunc copy-readtable mapcan string= syn keyword lispFunc copy-seq mapcar string> syn keyword lispFunc copy-structure mapcon string>= syn keyword lispFunc copy-symbol maphash stringp syn keyword lispFunc copy-tree mapl structure syn keyword lispFunc cos maplist structure-class syn keyword lispFunc cosh mask-field structure-object syn keyword lispFunc count max style-warning syn keyword lispFunc count-if member sublim syn keyword lispFunc count-if-not member-if sublis syn keyword lispFunc ctypecase member-if-not subseq syn keyword lispFunc debug merge subsetp syn keyword lispFunc decf merge-pathname subst syn keyword lispFunc declaim merge-pathnames subst-if syn keyword lispFunc declaration method subst-if-not syn keyword lispFunc declare method-combination substitute syn keyword lispFunc decode-float method-combination-error substitute-if syn keyword lispFunc decode-universal-time method-qualifiers substitute-if-not syn keyword lispFunc defclass min subtypep syn keyword lispFunc defconstant minusp svref syn keyword lispFunc defgeneric mismatch sxhash syn keyword lispFunc define-compiler-macro mod symbol syn keyword lispFunc define-condition most-negative-double-float symbol-function syn keyword lispFunc define-method-combination most-negative-fixnum symbol-macrolet syn keyword lispFunc define-modify-macro most-negative-long-float symbol-name syn keyword lispFunc define-setf-expander most-negative-short-float symbol-package syn keyword lispFunc define-setf-method most-negative-single-float symbol-plist syn keyword lispFunc define-symbol-macro most-positive-double-float symbol-value syn keyword lispFunc defmacro most-positive-fixnum symbolp syn keyword lispFunc defmethod most-positive-long-float synonym-stream syn keyword lispFunc defpackage most-positive-short-float synonym-stream-symbol syn keyword lispFunc defparameter most-positive-single-float sys syn keyword lispFunc defsetf muffle-warning system syn keyword lispFunc defstruct multiple-value-bind t syn keyword lispFunc deftype multiple-value-call tagbody syn keyword lispFunc defun multiple-value-list tailp syn keyword lispFunc defvar multiple-value-prog1 tan syn keyword lispFunc delete multiple-value-seteq tanh syn keyword lispFunc delete-duplicates multiple-value-setq tenth syn keyword lispFunc delete-file multiple-values-limit terpri syn keyword lispFunc delete-if name-char the syn keyword lispFunc delete-if-not namestring third syn keyword lispFunc delete-package nbutlast throw syn keyword lispFunc denominator nconc time syn keyword lispFunc deposit-field next-method-p trace syn keyword lispFunc describe nil translate-logical-pathname syn keyword lispFunc describe-object nintersection translate-pathname syn keyword lispFunc destructuring-bind ninth tree-equal syn keyword lispFunc digit-char no-applicable-method truename syn keyword lispFunc digit-char-p no-next-method truncase syn keyword lispFunc directory not truncate syn keyword lispFunc directory-namestring notany two-way-stream syn keyword lispFunc disassemble notevery two-way-stream-input-stream syn keyword lispFunc division-by-zero notinline two-way-stream-output-stream syn keyword lispFunc do nreconc type syn keyword lispFunc do* nreverse type-error syn keyword lispFunc do-all-symbols nset-difference type-error-datum syn keyword lispFunc do-exeternal-symbols nset-exclusive-or type-error-expected-type syn keyword lispFunc do-external-symbols nstring type-of syn keyword lispFunc do-symbols nstring-capitalize typecase syn keyword lispFunc documentation nstring-downcase typep syn keyword lispFunc dolist nstring-upcase unbound-slot syn keyword lispFunc dotimes nsublis unbound-slot-instance syn keyword lispFunc double-float nsubst unbound-variable syn keyword lispFunc double-float-epsilon nsubst-if undefined-function syn keyword lispFunc double-float-negative-epsilon nsubst-if-not unexport syn keyword lispFunc dpb nsubstitute unintern syn keyword lispFunc dribble nsubstitute-if union syn keyword lispFunc dynamic-extent nsubstitute-if-not unless syn keyword lispFunc ecase nth unread syn keyword lispFunc echo-stream nth-value unread-char syn keyword lispFunc echo-stream-input-stream nthcdr unsigned-byte syn keyword lispFunc echo-stream-output-stream null untrace syn keyword lispFunc ed number unuse-package syn keyword lispFunc eighth numberp unwind-protect syn keyword lispFunc elt numerator update-instance-for-different-class syn keyword lispFunc encode-universal-time nunion update-instance-for-redefined-class syn keyword lispFunc end-of-file oddp upgraded-array-element-type syn keyword lispFunc endp open upgraded-complex-part-type syn keyword lispFunc enough-namestring open-stream-p upper-case-p syn keyword lispFunc ensure-directories-exist optimize use-package syn keyword lispFunc ensure-generic-function or use-value syn keyword lispFunc eq otherwise user syn keyword lispFunc eql output-stream-p user-homedir-pathname syn keyword lispFunc equal package values syn keyword lispFunc equalp package-error values-list syn keyword lispFunc error package-error-package vector syn keyword lispFunc etypecase package-name vector-pop syn keyword lispFunc eval package-nicknames vector-push syn keyword lispFunc eval-when package-shadowing-symbols vector-push-extend syn keyword lispFunc evalhook package-use-list vectorp syn keyword lispFunc evenp package-used-by-list warn syn keyword lispFunc every packagep warning syn keyword lispFunc exp pairlis when syn keyword lispFunc export parse-error wild-pathname-p syn keyword lispFunc expt parse-integer with-accessors syn keyword lispFunc extended-char parse-namestring with-compilation-unit syn keyword lispFunc fboundp pathname with-condition-restarts syn keyword lispFunc fceiling pathname-device with-hash-table-iterator syn keyword lispFunc fdefinition pathname-directory with-input-from-string syn keyword lispFunc ffloor pathname-host with-open-file syn keyword lispFunc fifth pathname-match-p with-open-stream syn keyword lispFunc file-author pathname-name with-output-to-string syn keyword lispFunc file-error pathname-type with-package-iterator syn keyword lispFunc file-error-pathname pathname-version with-simple-restart syn keyword lispFunc file-length pathnamep with-slots syn keyword lispFunc file-namestring peek-char with-standard-io-syntax syn keyword lispFunc file-position phase write syn keyword lispFunc file-stream pi write-byte syn keyword lispFunc file-string-length plusp write-char syn keyword lispFunc file-write-date pop write-line syn keyword lispFunc fill position write-sequence syn keyword lispFunc fill-pointer position-if write-string syn keyword lispFunc find position-if-not write-to-string syn keyword lispFunc find-all-symbols pprint y-or-n-p syn keyword lispFunc find-class pprint-dispatch yes-or-no-p syn keyword lispFunc find-if pprint-exit-if-list-exhausted zerop syn keyword lispFunc find-if-not pprint-fill syn match lispFunc "\<c[ad]\+r\>" if exists("g:lispsyntax_clisp") " CLISP FFI: syn match lispFunc "\<\(ffi:\)\?with-c-\(place\|var\)\>" syn match lispFunc "\<\(ffi:\)\?with-foreign-\(object\|string\)\>" syn match lispFunc "\<\(ffi:\)\?default-foreign-\(language\|library\)\>" syn match lispFunc "\<\([us]_\?\)\?\(element\|deref\|cast\|slot\|validp\)\>" syn match lispFunc "\<\(ffi:\)\?set-foreign-pointer\>" syn match lispFunc "\<\(ffi:\)\?allocate-\(deep\|shallow\)\>" syn match lispFunc "\<\(ffi:\)\?c-lines\>" syn match lispFunc "\<\(ffi:\)\?foreign-\(value\|free\|variable\|function\|object\)\>" syn match lispFunc "\<\(ffi:\)\?foreign-address\(-null\|unsigned\)\?\>" syn match lispFunc "\<\(ffi:\)\?undigned-foreign-address\>" syn match lispFunc "\<\(ffi:\)\?c-var-\(address\|object\)\>" syn match lispFunc "\<\(ffi:\)\?typeof\>" syn match lispFunc "\<\(ffi:\)\?\(bit\)\?sizeof\>" " CLISP Macros, functions et al: syn match lispFunc "\<\(ext:\)\?with-collect\>" syn match lispFunc "\<\(ext:\)\?letf\*\?\>" syn match lispFunc "\<\(ext:\)\?finalize\>\>" syn match lispFunc "\<\(ext:\)\?memoized\>" syn match lispFunc "\<\(ext:\)\?getenv\>" syn match lispFunc "\<\(ext:\)\?convert-string-\(to\|from\)-bytes\>" syn match lispFunc "\<\(ext:\)\?ethe\>" syn match lispFunc "\<\(ext:\)\?with-gensyms\>" syn match lispFunc "\<\(ext:\)\?open-http\>" syn match lispFunc "\<\(ext:\)\?string-concat\>" syn match lispFunc "\<\(ext:\)\?with-http-\(in\|out\)put\>" syn match lispFunc "\<\(ext:\)\?with-html-output\>" syn match lispFunc "\<\(ext:\)\?expand-form\>" syn match lispFunc "\<\(ext:\)\?\(without-\)\?package-lock\>" syn match lispFunc "\<\(ext:\)\?re-export\>" syn match lispFunc "\<\(ext:\)\?saveinitmem\>" syn match lispFunc "\<\(ext:\)\?\(read\|write\)-\(integer\|float\)\>" syn match lispFunc "\<\(ext:\)\?\(read\|write\)-\(char\|byte\)-sequence\>" syn match lispFunc "\<\(custom:\)\?\*system-package-list\*\>" syn match lispFunc "\<\(custom:\)\?\*ansi\*\>" endif " --------------------------------------------------------------------- " Lisp Keywords (modifiers): {{{1 syn keyword lispKey :abort :from-end :overwrite syn keyword lispKey :adjustable :gensym :predicate syn keyword lispKey :append :host :preserve-whitespace syn keyword lispKey :array :if-does-not-exist :pretty syn keyword lispKey :base :if-exists :print syn keyword lispKey :case :include :print-function syn keyword lispKey :circle :index :probe syn keyword lispKey :conc-name :inherited :radix syn keyword lispKey :constructor :initial-contents :read-only syn keyword lispKey :copier :initial-element :rehash-size syn keyword lispKey :count :initial-offset :rehash-threshold syn keyword lispKey :create :initial-value :rename syn keyword lispKey :default :input :rename-and-delete syn keyword lispKey :defaults :internal :size syn keyword lispKey :device :io :start syn keyword lispKey :direction :junk-allowed :start1 syn keyword lispKey :directory :key :start2 syn keyword lispKey :displaced-index-offset :length :stream syn keyword lispKey :displaced-to :level :supersede syn keyword lispKey :element-type :name :test syn keyword lispKey :end :named :test-not syn keyword lispKey :end1 :new-version :type syn keyword lispKey :end2 :nicknames :use syn keyword lispKey :error :output :verbose syn keyword lispKey :escape :output-file :version syn keyword lispKey :external " defpackage arguments syn keyword lispKey :documentation :shadowing-import-from :modern :export syn keyword lispKey :case-sensitive :case-inverted :shadow :import-from :intern " lambda list keywords syn keyword lispKey &allow-other-keys &aux &body syn keyword lispKey &environment &key &optional &rest &whole " make-array argument syn keyword lispKey :fill-pointer " readtable-case values syn keyword lispKey :upcase :downcase :preserve :invert " eval-when situations syn keyword lispKey :load-toplevel :compile-toplevel :execute " ANSI Extended LOOP: syn keyword lispKey :while :until :for :do :if :then :else :when :unless :in syn keyword lispKey :across :finally :collect :nconc :maximize :minimize :sum syn keyword lispKey :and :with :initially :append :into :count :end :repeat syn keyword lispKey :always :never :thereis :from :to :upto :downto :below syn keyword lispKey :above :by :on :being :each :the :hash-key :hash-keys syn keyword lispKey :hash-value :hash-values :using :of-type :upfrom :downfrom if exists("g:lispsyntax_clisp") " CLISP FFI: syn keyword lispKey :arguments :return-type :library :full :malloc-free syn keyword lispKey :none :alloca :in :out :in-out :stdc-stdcall :stdc :c syn keyword lispKey :language :built-in :typedef :external syn keyword lispKey :fini :init-once :init-always endif " --------------------------------------------------------------------- " Standard Lisp Variables: {{{1 syn keyword lispVar *applyhook* *load-pathname* *print-pprint-dispatch* syn keyword lispVar *break-on-signals* *load-print* *print-pprint-dispatch* syn keyword lispVar *break-on-signals* *load-truename* *print-pretty* syn keyword lispVar *break-on-warnings* *load-verbose* *print-radix* syn keyword lispVar *compile-file-pathname* *macroexpand-hook* *print-readably* syn keyword lispVar *compile-file-pathname* *modules* *print-right-margin* syn keyword lispVar *compile-file-truename* *package* *print-right-margin* syn keyword lispVar *compile-file-truename* *print-array* *query-io* syn keyword lispVar *compile-print* *print-base* *random-state* syn keyword lispVar *compile-verbose* *print-case* *read-base* syn keyword lispVar *compile-verbose* *print-circle* *read-default-float-format* syn keyword lispVar *debug-io* *print-escape* *read-eval* syn keyword lispVar *debugger-hook* *print-gensym* *read-suppress* syn keyword lispVar *default-pathname-defaults* *print-length* *readtable* syn keyword lispVar *error-output* *print-level* *standard-input* syn keyword lispVar *evalhook* *print-lines* *standard-output* syn keyword lispVar *features* *print-miser-width* *terminal-io* syn keyword lispVar *gensym-counter* *print-miser-width* *trace-output* " --------------------------------------------------------------------- " Strings: {{{1 syn region lispString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell if exists("g:lisp_instring") syn region lispInString keepend matchgroup=Delimiter start=+"(+rs=s+1 skip=+|.\{-}|+ matchgroup=Delimiter end=+)"+ contains=@lispBaseListCluster,lispInStringString syn region lispInStringString start=+\\"+ skip=+\\\\+ end=+\\"+ contained endif " --------------------------------------------------------------------- " Shared with Xlisp, Declarations, Macros, Functions: {{{1 syn keyword lispDecl defmacro do-all-symbols labels syn keyword lispDecl defsetf do-external-symbols let syn keyword lispDecl deftype do-symbols locally syn keyword lispDecl defun dotimes macrolet syn keyword lispDecl do* flet multiple-value-bind if exists("g:lispsyntax_clisp") " CLISP FFI: syn match lispDecl "\<\(ffi:\)\?def-c-\(var\|const\|enum\|type\|struct\)\>" syn match lispDecl "\<\(ffi:\)\?def-call-\(out\|in\)\>" syn match lispDecl "\<\(ffi:\)\?c-\(function\|struct\|pointer\|string\)\>" syn match lispDecl "\<\(ffi:\)\?c-ptr\(-null\)\?\>" syn match lispDecl "\<\(ffi:\)\?c-array\(-ptr\|-max\)\?\>" syn match lispDecl "\<\(ffi:\)\?[us]\?\(char\|short\|int\|long\)\>" syn match lispDecl "\<\(win32:\|w32\)\?d\?word\>" syn match lispDecl "\<\([us]_\?\)\?int\(8\|16\|32\|64\)\(_t\)\?\>" syn keyword lispDecl size_t off_t time_t handle endif " --------------------------------------------------------------------- " Numbers: supporting integers and floating point numbers {{{1 syn match lispNumber "-\=\(\.\d\+\|\d\+\(\.\d*\)\=\)\([dDeEfFlL][-+]\=\d\+\)\=" syn match lispNumber "-\=\(\d\+/\d\+\)" syn match lispEscapeSpecial "\*\w[a-z_0-9-]*\*" syn match lispEscapeSpecial !#|[^()'`,"; \t]\+|#! syn match lispEscapeSpecial !#x\x\+! syn match lispEscapeSpecial !#o\o\+! syn match lispEscapeSpecial !#b[01]\+! syn match lispEscapeSpecial !#\\[ -}\~]! syn match lispEscapeSpecial !#[':][^()'`,"; \t]\+! syn match lispEscapeSpecial !#([^()'`,"; \t]\+)! syn match lispEscapeSpecial !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\)! syn match lispEscapeSpecial "\<+[a-zA-Z_][a-zA-Z_0-9-]*+\>" syn match lispConcat "\s\.\s" syn match lispParenError ")" " --------------------------------------------------------------------- " Comments: {{{1 syn cluster lispCommentGroup contains=lispTodo,@Spell syn match lispComment ";.*$" contains=@lispCommentGroup syn region lispCommentRegion start="#|" end="|#" contains=lispCommentRegion,@lispCommentGroup syn keyword lispTodo contained combak combak: todo todo: " --------------------------------------------------------------------- " Synchronization: {{{1 syn sync lines=100 " --------------------------------------------------------------------- " Define Highlighting: {{{1 " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 command -nargs=+ HiLink hi def link <args> HiLink lispCommentRegion lispComment HiLink lispAtomNmbr lispNumber HiLink lispAtomMark lispMark HiLink lispInStringString lispString HiLink lispAtom Identifier HiLink lispAtomBarSymbol Special HiLink lispBarSymbol Special HiLink lispComment Comment HiLink lispConcat Statement HiLink lispDecl Statement HiLink lispFunc Statement HiLink lispKey Type HiLink lispMark Delimiter HiLink lispNumber Number HiLink lispParenError Error HiLink lispEscapeSpecial Type HiLink lispString String HiLink lispTodo Todo HiLink lispVar Statement if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 if &bg == "dark" hi def hlLevel0 ctermfg=red guifg=red1 hi def hlLevel1 ctermfg=yellow guifg=orange1 hi def hlLevel2 ctermfg=green guifg=yellow1 hi def hlLevel3 ctermfg=cyan guifg=greenyellow hi def hlLevel4 ctermfg=magenta guifg=green1 hi def hlLevel5 ctermfg=red guifg=springgreen1 hi def hlLevel6 ctermfg=yellow guifg=cyan1 hi def hlLevel7 ctermfg=green guifg=slateblue1 hi def hlLevel8 ctermfg=cyan guifg=magenta1 hi def hlLevel9 ctermfg=magenta guifg=purple1 else hi def hlLevel0 ctermfg=red guifg=red3 hi def hlLevel1 ctermfg=darkyellow guifg=orangered3 hi def hlLevel2 ctermfg=darkgreen guifg=orange2 hi def hlLevel3 ctermfg=blue guifg=yellow3 hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4 hi def hlLevel5 ctermfg=red guifg=green4 hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3 hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4 hi def hlLevel8 ctermfg=blue guifg=darkslateblue hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet endif endif delcommand HiLink endif let b:current_syntax = "lisp" " --------------------------------------------------------------------- " vim: ts=8 nowrap fdm=marker
zyz2011-vim
runtime/syntax/lisp.vim
Vim Script
gpl2
36,416
" Vim syntax file " Language: TSS (Thermal Synthesizer System) Geometry " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.tssgm " URL: http://www.naglenet.org/vim/syntax/tssgm.vim " MAIN URL: http://www.naglenet.org/vim/ " 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") finish endif " Ignore case syn case ignore " " " Begin syntax definitions for tss geomtery file. " " Define keywords for TSS syn keyword tssgmParam units mirror param active sides submodel include syn keyword tssgmParam iconductor nbeta ngamma optics material thickness color syn keyword tssgmParam initial_temp syn keyword tssgmParam initial_id node_ids node_add node_type syn keyword tssgmParam gamma_boundaries gamma_add beta_boundaries syn keyword tssgmParam p1 p2 p3 p4 p5 p6 rot1 rot2 rot3 tx ty tz syn keyword tssgmSurfType rectangle trapezoid disc ellipse triangle syn keyword tssgmSurfType polygon cylinder cone sphere ellipic-cone syn keyword tssgmSurfType ogive torus box paraboloid hyperboloid ellipsoid syn keyword tssgmSurfType quadrilateral trapeziod syn keyword tssgmArgs OUT IN DOWN BOTH DOUBLE NONE SINGLE RADK CC FECC syn keyword tssgmArgs white red blue green yellow orange violet pink syn keyword tssgmArgs turquoise grey black syn keyword tssgmArgs Arithmetic Boundary Heater syn keyword tssgmDelim assembly syn keyword tssgmEnd end syn keyword tssgmUnits cm feet meters inches syn keyword tssgmUnits Celsius Kelvin Fahrenheit Rankine " Define matches for TSS syn match tssgmDefault "^DEFAULT/LENGTH = \(ft\|in\|cm\|m\)" syn match tssgmDefault "^DEFAULT/TEMP = [CKFR]" syn match tssgmComment /comment \+= \+".*"/ contains=tssParam,tssgmCommentString syn match tssgmCommentString /".*"/ contained syn match tssgmSurfIdent " \S\+\.\d\+ \=$" syn match tssgmString /"[^" ]\+"/ms=s+1,me=e-1 contains=ALLBUT,tssInteger syn match tssgmArgs / = [xyz],"/ms=s+3,me=e-2 syn match tssgmInteger "-\=\<[0-9]*\>" syn match tssgmFloat "-\=\<[0-9]*\.[0-9]*" syn match tssgmScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " Define the default highlighting " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_tssgm_syntax_inits") if version < 508 let did_tssgm_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink tssgmParam Statement HiLink tssgmSurfType Type HiLink tssgmArgs Special HiLink tssgmDelim Typedef HiLink tssgmEnd Macro HiLink tssgmUnits Special HiLink tssgmDefault SpecialComment HiLink tssgmComment Statement HiLink tssgmCommentString Comment HiLink tssgmSurfIdent Identifier HiLink tssgmString Delimiter HiLink tssgmInteger Number HiLink tssgmFloat Float HiLink tssgmScientific Float delcommand HiLink endif let b:current_syntax = "tssgm" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/tssgm.vim
Vim Script
gpl2
3,165
" Vim syntax file " PHTML used to be the filetype for PHP 2.0. Now everything is PHP. if !exists("b:current_syntax") runtime! syntax/php.vim endif
zyz2011-vim
runtime/syntax/phtml.vim
Vim Script
gpl2
151
" Vim syntax file " Language: WEB Changes " Maintainer: Andreas Scherer <andreas.scherer@pobox.com> " Last Change: April 25, 2001 " Details of the change mechanism of the WEB and CWEB languages can be found " in the articles by Donald E. Knuth and Silvio Levy cited in "web.vim" and " "cweb.vim" respectively. " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syn clear elseif exists("b:current_syntax") finish endif " We distinguish two groups of material, (a) stuff between @x..@y, and " (b) stuff between @y..@z. WEB/CWEB ignore everything else in a change file. syn region changeFromMaterial start="^@x.*$"ms=e+1 end="^@y.*$"me=s-1 syn region changeToMaterial start="^@y.*$"ms=e+1 end="^@z.*$"me=s-1 " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_change_syntax_inits") if version < 508 let did_change_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink changeFromMaterial String HiLink changeToMaterial Statement delcommand HiLink endif let b:current_syntax = "change" " vim: ts=8
zyz2011-vim
runtime/syntax/change.vim
Vim Script
gpl2
1,314
" Vim syntax file " Language: TSS (Thermal Synthesizer System) Optics " Maintainer: Adrian Nagle, anagle@ball.com " Last Change: 2003 May 11 " Filenames: *.tssop " URL: http://www.naglenet.org/vim/syntax/tssop.vim " MAIN URL: http://www.naglenet.org/vim/ " 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") finish endif " Ignore case syn case ignore " " " Begin syntax definitions for tss optics file. " " Define keywords for TSS syn keyword tssopParam ir_eps ir_trans ir_spec ir_tspec ir_refract syn keyword tssopParam sol_eps sol_trans sol_spec sol_tspec sol_refract syn keyword tssopParam color "syn keyword tssopProp property syn keyword tssopArgs white red blue green yellow orange violet pink syn keyword tssopArgs turquoise grey black " Define matches for TSS syn match tssopComment /comment \+= \+".*"/ contains=tssopParam,tssopCommentString syn match tssopCommentString /".*"/ contained syn match tssopProp "property " syn match tssopProp "edit/optic " syn match tssopPropName "^property \S\+" contains=tssopProp syn match tssopPropName "^edit/optic \S\+$" contains=tssopProp syn match tssopInteger "-\=\<[0-9]*\>" syn match tssopFloat "-\=\<[0-9]*\.[0-9]*" syn match tssopScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " Define the default highlighting " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_tssop_syntax_inits") if version < 508 let did_tssop_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink tssopParam Statement HiLink tssopProp Identifier HiLink tssopArgs Special HiLink tssopComment Statement HiLink tssopCommentString Comment HiLink tssopPropName Typedef HiLink tssopInteger Number HiLink tssopFloat Float HiLink tssopScientific Float delcommand HiLink endif let b:current_syntax = "tssop" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/tssop.vim
Vim Script
gpl2
2,178
" Vim syntax file " Language: LPC " Maintainer: Shizhu Pan <poet@mudbuilder.net> " URL: http://poet.tomud.com/pub/lpc.vim.bz2 " Last Change: 2011 Dec 10 by Thilo Six " Comments: If you are using Vim 6.2 or later, see :h lpc.vim for " file type recognizing, if not, you had to use modeline. " Nodule: This is the start nodule. {{{1 " 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") finish endif let s:cpo_save = &cpo set cpo&vim " Nodule: Keywords {{{1 " LPC keywords " keywords should always be highlighted so "contained" is not used. syn cluster lpcKeywdGrp contains=lpcConditional,lpcLabel,lpcOperator,lpcRepeat,lpcStatement,lpcModifier,lpcReserved syn keyword lpcConditional if else switch syn keyword lpcLabel case default syn keyword lpcOperator catch efun in inherit syn keyword lpcRepeat do for foreach while syn keyword lpcStatement break continue return syn match lpcEfunError /efun[^:]/ display " Illegal to use keyword as function " It's not working, maybe in the next version. syn keyword lpcKeywdError contained if for foreach return switch while " These are keywords only because they take lvalue or type as parameter, " so these keywords should only be used as function but cannot be names of " user-defined functions. syn keyword lpcKeywdFunc new parse_command sscanf time_expression " Nodule: Type and modifiers {{{1 " Type names list. " Special types syn keyword lpcType void mixed unknown " Scalar/Value types. syn keyword lpcType int float string " Pointer types. syn keyword lpcType array buffer class function mapping object " Other types. if exists("lpc_compat_32") syn keyword lpcType closure status funcall else syn keyword lpcError closure status syn keyword lpcType multiset endif " Type modifier. syn keyword lpcModifier nomask private public syn keyword lpcModifier varargs virtual " sensible modifiers if exists("lpc_pre_v22") syn keyword lpcReserved nosave protected ref syn keyword lpcModifier static else syn keyword lpcError static syn keyword lpcModifier nosave protected ref endif " Nodule: Applies {{{1 " Match a function declaration or function pointer syn match lpcApplyDecl excludenl /->\h\w*(/me=e-1 contains=lpcApplies transparent display " We should note that in func_spec.c the efun definition syntax is so " complicated that I use such a long regular expression to describe. syn match lpcLongDecl excludenl /\(\s\|\*\)\h\+\s\h\+(/me=e-1 contains=@lpcEfunGroup,lpcType,@lpcKeywdGrp transparent display " this is form for all functions " ->foo() form had been excluded syn match lpcFuncDecl excludenl /\h\w*(/me=e-1 contains=lpcApplies,@lpcEfunGroup,lpcKeywdError transparent display " The (: :) parenthesis or $() forms a function pointer syn match lpcFuncName /(:\s*\h\+\s*:)/me=e-1 contains=lpcApplies,@lpcEfunGroup transparent display contained syn match lpcFuncName /(:\s*\h\+,/ contains=lpcApplies,@lpcEfunGroup transparent display contained syn match lpcFuncName /\$(\h\+)/ contains=lpcApplies,@lpcEfunGroup transparent display contained " Applies list. " system applies syn keyword lpcApplies contained __INIT clean_up create destructor heart_beat id init move_or_destruct reset " interactive syn keyword lpcApplies contained catch_tell logon net_dead process_input receive_message receive_snoop telnet_suboption terminal_type window_size write_prompt " master applies syn keyword lpcApplies contained author_file compile_object connect crash creator_file domain_file epilog error_handler flag get_bb_uid get_root_uid get_save_file_name log_error make_path_absolute object_name preload privs_file retrieve_ed_setup save_ed_setup slow_shutdown syn keyword lpcApplies contained valid_asm valid_bind valid_compile_to_c valid_database valid_hide valid_link valid_object valid_override valid_read valid_save_binary valid_seteuid valid_shadow valid_socket valid_write " parsing syn keyword lpcApplies contained inventory_accessible inventory_visible is_living parse_command_adjectiv_id_list parse_command_adjective_id_list parse_command_all_word parse_command_id_list parse_command_plural_id_list parse_command_prepos_list parse_command_users parse_get_environment parse_get_first_inventory parse_get_next_inventory parser_error_message " Nodule: Efuns {{{1 syn cluster lpcEfunGroup contains=lpc_efuns,lpcOldEfuns,lpcNewEfuns,lpcKeywdFunc " Compat32 efuns if exists("lpc_compat_32") syn keyword lpc_efuns contained closurep heart_beat_info m_delete m_values m_indices query_once_interactive strstr else syn match lpcErrFunc /#`\h\w*/ " Shell compatible first line comment. syn region lpcCommentFunc start=/^#!/ end=/$/ endif " pre-v22 efuns which are removed in newer versions. syn keyword lpcOldEfuns contained tail dump_socket_status " new efuns after v22 should be added here! syn keyword lpcNewEfuns contained socket_status " LPC efuns list. " DEBUG efuns Not included. " New efuns should NOT be added to this list, see v22 efuns above. " Efuns list {{{2 syn keyword lpc_efuns contained acos add_action all_inventory all_previous_objects allocate allocate_buffer allocate_mapping apply arrayp asin atan author_stats syn keyword lpc_efuns contained bind break_string bufferp syn keyword lpc_efuns contained cache_stats call_other call_out call_out_info call_stack capitalize catch ceil check_memory children classp clear_bit clone_object clonep command commands copy cos cp crc32 crypt ctime syn keyword lpc_efuns contained db_close db_commit db_connect db_exec db_fetch db_rollback db_status debug_info debugmalloc debug_message deep_inherit_list deep_inventory destruct disable_commands disable_wizard domain_stats dumpallobj dump_file_descriptors dump_prog syn keyword lpc_efuns contained each ed ed_cmd ed_start enable_commands enable_wizard environment error errorp eval_cost evaluate exec exp explode export_uid external_start syn keyword lpc_efuns contained fetch_variable file_length file_name file_size filter filter_array filter_mapping find_call_out find_living find_object find_player first_inventory floatp floor flush_messages function_exists function_owner function_profile functionp functions syn keyword lpc_efuns contained generate_source get_char get_config get_dir geteuid getuid syn keyword lpc_efuns contained heart_beats syn keyword lpc_efuns contained id_matrix implode in_edit in_input inherit_list inherits input_to interactive intp syn keyword lpc_efuns contained keys syn keyword lpc_efuns contained link living livings load_object localtime log log10 lookat_rotate lower_case lpc_info syn keyword lpc_efuns contained malloc_check malloc_debug malloc_status map map_array map_delete map_mapping mapp master match_path max_eval_cost member_array memory_info memory_summary message mkdir moncontrol move_object mud_status syn keyword lpc_efuns contained named_livings network_stats next_bit next_inventory notify_fail nullp syn keyword lpc_efuns contained objectp objects oldcrypt opcprof origin syn keyword lpc_efuns contained parse_add_rule parse_add_synonym parse_command parse_dump parse_init parse_my_rules parse_refresh parse_remove parse_sentence pluralize pointerp pow present previous_object printf process_string process_value program_info syn keyword lpc_efuns contained query_ed_mode query_heart_beat query_host_name query_idle query_ip_name query_ip_number query_ip_port query_load_average query_notify_fail query_privs query_replaced_program query_shadowing query_snoop query_snooping query_verb syn keyword lpc_efuns contained random read_buffer read_bytes read_file receive reclaim_objects refs regexp reg_assoc reload_object remove_action remove_call_out remove_interactive remove_shadow rename repeat_string replace_program replace_string replaceable reset_eval_cost resolve restore_object restore_variable rm rmdir rotate_x rotate_y rotate_z rusage syn keyword lpc_efuns contained save_object save_variable say scale set_author set_bit set_eval_limit set_heart_beat set_hide set_light set_living_name set_malloc_mask set_privs set_reset set_this_player set_this_user seteuid shadow shallow_inherit_list shout shutdown sin sizeof snoop socket_accept socket_acquire socket_address socket_bind socket_close socket_connect socket_create socket_error socket_listen socket_release socket_write sort_array sprintf sqrt stat store_variable strcmp stringp strlen strsrch syn keyword lpc_efuns contained tan tell_object tell_room terminal_colour test_bit this_interactive this_object this_player this_user throw time to_float to_int trace traceprefix translate typeof syn keyword lpc_efuns contained undefinedp unique_array unique_mapping upper_case uptime userp users syn keyword lpc_efuns contained values variables virtualp syn keyword lpc_efuns contained wizardp write write_buffer write_bytes write_file " Nodule: Constants {{{1 " LPC Constants. " like keywords, constants are always highlighted, be careful to choose only " the constants we used to add to this list. syn keyword lpcConstant __ARCH__ __COMPILER__ __DIR__ __FILE__ __OPTIMIZATION__ __PORT__ __VERSION__ " Defines in options.h are all predefined in LPC sources surrounding by " two underscores. Do we need to include all of that? syn keyword lpcConstant __SAVE_EXTENSION__ __HEARTBEAT_INTERVAL__ " from the documentation we know that these constants remains only for " backward compatibility and should not be used any more. syn keyword lpcConstant HAS_ED HAS_PRINTF HAS_RUSAGE HAS_DEBUG_LEVEL syn keyword lpcConstant MUD_NAME F__THIS_OBJECT " Nodule: Todo for this file. {{{1 " TODO : need to check for LPC4 syntax and other series of LPC besides " v22, b21 and l32, if you had a good idea, contact me at poet@mudbuilder.net " and I will be appreciated about that. " Notes about some FAQ: " " About variables : We adopts the same behavior for C because almost all the " LPC programmers are also C programmers, so we don't need separate settings " for C and LPC. That is the reason why I don't change variables like " "c_no_utf"s to "lpc_no_utf"s. " " Copy : Some of the following seems to be copied from c.vim but not quite " the same in details because the syntax for C and LPC is different. " " Color scheme : this syntax file had been thouroughly tested to work well " for all of the dark-backgrounded color schemes Vim has provided officially, " and it should be quite Ok for all of the bright-backgrounded color schemes, " of course it works best for the color scheme that I am using, download it " from http://poet.tomud.com/pub/ps_color.vim.bz2 if you want to try it. " " Nodule: String and Character {{{1 " String and Character constants " Highlight special characters (those which have a backslash) differently syn match lpcSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" if !exists("c_no_utf") syn match lpcSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" endif " LPC version of sprintf() format, syn match lpcFormat display "%\(\d\+\)\=[-+ |=#@:.]*\(\d\+\)\=\('\I\+'\|'\I*\\'\I*'\)\=[OsdicoxXf]" contained syn match lpcFormat display "%%" contained syn region lpcString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lpcSpecial,lpcFormat " lpcCppString: same as lpcString, but ends at end of line syn region lpcCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=lpcSpecial,lpcFormat " LPC preprocessor for the text formatting short cuts " Thanks to Dr. Charles E. Campbell <cec@gryphon.gsfc.nasa.gov> " he suggests the best way to do this. syn region lpcTextString start=/@\z(\h\w*\)$/ end=/^\z1/ contains=lpcSpecial syn region lpcArrayString start=/@@\z(\h\w*\)$/ end=/^\z1/ contains=lpcSpecial " Character syn match lpcCharacter "L\='[^\\]'" syn match lpcCharacter "L'[^']*'" contains=lpcSpecial syn match lpcSpecialError "L\='\\[^'\"?\\abefnrtv]'" syn match lpcSpecialCharacter "L\='\\['\"?\\abefnrtv]'" syn match lpcSpecialCharacter display "L\='\\\o\{1,3}'" syn match lpcSpecialCharacter display "'\\x\x\{1,2}'" syn match lpcSpecialCharacter display "L'\\x\x\+'" " Nodule: White space {{{1 " when wanted, highlight trailing white space if exists("c_space_errors") if !exists("c_no_trail_space_error") syn match lpcSpaceError display excludenl "\s\+$" endif if !exists("c_no_tab_space_error") syn match lpcSpaceError display " \+\t"me=e-1 endif endif " Nodule: Parenthesis and brackets {{{1 " catch errors caused by wrong parenthesis and brackets syn cluster lpcParenGroup contains=lpcParenError,lpcIncluded,lpcSpecial,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcUserCont,lpcUserLabel,lpcBitField,lpcCommentSkip,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom syn region lpcParen transparent start='(' end=')' contains=ALLBUT,@lpcParenGroup,lpcCppParen,lpcErrInBracket,lpcCppBracket,lpcCppString,@lpcEfunGroup,lpcApplies,lpcKeywdError " lpcCppParen: same as lpcParen but ends at end-of-line; used in lpcDefine syn region lpcCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@lpcParenGroup,lpcErrInBracket,lpcParen,lpcBracket,lpcString,@lpcEfunGroup,lpcApplies,lpcKeywdError syn match lpcParenError display ")" syn match lpcParenError display "\]" " for LPC: " Here we should consider the array ({ }) parenthesis and mapping ([ ]) " parenthesis and multiset (< >) parenthesis. syn match lpcErrInParen display contained "[^^]{"ms=s+1 syn match lpcErrInParen display contained "\(}\|\]\)[^)]"me=e-1 syn region lpcBracket transparent start='\[' end=']' contains=ALLBUT,@lpcParenGroup,lpcErrInParen,lpcCppParen,lpcCppBracket,lpcCppString,@lpcEfunGroup,lpcApplies,lpcFuncName,lpcKeywdError " lpcCppBracket: same as lpcParen but ends at end-of-line; used in lpcDefine syn region lpcCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@lpcParenGroup,lpcErrInParen,lpcParen,lpcBracket,lpcString,@lpcEfunGroup,lpcApplies,lpcFuncName,lpcKeywdError syn match lpcErrInBracket display contained "[);{}]" " Nodule: Numbers {{{1 " integer number, or floating point number without a dot and with "f". syn case ignore syn match lpcNumbers display transparent "\<\d\|\.\d" contains=lpcNumber,lpcFloat,lpcOctalError,lpcOctal " Same, but without octal error (for comments) syn match lpcNumbersCom display contained transparent "\<\d\|\.\d" contains=lpcNumber,lpcFloat,lpcOctal syn match lpcNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" " hex number syn match lpcNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" " Flag the first zero of an octal number as something special syn match lpcOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=lpcOctalZero syn match lpcOctalZero display contained "\<0" syn match lpcFloat display contained "\d\+f" " floating point number, with dot, optional exponent syn match lpcFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" " floating point number, starting with a dot, optional exponent syn match lpcFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" " floating point number, without dot, with exponent syn match lpcFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" " flag an octal number with wrong digits syn match lpcOctalError display contained "0\o*[89]\d*" syn case match " Nodule: Comment string {{{1 " lpcCommentGroup allows adding matches for special things in comments syn keyword lpcTodo contained TODO FIXME XXX syn cluster lpcCommentGroup contains=lpcTodo if exists("c_comment_strings") " A comment can contain lpcString, lpcCharacter and lpcNumber. syntax match lpcCommentSkip contained "^\s*\*\($\|\s\+\)" syntax region lpcCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=lpcSpecial,lpcCommentSkip syntax region lpcComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=lpcSpecial syntax region lpcCommentL start="//" skip="\\$" end="$" keepend contains=@lpcCommentGroup,lpcComment2String,lpcCharacter,lpcNumbersCom,lpcSpaceError syntax region lpcComment matchgroup=lpcCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@lpcCommentGroup,lpcCommentStartError,lpcCommentString,lpcCharacter,lpcNumbersCom,lpcSpaceError else syn region lpcCommentL start="//" skip="\\$" end="$" keepend contains=@lpcCommentGroup,lpcSpaceError syn region lpcComment matchgroup=lpcCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@lpcCommentGroup,lpcCommentStartError,lpcSpaceError endif " keep a // comment separately, it terminates a preproc. conditional syntax match lpcCommentError display "\*/" syntax match lpcCommentStartError display "/\*"me=e-1 contained " Nodule: Pre-processor {{{1 syn region lpcPreCondit start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=lpcComment,lpcCppString,lpcCharacter,lpcCppParen,lpcParenError,lpcNumbers,lpcCommentError,lpcSpaceError syn match lpcPreCondit display "^\s*#\s*\(else\|endif\)\>" if !exists("c_no_if0") syn region lpcCppOut start="^\s*#\s*if\s\+0\+\>" end=".\|$" contains=lpcCppOut2 syn region lpcCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=lpcSpaceError,lpcCppSkip syn region lpcCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=lpcSpaceError,lpcCppSkip endif syn region lpcIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn match lpcIncluded display contained "<[^>]*>" syn match lpcInclude display "^\s*#\s*include\>\s*["<]" contains=lpcIncluded syn match lpcLineSkip "\\$" syn cluster lpcPreProcGroup contains=lpcPreCondit,lpcIncluded,lpcInclude,lpcDefine,lpcErrInParen,lpcErrInBracket,lpcUserLabel,lpcSpecial,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom,lpcString,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcParen,lpcBracket,lpcMulti,lpcKeywdError syn region lpcDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@lpcPreProcGroup if exists("lpc_pre_v22") syn region lpcPreProc start="^\s*#\s*\(pragma\>\|echo\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@lpcPreProcGroup else syn region lpcPreProc start="^\s*#\s*\(pragma\>\|echo\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@lpcPreProcGroup endif " Nodule: User labels {{{1 " Highlight Labels " User labels in LPC is not allowed, only "case x" and "default" is supported syn cluster lpcMultiGroup contains=lpcIncluded,lpcSpecial,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcUserCont,lpcUserLabel,lpcBitField,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom,lpcCppParen,lpcCppBracket,lpcCppString,lpcKeywdError syn region lpcMulti transparent start='\(case\|default\|public\|protected\|private\)' skip='::' end=':' contains=ALLBUT,@lpcMultiGroup syn cluster lpcLabelGroup contains=lpcUserLabel syn match lpcUserCont display "^\s*lpc:$" contains=@lpcLabelGroup " Don't want to match anything syn match lpcUserLabel display "lpc" contained " Nodule: Initializations {{{1 if exists("c_minlines") let b:c_minlines = c_minlines else if !exists("c_no_if0") let b:c_minlines = 50 " #if 0 constructs can be long else let b:c_minlines = 15 " mostly for () constructs endif endif exec "syn sync ccomment lpcComment minlines=" . b:c_minlines " Make sure these options take place since we no longer depend on file type " plugin for C setlocal cindent setlocal fo-=t fo+=croql setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "LPC Source Files (*.c *.d *.h)\t*.c;*.d;*.h\n" . \ "LPC Data Files (*.scr *.o *.dat)\t*.scr;*.o;*.dat\n" . \ "Text Documentation (*.txt)\t*.txt\n" . \ "All Files (*.*)\t*.*\n" endif " Nodule: Highlight links {{{1 " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_lpc_syn_inits") if version < 508 let did_lpc_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink lpcModifier lpcStorageClass HiLink lpcQuotedFmt lpcFormat HiLink lpcFormat lpcSpecial HiLink lpcCppString lpcString " Cpp means " C Pre-Processor HiLink lpcCommentL lpcComment HiLink lpcCommentStart lpcComment HiLink lpcUserLabel lpcLabel HiLink lpcSpecialCharacter lpcSpecial HiLink lpcOctal lpcPreProc HiLink lpcOctalZero lpcSpecial " LPC will treat octal numbers " as decimals, programmers should " be aware of that. HiLink lpcEfunError lpcError HiLink lpcKeywdError lpcError HiLink lpcOctalError lpcError HiLink lpcParenError lpcError HiLink lpcErrInParen lpcError HiLink lpcErrInBracket lpcError HiLink lpcCommentError lpcError HiLink lpcCommentStartError lpcError HiLink lpcSpaceError lpcError HiLink lpcSpecialError lpcError HiLink lpcErrFunc lpcError if exists("lpc_pre_v22") HiLink lpcOldEfuns lpc_efuns HiLink lpcNewEfuns lpcError else HiLink lpcOldEfuns lpcReserved HiLink lpcNewEfuns lpc_efuns endif HiLink lpc_efuns lpcFunction HiLink lpcReserved lpcPreProc HiLink lpcTextString lpcString " This should be preprocessors, but HiLink lpcArrayString lpcPreProc " let's make some difference " between text and array HiLink lpcIncluded lpcString HiLink lpcCommentString lpcString HiLink lpcComment2String lpcString HiLink lpcCommentSkip lpcComment HiLink lpcCommentFunc lpcComment HiLink lpcCppSkip lpcCppOut HiLink lpcCppOut2 lpcCppOut HiLink lpcCppOut lpcComment " Standard type below HiLink lpcApplies Special HiLink lpcCharacter Character HiLink lpcComment Comment HiLink lpcConditional Conditional HiLink lpcConstant Constant HiLink lpcDefine Macro HiLink lpcError Error HiLink lpcFloat Float HiLink lpcFunction Function HiLink lpcIdentifier Identifier HiLink lpcInclude Include HiLink lpcLabel Label HiLink lpcNumber Number HiLink lpcOperator Operator HiLink lpcPreCondit PreCondit HiLink lpcPreProc PreProc HiLink lpcRepeat Repeat HiLink lpcStatement Statement HiLink lpcStorageClass StorageClass HiLink lpcString String HiLink lpcStructure Structure HiLink lpcSpecial LineNr HiLink lpcTodo Todo HiLink lpcType Type delcommand HiLink endif " Nodule: This is the end nodule. {{{1 let b:current_syntax = "lpc" let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8:nosta:sw=2:ai:si: " vim600:set fdm=marker: }}}1
zyz2011-vim
runtime/syntax/lpc.vim
Vim Script
gpl2
23,387
" Vim syntax file " Language: Structured Query Report Writer (SQR) " Maintainer: Nathan Stratton Treadway (nathanst at ontko dot com) " URL: http://www.ontko.com/sqr/#editor_config_files " " Modification History: " 2002-Apr-12: Updated for SQR v6.x " 2002-Jul-30: Added { and } to iskeyword definition " 2003-Oct-15: Allow "." in variable names " highlight entire open '... literal when it contains " "''" inside it (e.g. "'I can''t say" is treated " as one open string, not one terminated and one open) " {} variables can occur inside of '...' literals " " Thanks to the previous maintainer of this file, Jeff Lanzarotta: " http://lanzarotta.tripod.com/vim.html " jefflanzarotta at yahoo dot 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") finish endif if version >= 600 setlocal iskeyword=@,48-57,_,-,#,$,{,} else set iskeyword=@,48-57,_,-,#,$,{,} endif syn case ignore " BEGIN GENERATED SECTION ============================================ " Generated by generate_vim_syntax.sqr at 2002/04/11 13:04 " (based on the UltraEdit syntax file for SQR 6.1.4 " found at http://www.ontko.com/sqr/#editor_config_files ) syn keyword sqrSection begin-footing begin-heading begin-procedure syn keyword sqrSection begin-program begin-report begin-setup syn keyword sqrSection end-footing end-heading end-procedure syn keyword sqrSection end-program end-report end-setup syn keyword sqrParagraph alter-color-map alter-connection syn keyword sqrParagraph alter-locale alter-printer alter-report syn keyword sqrParagraph begin-document begin-execute begin-select syn keyword sqrParagraph begin-sql declare-chart declare-image syn keyword sqrParagraph declare-color-map declare-connection syn keyword sqrParagraph declare-layout declare-printer syn keyword sqrParagraph declare-report declare-procedure syn keyword sqrParagraph declare-toc declare-variable end-declare syn keyword sqrParagraph end-document end-select exit-select end-sql syn keyword sqrParagraph load-lookup syn keyword sqrReserved #current-column #current-date #current-line syn keyword sqrReserved #end-file #page-count #return-status syn keyword sqrReserved #sql-count #sql-status #sqr-max-columns syn keyword sqrReserved #sqr-max-lines #sqr-pid #sqr-toc-level syn keyword sqrReserved #sqr-toc-page $sqr-database {sqr-database} syn keyword sqrReserved $sqr-dbcs {sqr-dbcs} $sqr-encoding syn keyword sqrReserved {sqr-encoding} $sqr-encoding-console syn keyword sqrReserved {sqr-encoding-console} syn keyword sqrReserved $sqr-encoding-database syn keyword sqrReserved {sqr-encoding-database} syn keyword sqrReserved $sqr-encoding-file-input syn keyword sqrReserved {sqr-encoding-file-input} syn keyword sqrReserved $sqr-encoding-file-output syn keyword sqrReserved {sqr-encoding-file-output} syn keyword sqrReserved $sqr-encoding-report-input syn keyword sqrReserved {sqr-encoding-report-input} syn keyword sqrReserved $sqr-encoding-report-output syn keyword sqrReserved {sqr-encoding-report-output} syn keyword sqrReserved $sqr-encoding-source {sqr-encoding-source} syn keyword sqrReserved $sql-error $sqr-hostname {sqr-hostname} syn keyword sqrReserved $sqr-locale $sqr-platform {sqr-platform} syn keyword sqrReserved $sqr-program $sqr-report $sqr-toc-text syn keyword sqrReserved $sqr-ver $username syn keyword sqrPreProc #define #else #end-if #endif #if #ifdef syn keyword sqrPreProc #ifndef #include syn keyword sqrCommand add array-add array-divide array-multiply syn keyword sqrCommand array-subtract ask break call clear-array syn keyword sqrCommand close columns commit concat connect syn keyword sqrCommand create-array create-color-palette date-time syn keyword sqrCommand display divide do dollar-symbol else encode syn keyword sqrCommand end-evaluate end-if end-while evaluate syn keyword sqrCommand execute extract find get get-color goto syn keyword sqrCommand graphic if input last-page let lookup syn keyword sqrCommand lowercase mbtosbs money-symbol move syn keyword sqrCommand multiply new-page new-report next-column syn keyword sqrCommand next-listing no-formfeed open page-number syn keyword sqrCommand page-size position print print-bar-code syn keyword sqrCommand print-chart print-direct print-image syn keyword sqrCommand printer-deinit printer-init put read syn keyword sqrCommand rollback security set-color set-delay-print syn keyword sqrCommand set-generations set-levels set-members syn keyword sqrCommand sbtombs show stop string subtract toc-entry syn keyword sqrCommand unstring uppercase use use-column syn keyword sqrCommand use-printer-type use-procedure use-report syn keyword sqrCommand while write syn keyword sqrParam 3d-effects after after-bold after-page syn keyword sqrParam after-report after-toc and as at-end before syn keyword sqrParam background batch-mode beep before-bold syn keyword sqrParam before-page before-report before-toc blink syn keyword sqrParam bold border bottom-margin box break by syn keyword sqrParam caption center char char-size char-width syn keyword sqrParam chars-inch chart-size checksum cl syn keyword sqrParam clear-line clear-screen color color-palette syn keyword sqrParam cs color_ data-array syn keyword sqrParam data-array-column-count syn keyword sqrParam data-array-column-labels syn keyword sqrParam data-array-row-count data-labels date syn keyword sqrParam date-edit-mask date-seperator syn keyword sqrParam day-of-week-case day-of-week-full syn keyword sqrParam day-of-week-short decimal decimal-seperator syn keyword sqrParam default-numeric delay distinct dot-leader syn keyword sqrParam edit-option-ad edit-option-am syn keyword sqrParam edit-option-bc edit-option-na syn keyword sqrParam edit-option-pm encoding entry erase-page syn keyword sqrParam extent field fill fixed fixed_nolf float syn keyword sqrParam font font-style font-type footing syn keyword sqrParam footing-size foreground for-append syn keyword sqrParam for-reading for-reports for-tocs syn keyword sqrParam for-writing format formfeed from goto-top syn keyword sqrParam group having heading heading-size height syn keyword sqrParam horz-line image-size in indentation syn keyword sqrParam init-string input-date-edit-mask insert syn keyword sqrParam integer into item-color item-size key syn keyword sqrParam layout left-margin legend legend-placement syn keyword sqrParam legend-presentation legend-title level syn keyword sqrParam line-height line-size line-width lines-inch syn keyword sqrParam local locale loops max-columns max-lines syn keyword sqrParam maxlen money money-edit-mask money-sign syn keyword sqrParam money-sign-location months-case months-full syn keyword sqrParam months-short name need newline newpage syn keyword sqrParam no-advance nolf noline noprompt normal not syn keyword sqrParam nowait number number-edit-mask on-break syn keyword sqrParam on-error or order orientation page-depth syn keyword sqrParam paper-size pie-segment-explode syn keyword sqrParam pie-segment-percent-display syn keyword sqrParam pie-segment-quantity-display pitch syn keyword sqrParam point-markers point-size printer syn keyword sqrParam printer-type quiet record reset-string syn keyword sqrParam return_value reverse right-margin rows save syn keyword sqrParam select size skip skiplines sort source syn keyword sqrParam sqr-database sqr-platform startup-file syn keyword sqrParam status stop sub-title symbol-set system syn keyword sqrParam table text thousand-seperator syn keyword sqrParam time-seperator times title to toc syn keyword sqrParam top-margin type underline update using syn keyword sqrParam value vary vert-line wait warn when syn keyword sqrParam when-other where with x-axis-grid syn keyword sqrParam x-axis-label x-axis-major-increment syn keyword sqrParam x-axis-major-tick-marks x-axis-max-value syn keyword sqrParam x-axis-min-value x-axis-minor-increment syn keyword sqrParam x-axis-minor-tick-marks x-axis-rotate syn keyword sqrParam x-axis-scale x-axis-tick-mark-placement xor syn keyword sqrParam y-axis-grid y-axis-label syn keyword sqrParam y-axis-major-increment syn keyword sqrParam y-axis-major-tick-marks y-axis-max-value syn keyword sqrParam y-axis-min-value y-axis-minor-increment syn keyword sqrParam y-axis-minor-tick-marks y-axis-scale syn keyword sqrParam y-axis-tick-mark-placement y2-type syn keyword sqrParam y2-data-array y2-data-array-row-count syn keyword sqrParam y2-data-array-column-count syn keyword sqrParam y2-data-array-column-labels syn keyword sqrParam y2-axis-color-palette y2-axis-label syn keyword sqrParam y2-axis-major-increment syn keyword sqrParam y2-axis-major-tick-marks y2-axis-max-value syn keyword sqrParam y2-axis-min-value y2-axis-minor-increment syn keyword sqrParam y2-axis-minor-tick-marks y2-axis-scale syn keyword sqrFunction abs acos asin atan array ascii asciic ceil syn keyword sqrFunction cos cosh chr cond deg delete dateadd syn keyword sqrFunction datediff datenow datetostr e10 exp edit syn keyword sqrFunction exists floor getenv instr instrb isblank syn keyword sqrFunction isnull log log10 length lengthb lengthp syn keyword sqrFunction lengtht lower lpad ltrim mod nvl power rad syn keyword sqrFunction round range replace roman rpad rtrim rename syn keyword sqrFunction sign sin sinh sqrt substr substrb substrp syn keyword sqrFunction substrt strtodate tan tanh trunc to_char syn keyword sqrFunction to_multi_byte to_number to_single_byte syn keyword sqrFunction transform translate unicode upper wrapdepth " END GENERATED SECTION ============================================== " Variables syn match sqrVariable /\(\$\|#\|&\)\(\k\|\.\)*/ " Debug compiler directives syn match sqrPreProc /\s*#debug\a\=\(\s\|$\)/ syn match sqrSubstVar /{\k*}/ " Strings " Note: if an undoubled ! is found, this is not a valid string " (SQR will treat the end of the line as a comment) syn match sqrString /'\(!!\|[^!']\)*'/ contains=sqrSubstVar syn match sqrStrOpen /'\(!!\|''\|[^!']\)*$/ " If we find a ' followed by an unmatched ! before a matching ', " flag the error. syn match sqrError /'\(!!\|[^'!]\)*![^!]/me=e-1 syn match sqrError /'\(!!\|[^'!]\)*!$/ " Numbers: syn match sqrNumber /-\=\<\d*\.\=[0-9_]\>/ " Comments: " Handle comments that start with "!=" specially; they are only valid " in the first column of the source line. Also, "!!" is only treated " as a start-comment if there is only whitespace ahead of it on the line. syn keyword sqrTodo TODO FIXME XXX DEBUG NOTE ### syn match sqrTodo /???/ if version >= 600 " See also the sqrString section above for handling of ! characters " inside of strings. (Those patterns override the ones below.) syn match sqrComment /!\@<!!\([^!=].*\|$\)/ contains=sqrTodo " the ! can't be preceded by another !, " and must be followed by at least one " character other than ! or =, or immediately " by the end-of-line syn match sqrComment /^!=.*/ contains=sqrTodo syn match sqrComment /^!!.*/ contains=sqrTodo syn match sqrError /^\s\+\zs!=.*/ " it's an error to have "!=" preceded by " just whitespace on the line ("!=" " preceded by non-whitespace is treated " as neither a comment nor an error, since " it is often correct, i.e. " if #count != 7 syn match sqrError /.\+\zs!!.*/ " a "!!" anywhere but at the beginning of " the line is always an error else "For versions before 6.0, same idea as above but we are limited "to simple patterns only. Also, the sqrString patterns above "don't seem to take precedence in v5 as they do in v6, so "we split the last rule to ignore comments found inside of "string literals. syn match sqrComment /!\([^!=].*\|$\)/ contains=sqrTodo syn match sqrComment /^!=.*/ contains=sqrTodo syn match sqrComment /^!!.*/ contains=sqrTodo syn match sqrError /^\s\+!=.*/ syn match sqrError /^[^'!]\+!!/ " flag !! on lines that don't have ! or ' syn match sqrError /^\([^!']*'[^']*'[^!']*\)\+!!/ " flag !! found after matched ' ' chars " (that aren't also commented) endif " Define the default highlighting. " For version 5.7 and earlier, only when not done already. " For version 5.8 and later, only when an item doesn't have highlighting yet. if version >= 508 || !exists("did_sqr_syn_inits") if version < 508 let did_sqr_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink sqrSection Statement HiLink sqrParagraph Statement HiLink sqrReserved Statement HiLink sqrParameter Statement HiLink sqrPreProc PreProc HiLink sqrSubstVar PreProc HiLink sqrCommand Statement HiLink sqrParam Type HiLink sqrFunction Special HiLink sqrString String HiLink sqrStrOpen Todo HiLink sqrNumber Number HiLink sqrVariable Identifier HiLink sqrComment Comment HiLink sqrTodo Todo HiLink sqrError Error delcommand HiLink endif let b:current_syntax = "sqr" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/sqr.vim
Vim Script
gpl2
14,193
" Vim syntax file " Language: Vim help file " Maintainer: Bram Moolenaar (Bram@vim.org) " Last Change: 2012 May 18 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()]*[ \t]\+\*"me=e-1 syn match helpSectionDelim "^=\{3,}.*===$" syn match helpSectionDelim "^-\{3,}.*--$" syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" if has("ebcdic") syn match helpHyperTextJump "\\\@<!|[^"*|]\+|" contains=helpBar syn match helpHyperTextEntry "\*[^"*|]\+\*\s"he=e-1 contains=helpStar syn match helpHyperTextEntry "\*[^"*|]\+\*$" contains=helpStar else syn match helpHyperTextJump "\\\@<!|[#-)!+-~]\+|" contains=helpBar syn match helpHyperTextEntry "\*[#-)!+-~]\+\*\s"he=e-1 contains=helpStar syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" contains=helpStar endif if has("conceal") syn match helpBar contained "[|`]" conceal syn match helpStar contained "\*" conceal else syn match helpBar contained "[|`]" syn match helpStar contained "\*" endif syn match helpNormal "|.*====*|" syn match helpNormal "|||" syn match helpNormal ":|vim:|" " for :help modeline syn match helpVim "Vim version [0-9.a-z]\+" syn match helpVim "VIM REFERENCE.*" syn match helpOption "'[a-z]\{2,\}'" syn match helpOption "'t_..'" syn match helpCommand "`[^` ]*`"hs=s+1,he=e-1 contains=helpBar syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore if has("conceal") syn match helpIgnore "." contained conceal else syn match helpIgnore "." contained endif syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes: syn match helpSpecial "\<N\>" syn match helpSpecial "\<N\.$"me=e-1 syn match helpSpecial "\<N\.\s"me=e-2 syn match helpSpecial "(N\>"ms=s+1 syn match helpSpecial "\[N]" " avoid highlighting N N in help.txt syn match helpSpecial "N N"he=s+1 syn match helpSpecial "Nth"me=e-2 syn match helpSpecial "N-1"me=e-2 syn match helpSpecial "{[-a-zA-Z0-9'":%#=[\]<>.,]\+}" syn match helpSpecial "{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}" syn match helpSpecial "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1 syn match helpSpecial "<[-a-zA-Z0-9_]\+>" syn match helpSpecial "<[SCM]-.>" syn match helpNormal "<---*>" syn match helpSpecial "\[range]" syn match helpSpecial "\[line]" syn match helpSpecial "\[count]" syn match helpSpecial "\[offset]" syn match helpSpecial "\[cmd]" syn match helpSpecial "\[num]" syn match helpSpecial "\[+num]" syn match helpSpecial "\[-num]" syn match helpSpecial "\[+cmd]" syn match helpSpecial "\[++opt]" syn match helpSpecial "\[arg]" syn match helpSpecial "\[arguments]" syn match helpSpecial "\[ident]" syn match helpSpecial "\[addr]" syn match helpSpecial "\[group]" syn match helpSpecial "CTRL-." syn match helpSpecial "CTRL-Break" syn match helpSpecial "CTRL-PageUp" syn match helpSpecial "CTRL-PageDown" syn match helpSpecial "CTRL-Insert" syn match helpSpecial "CTRL-Del" syn match helpSpecial "CTRL-{char}" syn region helpNotVi start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump syn match helpLeadBlank "^\s\+" contained " Highlight group items in their own color. syn match helpComment "\t[* ]Comment\t\+[a-z].*" syn match helpConstant "\t[* ]Constant\t\+[a-z].*" syn match helpString "\t[* ]String\t\+[a-z].*" syn match helpCharacter "\t[* ]Character\t\+[a-z].*" syn match helpNumber "\t[* ]Number\t\+[a-z].*" syn match helpBoolean "\t[* ]Boolean\t\+[a-z].*" syn match helpFloat "\t[* ]Float\t\+[a-z].*" syn match helpIdentifier "\t[* ]Identifier\t\+[a-z].*" syn match helpFunction "\t[* ]Function\t\+[a-z].*" syn match helpStatement "\t[* ]Statement\t\+[a-z].*" syn match helpConditional "\t[* ]Conditional\t\+[a-z].*" syn match helpRepeat "\t[* ]Repeat\t\+[a-z].*" syn match helpLabel "\t[* ]Label\t\+[a-z].*" syn match helpOperator "\t[* ]Operator\t\+["a-z].*" syn match helpKeyword "\t[* ]Keyword\t\+[a-z].*" syn match helpException "\t[* ]Exception\t\+[a-z].*" syn match helpPreProc "\t[* ]PreProc\t\+[a-z].*" syn match helpInclude "\t[* ]Include\t\+[a-z].*" syn match helpDefine "\t[* ]Define\t\+[a-z].*" syn match helpMacro "\t[* ]Macro\t\+[a-z].*" syn match helpPreCondit "\t[* ]PreCondit\t\+[a-z].*" syn match helpType "\t[* ]Type\t\+[a-z].*" syn match helpStorageClass "\t[* ]StorageClass\t\+[a-z].*" syn match helpStructure "\t[* ]Structure\t\+[a-z].*" syn match helpTypedef "\t[* ]Typedef\t\+[Aa-z].*" syn match helpSpecial "\t[* ]Special\t\+[a-z].*" syn match helpSpecialChar "\t[* ]SpecialChar\t\+[a-z].*" syn match helpTag "\t[* ]Tag\t\+[a-z].*" syn match helpDelimiter "\t[* ]Delimiter\t\+[a-z].*" syn match helpSpecialComment "\t[* ]SpecialComment\t\+[a-z].*" syn match helpDebug "\t[* ]Debug\t\+[a-z].*" syn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*" syn match helpError "\t[* ]Error\t\+[a-z].*" syn match helpTodo "\t[* ]Todo\t\+[a-z].*" syn match helpURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-zA-Z0-9/]` " Additionally load a language-specific syntax file "help_ab.vim". let s:i = match(expand("%"), '\.\a\ax$') if s:i > 0 exe "runtime syntax/help_" . strpart(expand("%"), s:i + 1, 2) . ".vim" endif " Italian if v:lang =~ '\<IT\>' || v:lang =~ '_IT\>' || v:lang =~? "italian" syn keyword helpNote nota Nota NOTA nota: Nota: NOTA: notare Notare NOTARE notare: Notare: NOTARE: syn match helpSpecial "Nma"me=e-2 syn match helpSpecial "Nme"me=e-2 syn match helpSpecial "Nmi"me=e-2 syn match helpSpecial "Nmo"me=e-2 syn match helpSpecial "\[interv.]" syn region helpNotVi start="{non" start="{solo" start="{disponibile" end="}" contains=helpLeadBlank,helpHyperTextJump endif syn sync minlines=40 " Define the default highlighting. " Only used when an item doesn't have highlighting yet hi def link helpIgnore Ignore hi def link helpHyperTextJump Subtitle hi def link helpBar Ignore hi def link helpStar Ignore hi def link helpHyperTextEntry String hi def link helpHeadline Statement hi def link helpHeader PreProc hi def link helpSectionDelim PreProc hi def link helpVim Identifier hi def link helpCommand Comment hi def link helpExample Comment hi def link helpOption Type hi def link helpNotVi Special hi def link helpSpecial Special hi def link helpNote Todo hi def link Subtitle Identifier hi def link helpComment Comment hi def link helpConstant Constant hi def link helpString String hi def link helpCharacter Character hi def link helpNumber Number hi def link helpBoolean Boolean hi def link helpFloat Float hi def link helpIdentifier Identifier hi def link helpFunction Function hi def link helpStatement Statement hi def link helpConditional Conditional hi def link helpRepeat Repeat hi def link helpLabel Label hi def link helpOperator Operator hi def link helpKeyword Keyword hi def link helpException Exception hi def link helpPreProc PreProc hi def link helpInclude Include hi def link helpDefine Define hi def link helpMacro Macro hi def link helpPreCondit PreCondit hi def link helpType Type hi def link helpStorageClass StorageClass hi def link helpStructure Structure hi def link helpTypedef Typedef hi def link helpSpecialChar SpecialChar hi def link helpTag Tag hi def link helpDelimiter Delimiter hi def link helpSpecialComment SpecialComment hi def link helpDebug Debug hi def link helpUnderlined Underlined hi def link helpError Error hi def link helpTodo Todo hi def link helpURL String let b:current_syntax = "help" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/help.vim
Vim Script
gpl2
7,749
" Vim syntax file " Language: Jess " Maintainer: Paul Baleme <pbaleme@mail.com> " Last change: September 14, 2000 " Based on lisp.vim by : Dr. Charles E. Campbell, Jr. " 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") finish endif if version < 600 set iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ else setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ endif " Lists syn match jessSymbol ![^()'`,"; \t]\+! contained syn match jessBarSymbol !|..\{-}|! contained syn region jessList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSymbol,jessSpecial,jessFunc,jessKey,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol,jessVar syn region jessBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSpecial,jessSymbol,jessFunc,jessKey,jessVar,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol " Atoms syn match jessAtomMark "'" syn match jessAtom "'("me=e-1 contains=jessAtomMark nextgroup=jessAtomList syn match jessAtom "'[^ \t()]\+" contains=jessAtomMark syn match jessAtomBarSymbol !'|..\{-}|! contains=jessAtomMark syn region jessAtom start=+'"+ skip=+\\"+ end=+"+ syn region jessAtomList matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contained contains=jessAtomList,jessAtomNmbr0,jessString,jessComment,jessAtomBarSymbol syn match jessAtomNmbr "\<[0-9]\+" contained " Standard jess Functions and Macros syn keyword jessFunc * + ** - / < > <= >= <> = syn keyword jessFunc long longp syn keyword jessFunc abs agenda and syn keyword jessFunc assert assert-string bag syn keyword jessFunc batch bind bit-and syn keyword jessFunc bit-not bit-or bload syn keyword jessFunc bsave build call syn keyword jessFunc clear clear-storage close syn keyword jessFunc complement$ context count-query-results syn keyword jessFunc create$ syn keyword jessFunc delete$ div syn keyword jessFunc do-backward-chaining e syn keyword jessFunc engine eq eq* syn keyword jessFunc eval evenp exit syn keyword jessFunc exp explode$ external-addressp syn keyword jessFunc fact-slot-value facts fetch syn keyword jessFunc first$ float floatp syn keyword jessFunc foreach format gensym* syn keyword jessFunc get get-fact-duplication syn keyword jessFunc get-member get-multithreaded-io syn keyword jessFunc get-reset-globals get-salience-evaluation syn keyword jessFunc halt if implode$ syn keyword jessFunc import insert$ integer syn keyword jessFunc integerp intersection$ jess-version-number syn keyword jessFunc jess-version-string length$ syn keyword jessFunc lexemep list-function$ load-facts syn keyword jessFunc load-function load-package log syn keyword jessFunc log10 lowcase matches syn keyword jessFunc max member$ min syn keyword jessFunc mod modify multifieldp syn keyword jessFunc neq new not syn keyword jessFunc nth$ numberp oddp syn keyword jessFunc open or pi syn keyword jessFunc ppdeffunction ppdefglobal ddpefrule syn keyword jessFunc printout random read syn keyword jessFunc readline replace$ reset syn keyword jessFunc rest$ retract retract-string syn keyword jessFunc return round rules syn keyword jessFunc run run-query run-until-halt syn keyword jessFunc save-facts set set-fact-duplication syn keyword jessFunc set-factory set-member set-multithreaded-io syn keyword jessFunc set-node-index-hash set-reset-globals syn keyword jessFunc set-salience-evaluation set-strategy syn keyword jessFunc setgen show-deffacts show-deftemplates syn keyword jessFunc show-jess-listeners socket syn keyword jessFunc sqrt store str-cat syn keyword jessFunc str-compare str-index str-length syn keyword jessFunc stringp sub-string subseq$ syn keyword jessFunc subsetp sym-cat symbolp syn keyword jessFunc system throw time syn keyword jessFunc try undefadvice undefinstance syn keyword jessFunc undefrule union$ unwatch syn keyword jessFunc upcase view watch syn keyword jessFunc while syn match jessFunc "\<c[ad]\+r\>" " jess Keywords (modifiers) syn keyword jessKey defglobal deffunction defrule syn keyword jessKey deffacts syn keyword jessKey defadvice defclass definstance " Standard jess Variables syn region jessVar start="?" end="[^a-zA-Z0-9]"me=e-1 " Strings syn region jessString start=+"+ skip=+\\"+ end=+"+ " Shared with Declarations, Macros, Functions "syn keyword jessDeclaration syn match jessNumber "[0-9]\+" syn match jessSpecial "\*[a-zA-Z_][a-zA-Z_0-9-]*\*" syn match jessSpecial !#|[^()'`,"; \t]\+|#! syn match jessSpecial !#x[0-9a-fA-F]\+! syn match jessSpecial !#o[0-7]\+! syn match jessSpecial !#b[01]\+! syn match jessSpecial !#\\[ -\~]! syn match jessSpecial !#[':][^()'`,"; \t]\+! syn match jessSpecial !#([^()'`,"; \t]\+)! syn match jessConcat "\s\.\s" syntax match jessParenError ")" " Comments syn match jessComment ";.*$" " synchronization syn sync lines=100 " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet if version >= 508 || !exists("did_jess_syntax_inits") if version < 508 let did_jess_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink jessAtomNmbr jessNumber HiLink jessAtomMark jessMark HiLink jessAtom Identifier HiLink jessAtomBarSymbol Special HiLink jessBarSymbol Special HiLink jessComment Comment HiLink jessConcat Statement HiLink jessDeclaration Statement HiLink jessFunc Statement HiLink jessKey Type HiLink jessMark Delimiter HiLink jessNumber Number HiLink jessParenError Error HiLink jessSpecial Type HiLink jessString String HiLink jessVar Identifier delcommand HiLink endif let b:current_syntax = "jess" " vim: ts=18
zyz2011-vim
runtime/syntax/jess.vim
Vim Script
gpl2
6,682
" Vim default file " Language: Racc input file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-06-22 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword raccTodo contained TODO FIXME XXX NOTE syn region raccComment start='/\*' end='\*/' \ contains=raccTodo,@Spell syn region raccComment display oneline start='#' end='$' \ contains=raccTodo,@Spell syn region raccClass transparent matchgroup=raccKeyword \ start='\<class\>' end='\<rule\>'he=e-4 \ contains=raccComment,raccPrecedence, \ raccTokenDecl,raccExpect,raccOptions,raccConvert, \ raccStart, syn region raccPrecedence transparent matchgroup=raccKeyword \ start='\<prechigh\>' end='\<preclow\>' \ contains=raccComment,raccPrecSpec syn keyword raccPrecSpec contained nonassoc left right \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn match raccPrecToken contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn region raccPrecString matchgroup=raccPrecString start=+"+ \ skip=+\\\\\|\\"+ end=+"+ \ contains=raccSpecial \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn region raccPrecString matchgroup=raccPrecString start=+'+ \ skip=+\\\\\|\\'+ end=+'+ contains=raccSpecial \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn keyword raccTokenDecl contained token \ nextgroup=raccTokenR skipwhite skipnl syn match raccTokenR contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccTokenR skipwhite skipnl syn keyword raccExpect contained expect \ nextgroup=raccNumber skipwhite skipnl syn match raccNumber contained '\<\d\+\>' syn keyword raccOptions contained options \ nextgroup=raccOptionsR skipwhite skipnl syn keyword raccOptionsR contained omit_action_call result_var \ nextgroup=raccOptionsR skipwhite skipnl syn region raccConvert transparent contained matchgroup=raccKeyword \ start='\<convert\>' end='\<end\>' \ contains=raccComment,raccConvToken skipwhite \ skipnl syn match raccConvToken contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccString skipwhite skipnl syn keyword raccStart contained start \ nextgroup=raccTargetS skipwhite skipnl syn match raccTargetS contained '\<\l[a-z0-9_]*\>' syn match raccSpecial contained '\\["'\\]' syn region raccString start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=raccSpecial syn region raccString start=+'+ skip=+\\\\\|\\'+ end=+'+ \ contains=raccSpecial syn region raccRules transparent matchgroup=raccKeyword start='\<rule\>' \ end='\<end\>' contains=raccComment,raccString, \ raccNumber,raccToken,raccTarget,raccDelimiter, \ raccAction syn match raccTarget contained '\<\l[a-z0-9_]*\>' syn match raccDelimiter contained '[:|]' syn match raccToken contained '\<\u[A-Z0-9_]*\>' syn include @raccRuby syntax/ruby.vim syn region raccAction transparent matchgroup=raccDelimiter \ start='{' end='}' contains=@raccRuby syn region raccHeader transparent matchgroup=raccPreProc \ start='^---- header.*' end='^----'he=e-4 \ contains=@raccRuby syn region raccInner transparent matchgroup=raccPreProc \ start='^---- inner.*' end='^----'he=e-4 \ contains=@raccRuby syn region raccFooter transparent matchgroup=raccPreProc \ start='^---- footer.*' end='^----'he=e-4 \ contains=@raccRuby syn sync match raccSyncHeader grouphere raccHeader '^---- header' syn sync match raccSyncInner grouphere raccInner '^---- inner' syn sync match raccSyncFooter grouphere raccFooter '^---- footer' hi def link raccTodo Todo hi def link raccComment Comment hi def link raccPrecSpec Type hi def link raccPrecToken raccToken hi def link raccPrecString raccString hi def link raccTokenDecl Keyword hi def link raccToken Identifier hi def link raccTokenR raccToken hi def link raccExpect Keyword hi def link raccNumber Number hi def link raccOptions Keyword hi def link raccOptionsR Identifier hi def link raccConvToken raccToken hi def link raccStart Keyword hi def link raccTargetS Type hi def link raccSpecial special hi def link raccString String hi def link raccTarget Type hi def link raccDelimiter Delimiter hi def link raccPreProc PreProc hi def link raccKeyword Keyword let b:current_syntax = "racc" let &cpo = s:cpo_save unlet s:cpo_save
zyz2011-vim
runtime/syntax/racc.vim
Vim Script
gpl2
5,607
" Vim syntax file " Language: Debian control files " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> " Last Change: 2011 Dec 09 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim " Standard syntax initialization if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Should match case except for the keys of each field syn case match " Everything that is not explicitly matched by the rules below syn match debcontrolElse "^.*$" " Common seperators syn match debControlComma ", *" syn match debControlSpace " " " Define some common expressions we can use later on syn match debcontrolArchitecture contained "\%(all\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\|hf\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\|any\)" syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)" syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+" syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)" syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)" syn match debcontrolPackageType contained "u\?deb" syn match debcontrolVariable contained "\${.\{-}}" syn match debcontrolDmUpload contained "\cyes" " A URL (using the domain name definitions from RFC 1034 and 1738), right now " only enforce protocol and some sanity on the server/path part; syn match debcontrolHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" syn match debcontrolVcsSvn contained "\vsvn%(\+ssh)?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" syn match debcontrolVcsCvs contained "\v%(\-d *)?:pserver:[^@]+\@[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?:/[^[:space:]]*%( [^[:space:]]+)?$" syn match debcontrolVcsGit contained "\v%(git|http)://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" " An email address syn match debcontrolEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+" syn match debcontrolEmail "<.\{-}>" " #-Comments syn match debcontrolComment "^#.*$" syn case ignore " List of all legal keys syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Multi-Arch\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|\%(XC-\)\=Package-Type\|\%(XS-\)\=DM-Upload-Allowed\): *" " Fields for which we do strict syntax checking syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline syn region debcontrolStrictField start="^Multi-Arch" end="$" contains=debcontrolKey,debcontrolMultiArch oneline syn region debcontrolStrictField start="^\(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline syn region debcontrolStrictField start="^\%(XC-\)\=Package-Type" end="$" contains=debcontrolKey,debcontrolPackageType oneline syn region debcontrolStrictField start="^Homepage" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\)" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Svn" end="$" contains=debcontrolKey,debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolKey,debcontrolDmUpload oneline " Catch-all for the other legal fields syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment " Associate our matches and regions with pretty colours if version >= 508 || !exists("did_debcontrol_syn_inits") if version < 508 let did_debcontrol_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink debcontrolKey Keyword HiLink debcontrolField Normal HiLink debcontrolStrictField Error HiLink debcontrolMultiField Normal HiLink debcontrolArchitecture Normal HiLink debcontrolMultiArch Normal HiLink debcontrolName Normal HiLink debcontrolPriority Normal HiLink debcontrolSection Normal HiLink debcontrolPackageType Normal HiLink debcontrolVariable Identifier HiLink debcontrolEmail Identifier HiLink debcontrolVcsSvn Identifier HiLink debcontrolVcsCvs Identifier HiLink debcontrolVcsGit Identifier HiLink debcontrolHTTPUrl Identifier HiLink debcontrolDmUpload Identifier HiLink debcontrolComment Comment HiLink debcontrolElse Special delcommand HiLink endif let b:current_syntax = "debcontrol" " vim: ts=8 sw=2
zyz2011-vim
runtime/syntax/debcontrol.vim
Vim Script
gpl2
6,906