summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-02-08 09:20:24 +0000
committerBram Moolenaar <Bram@vim.org>2006-02-08 09:20:24 +0000
commit8b6144bdfe9efccab5045ebef9f3d5dcf5ee9d00 (patch)
tree51d8d6df519d53d4124f3155bb2c3bcbca450226 /runtime
parent9f2c6e1deb931db29f9d3d6e1113cd1ccc835d21 (diff)
downloadvim-git-8b6144bdfe9efccab5045ebef9f3d5dcf5ee9d00.tar.gz
updated for version 7.0194v7.0194
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/ccomplete.vim17
-rw-r--r--runtime/autoload/htmlcomplete.vim130
-rw-r--r--runtime/autoload/javascriptcomplete.vim207
-rw-r--r--runtime/autoload/xmlcomplete.vim6
-rw-r--r--runtime/doc/index.txt1
-rw-r--r--runtime/doc/insert.txt95
-rw-r--r--runtime/doc/netbeans.txt12
-rw-r--r--runtime/doc/tags3
-rw-r--r--runtime/doc/todo.txt21
-rw-r--r--runtime/doc/various.txt9
-rw-r--r--runtime/doc/version7.txt36
-rw-r--r--runtime/ftplugin/lprolog.vim6
-rw-r--r--runtime/ftplugin/ocaml.vim3
-rw-r--r--runtime/syntax/dot.vim6
-rw-r--r--runtime/syntax/lprolog.vim6
-rw-r--r--runtime/syntax/sh.vim8
-rw-r--r--runtime/syntax/sml.vim6
-rw-r--r--runtime/syntax/vim.vim19
18 files changed, 431 insertions, 160 deletions
diff --git a/runtime/autoload/ccomplete.vim b/runtime/autoload/ccomplete.vim
index 5e0c2aea3..7a840b12e 100644
--- a/runtime/autoload/ccomplete.vim
+++ b/runtime/autoload/ccomplete.vim
@@ -1,7 +1,7 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2006 Feb 03
+" Last Change: 2006 Feb 06
" This function is used for the 'omnifunc' option.
@@ -213,22 +213,29 @@ endfunction
" 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 x = substitute(a:val['cmd'], '^/^', '', '')
+ let x = substitute(x, '$/$', '', '')
+ let x = substitute(x, a:val['name'], '@@', '')
if has_key(a:val, "kind")
if a:val["kind"] == 'v'
- return {'match': a:val['name'], 'tagline': "\t" . a:val['cmd'], 'dict': a:val}
+ return {'match': a:val['name'], 'tagline': "\t" . a:val['cmd'], 'dict': a:val, 'extra': x}
endif
if a:val["kind"] == 'f'
- return {'match': a:val['name'] . '(', 'tagline': ""}
+ return {'match': a:val['name'] . '(', 'tagline': "", 'extra': x}
endif
endif
- return {'match': a:val['name'], 'tagline': ''}
+ return {'match': a:val['name'], 'tagline': '', 'extra': x}
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)
- return a:val['match'] . a:brackets . s:GetAddition(a:val['tagline'], a:val['match'], [a:val], a:brackets == '')
+ let word = a:val['match'] . a:brackets . s:GetAddition(a:val['tagline'], a:val['match'], [a:val], a:brackets == '')
+ if has_key(a:val, 'extra')
+ return {'word': word, 'menu': a:val['extra']}
+ endif
+ return {'word': word, 'menu': substitute(a:val['tagline'], word, '@@', '')}
endfunction
diff --git a/runtime/autoload/htmlcomplete.vim b/runtime/autoload/htmlcomplete.vim
index cf76e69cc..a6295373e 100644
--- a/runtime/autoload/htmlcomplete.vim
+++ b/runtime/autoload/htmlcomplete.vim
@@ -1,7 +1,7 @@
" Vim completion script
" Language: XHTML 1.0 Strict
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2006 Jan 30
+" Last Change: 2006 Feb 6
function! htmlcomplete#CompleteTags(findstart, base)
if a:findstart
@@ -13,11 +13,14 @@ function! htmlcomplete#CompleteTags(findstart, base)
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
@@ -29,6 +32,8 @@ function! htmlcomplete#CompleteTags(findstart, base)
endwhile
endif
endif
+ " }}}
+ " Handling of <script> tag {{{
let scriptstart = searchpair('<script\>', '', '<\/script\>', "bnW")
let scriptend = searchpair('<script\>', '', '<\/script\>', "nW")
if scriptstart != 0 && scriptend != 0
@@ -36,16 +41,44 @@ function! htmlcomplete#CompleteTags(findstart, base)
let start = col('.') - 1
let b:jscompl = 1
let b:jsrange = [scriptstart, scriptend]
- while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
+ while start >= 0 && line[start - 1] =~ '\w'
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. Up to
- " 10?
+ " Look like we may have broken tag. Check previous lines.
let i = 1
while 1
let context_line = getline(curline-i)
@@ -65,6 +98,14 @@ function! htmlcomplete#CompleteTags(findstart, base)
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] =~ '\w'
+ let start -= 1
+ endwhile
+ endif
else
let b:compl_context = getline('.')[0:compl_begin]
endif
@@ -76,14 +117,15 @@ function! htmlcomplete#CompleteTags(findstart, base)
" 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
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
- let context = b:compl_context
- return javascriptcomplete#CompleteJS(0, context)
+ return javascriptcomplete#CompleteJS(0, a:base)
else
if len(b:compl_context) == 0 && !exists("b:entitiescompl")
return []
@@ -91,7 +133,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
let context = matchstr(b:compl_context, '.\zs.*')
endif
unlet! b:compl_context
- " Make entities completion
+ " Entities completion {{{
if exists("b:entitiescompl")
unlet! b:entitiescompl
@@ -122,6 +164,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
endif
+ " }}}
if context =~ '>'
" Generally if context contains > it means we are outside of tag and
" should abandon action - with one exception: <style> span { bo
@@ -142,13 +185,11 @@ function! htmlcomplete#CompleteTags(findstart, base)
\ "onmouseover", "onmouseout", "onkeypress", "onkeydown", "onkeyup"]
let focus = ["accesskey", "tabindex", "onfocus", "onblur"]
let coregroup = coreattrs + i18n + events
- " find tags matching with "context"
" 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 could be also value of attribute...
- " We have to get first word to offer
- " proper completions
+ " It can be also value of attribute.
+ " We have to get first word to offer proper completions
if context == ''
let tag = ''
else
@@ -160,11 +201,12 @@ function! htmlcomplete#CompleteTags(findstart, base)
" 1. Events attributes
if context =~ '\s'
" Sort out style, class, and on* cases
- if context =~ "\\(on[a-z]*\\|id\\|style\\|class\\)\\s*=\\s*[\"']"
- if context =~ "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
- if context =~ "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
+ 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_ -]*$"
+ elseif context =~? "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "id"
endif
" Handle class name completion
@@ -327,17 +369,59 @@ function! htmlcomplete#CompleteTags(findstart, base)
return res + res2
- elseif context =~ "style\\s*=\\s*[\"'][^\"']*$"
+ elseif context =~? "style\\s*=\\s*[\"'][^\"']*$"
return csscomplete#CompleteCSS(0, context)
endif
- let stripbase = matchstr(context, ".*\\(on[a-z]*\\|style\\|class\\)\\s*=\\s*[\"']\\zs.*")
+ " }}}
+ " 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, '\w\+$')
+ let js_shortcontext = substitute(a:base, js_context.'$', '', '')
+ let b:compl_context = context
+ let b:jsrange = [l, l]
+ unlet! l c
+ "return map(javascriptcomplete#CompleteJS(0, js_context), 'js_shortcontext.v:val')
+ 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*[\"']"
" Let do attribute specific completion
@@ -413,6 +497,8 @@ function! htmlcomplete#CompleteTags(findstart, base)
return res + res2
endif
+ " }}}
+ " Attribute completion {{{
" Shorten context to not include last word
let sbase = matchstr(context, '.*\ze\s.*')
if tag =~ '^\(abbr\|acronym\|address\|b\|bdo\|big\|caption\|cite\|code\|dd\|dfn\|div\|dl\|dt\|em\|fieldset\|h\d\|hr\|i\|kbd\|li\|noscript\|ol\|p\|samp\|small\|span\|strong\|sub\|sup\|tt\|ul\|var\)$'
@@ -506,7 +592,8 @@ function! htmlcomplete#CompleteTags(findstart, base)
return res + res2
endif
- " Close tag
+ " }}}
+ " Close tag {{{
let b:unaryTagsStack = "base meta link hr br param img area input col"
if context =~ '^\/'
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
@@ -521,10 +608,13 @@ function! htmlcomplete#CompleteTags(findstart, base)
" If returns empty string assume <body>. Safe bet.
let opentag = 'body'
endif
-
+ " }}}
+ " Load data {{{
if !exists("g:xmldata_xhtml10s")
runtime! autoload/xml/xhtml10s.vim
endif
+ " }}}
+ " Tag completion {{{
let tags = g:xmldata_xhtml10s[opentag][0]
@@ -538,5 +628,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
return res + res2
+ " }}}
endif
endfunction
+" vim:set foldmethod=marker:
diff --git a/runtime/autoload/javascriptcomplete.vim b/runtime/autoload/javascriptcomplete.vim
index 2853fbade..0163fd9b7 100644
--- a/runtime/autoload/javascriptcomplete.vim
+++ b/runtime/autoload/javascriptcomplete.vim
@@ -1,33 +1,47 @@
" Vim completion script
" Language: Java Script
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2006 Jan 30
+" Last Change: 2006 Feb 6
function! javascriptcomplete#CompleteJS(findstart, base)
if a:findstart
- " locate the start of the word
- let line = getline('.')
- let start = col('.') - 1
+ " 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] =~ '\w'
+ while start >= 0 && line[start - 1] =~ '\w'
let start -= 1
- endwhile
+ endwhile
let b:compl_context = getline('.')[0:compl_begin]
- return start
+ return start
else
" Initialize base return lists
- let res = []
- let res2 = []
+ let res = []
+ let res2 = []
" a:base is very short - we need context
- let context = b:compl_context
" Shortcontext is context without a:base, useful for checking if we are
- " looking for objects
+ " 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
@@ -91,7 +105,7 @@ function! javascriptcomplete#CompleteJS(findstart, base)
" RegExp
let regeprop = ['constructor', 'global', 'ignoreCase', 'lastIndex', 'multiline', 'source', 'prototype']
- let regemeth = ['exec', 'toSource', 'toString', 'test', 'watch', 'unwatch']
+ let regemeth = ['exec', 'test', 'toSource', 'toString', 'watch', 'unwatch']
call map(regemeth, 'v:val."("')
let reges = regeprop + regemeth
@@ -106,19 +120,17 @@ function! javascriptcomplete#CompleteJS(findstart, base)
let stris = striprop + strimeth
" User created properties
- if exists("b:jsrange")
- let file = getline(b:jsrange[0],b:jsrange[1])
- unlet! b:jsrange
- else
- let file = getline(1, '$')
- endif
let user_props1 = filter(copy(file), 'v:val =~ "this\\.\\w"')
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\\w\\+\\ze")')
+
let user_props2 = filter(copy(file), 'v:val =~ "\\.prototype\\.\\w"')
- call map(user_props2, 'matchstr(v:val, "\\.prototype\\.\\zs\\w\\+\\ze")')
+ 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\\w\\+\\ze")')
let user_props = user_props1 + user_props2
" HTML DOM properties
@@ -149,7 +161,15 @@ function! javascriptcomplete#CompleteJS(findstart, base)
\ 'onClick', 'onDblClick', 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp',
\ 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onResize']
call map(documeth, 'v:val."("')
- let docus = docuprop + documeth
+ 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']
@@ -178,7 +198,7 @@ function! javascriptcomplete#CompleteJS(findstart, base)
let ifras = ifraprop
" Image - image.
let imagprop = ['align', 'alt', 'border', 'complete', 'height', 'hspace', 'id', 'isMap', 'longDesc',
- \ 'lowsrc', 'name', 'src', 'useMap', 'vspace', 'width']
+ \ 'lowSrc', 'name', 'src', 'useMap', 'vspace', 'width']
let imagmeth = ['onAbort', 'onError', 'onLoad']
call map(imagmeth, 'v:val."("')
let imags = histprop + imagmeth
@@ -282,13 +302,13 @@ function! javascriptcomplete#CompleteJS(findstart, base)
\ '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',
+ \ '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',
@@ -320,13 +340,14 @@ function! javascriptcomplete#CompleteJS(findstart, base)
" Textarea - accessible only by other properties
let tareprop = ['accessKey', 'cols', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'readOnly', 'rows',
- \ 'tabIndex', 'type', 'value']
+ \ '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', 'length', 'name', 'opener', 'parent',
- \ 'self', 'status', 'top']
+ 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']
@@ -334,15 +355,81 @@ function! javascriptcomplete#CompleteJS(findstart, base)
let winds = windprop + windmeth
" XMLHttpRequest - access by new xxx()
let xmlhprop = ['onreadystatechange', 'readyState', 'responseText', 'responseXML',
- \ 'status', 'statusText']
+ \ '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\w\+\ze\(\[.\{-}\]\)\?\.$')
- let decl_line = search(object.'.\{-}=\s*new\s*', 'bn')
- let object_type = matchstr(getline(decl_line), object.'.\{-}=\s*new\s*\zs\w\+\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\w\+\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\w\+\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
@@ -357,13 +444,17 @@ function! javascriptcomplete#CompleteJS(findstart, base)
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 =~ 'anchor\.$'
+ elseif shortcontext =~ 'anchors\(\[.\{-}\]\)\?\.$'
let values = anths
elseif shortcontext =~ 'area\.$'
let values = areas
@@ -373,7 +464,7 @@ function! javascriptcomplete#CompleteJS(findstart, base)
let values = bodys
elseif shortcontext =~ 'document\.$'
let values = docus
- elseif shortcontext =~ 'form\.$'
+ elseif shortcontext =~ 'forms\(\[.\{-}\]\)\?\.$'
let values = forms
elseif shortcontext =~ 'frameset\.$'
let values = fsets
@@ -381,9 +472,9 @@ function! javascriptcomplete#CompleteJS(findstart, base)
let values = hists
elseif shortcontext =~ 'iframe\.$'
let values = ifras
- elseif shortcontext =~ 'image\.$'
+ elseif shortcontext =~ 'images\(\[.\{-}\]\)\?\.$'
let values = imags
- elseif shortcontext =~ 'link\.$'
+ elseif shortcontext =~ 'links\(\[.\{-}\]\)\?\.$'
let values = links
elseif shortcontext =~ 'location\.$'
let values = locas
@@ -405,11 +496,16 @@ function! javascriptcomplete#CompleteJS(findstart, base)
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 + styls
- let values += tabls + trows + winds
+ let values += ifras + imags + links + locas + metas + navis + objes + scres
+ let values += tabls + trows + tares + winds
+ let values += xdomnodes + xdomnliss + xdomelems
endif
endif
@@ -425,21 +521,15 @@ function! javascriptcomplete#CompleteJS(findstart, base)
return res + res2
endif
-
- if exists("b:jsrange")
- let file = getline(b:jsrange[0],b:jsrange[1])
- unlet! b:jsrange
- else
- let file = getline(1, '$')
- 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 is necessary to get variable names from constructs like:
- " var var1, var2, var3 = "something";
+ " 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, "\\w\\+")')
@@ -447,27 +537,36 @@ function! javascriptcomplete#CompleteJS(findstart, base)
endfor
let variables = sort(vars)
+ unlet! vars
- " Add undeclared variables.
+ " Add "no var" variables.
let undeclared_variables = filter(copy(file), 'v:val =~ "^\\s*\\w\\+\\s*="')
- call map(undeclared_variables, 'matchstr(v:val, "^\\s*\\zs\\w\\+\\ze")')
+ 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, "\\w\\+$")')
+ let u_vars += split_equal
+ endfor
- let variables += sort(undeclared_variables)
+ 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\\w\\+")')
call map(functions, 'v:val."("')
+ let functions = sort(functions)
" 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 = []
+ 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']
@@ -493,3 +592,5 @@ function! javascriptcomplete#CompleteJS(findstart, base)
return res + res2
endfunction
+
+" vim:set foldmethod=marker:
diff --git a/runtime/autoload/xmlcomplete.vim b/runtime/autoload/xmlcomplete.vim
index fc4ad7844..0d104a0e9 100644
--- a/runtime/autoload/xmlcomplete.vim
+++ b/runtime/autoload/xmlcomplete.vim
@@ -1,7 +1,7 @@
" Vim completion script
" Language: XML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2006 Jan 24
+" Last Change: 2006 Feb 6
" This function will create Dictionary with users namespace strings and values
" canonical (system) names of data files. Names should be lowercase,
@@ -396,11 +396,11 @@ return ''
endfunction
function! s:InComment()
- return synIDattr(synID(line('.'), col('.'), 0), 'name') =~ 'Comment'
+ 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'
+ return synIDattr(synID(a:line, a:col, 0), 'name') =~ 'Comment\|String'
endfunction
function! s:SetKeywords()
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 567758669..a229f9d09 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1235,6 +1235,7 @@ The commands are sorted on the non-optional part of their name.
|:lgetfile| :lg[etfile] read file with locations
|:lgrep| :lgr[ep] run 'grepprg' and jump to first match
|:lgrepadd| :lgrepa[dd] like :grep, but append to current list
+|:lhelpgrep| :lh[elpgrep] like ":helpgrep" but uses location list
|:ll| :ll go to specific location
|:llast| :lla[st] go to the specified location, default last one
|:llist| :lli[st] list all locations
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index 88be8cbf3..d1e01049a 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1,4 +1,4 @@
-*insert.txt* For Vim version 7.0aa. Last change: 2006 Jan 30
+*insert.txt* For Vim version 7.0aa. Last change: 2006 Feb 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -956,39 +956,61 @@ FUNCTIONS FOR FINDING COMPLETIONS *complete-functions*
This applies to 'completefunc' and 'omnifunc'.
-The function will be invoked with two arguments. First the function is called
-to find the start of the text to be completed. Secondly the function is
-called to actually find the matches.
+The function is called in two different ways:
+- First the function is called to find the start of the text to be completed.
+- Later the function is called to actually find the matches.
On the first invocation the arguments are:
a:findstart 1
a:base empty
-The function must return the column of where the completion starts. It must
-be a number between zero and the cursor column "col('.')". This involves
-looking at the characters just before the cursor and including those
-characters that could be part of the completed item. The text between this
-column and the cursor column will be replaced with the matches. Return -1 if
-no completion can be done.
+The function must return the column where the completion starts. It must be a
+number between zero and the cursor column "col('.')". This involves looking
+at the characters just before the cursor and including those characters that
+could be part of the completed item. The text between this column and the
+cursor column will be replaced with the matches. Return -1 if no completion
+can be done.
On the second invocation the arguments are:
a:findstart 0
- a:base the text with which matches should match, what was
+ a:base the text with which matches should match; the text that was
located in the first call (can be empty)
The function must return a List with the matching words. These matches
usually include the "a:base" text. When there are no matches return an empty
-List. When one of the items in the list cannot be used as a string (e.g., a
-Dictionary) then an error message is given and further items in the list are
-not used.
+List.
+
+Each list item can either be a string or a Dictionary. When it is a string it
+is used as the completion. When it is a Dictionary it can contain these
+items:
+ word the completion, mandatory
+ menu extra text for the popup menu
+ info more information about the item
+ kind single letter indicating the type of completion
+
+All of these must be a string. If an item does not meet these requirements
+then an error message is given and further items in the list are not used.
+You can mix string and Dictionary items in the returned list.
+
+The "menu" item is used in the popup menu and may be truncated, thus it should
+be relatively short. The "info" item can be longer, it may be displayed in a
+balloon.
+
+The "kind" item uses a single letter to indicate the kind of completion. This
+may be used to show the completion differently (different color or icon).
+Currently these types can be used:
+ v variable
+ f function or method
+ c composite (struct, object)
When searching for matches takes some time call |complete_add()| to add each
match to the total list. These matches should then not appear in the returned
list! Call |complete_check()| now and then to allow the user to press a key
while still searching for matches. Stop searching when it returns non-zero.
-The function may move the cursor, it is restored afterwards. This option
-cannot be set from a |modeline| or in the |sandbox|, for security reasons.
+The function is allowed to move the cursor, it is restored afterwards. This
+option cannot be set from a |modeline| or in the |sandbox|, for security
+reasons.
An example that completes the names of the months: >
fun! CompleteMonths(findstart, base)
@@ -1050,11 +1072,16 @@ The menu is used when:
- There are at least two matches.
While the menu is displayed these keys have a special meaning:
-<CR> and <Enter>: Accept the currently selected match
-<Up>: Select the previous match, as if CTRL-P was used
-<Down>: Select the next match, as if CTRL-N was used
-<PageUp>: Select a match several entries back
-<PageDown>: Select a match several entries further
+<CR> and <Enter> Accept the currently selected match
+<Up> Select the previous match, as if CTRL-P was used
+<Down> Select the next match, as if CTRL-N was used
+<PageUp> Select a match several entries back
+<PageDown> Select a match several entries further
+<BS> and CTRL-H Delete one character, find the matches for the shorter word
+ before the cursor. This may find more matches.
+CTRL-L Add one character from the current match, may reduce the
+ number of matches. Does not work after selecting one of the
+ matches with CTRL-N, <Up>, etc.
The colors of the menu can be changed with these highlight groups:
Pmenu normal item |hl-Pmenu|
@@ -1073,6 +1100,8 @@ because it adds extra information that is needed for completion. You can find
it here: http://ctags.sourceforge.net/
For version 5.5.4 you should add a patch that adds the "typename:" field:
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
+A compiled .exe for MS-Windows can be found at:
+http://georgevreilly.com/vim/ctags.html
If you want to complete system functions you can do something like this. Use
ctags to generate a tags file for all the system header files: >
@@ -1104,14 +1133,14 @@ Complete properties and their appropriate values according to CSS 2.1
specification.
-(X)HTML *ft-html-omni*
+HTML and XHTML *ft-html-omni*
*ft-xhtml-omni*
CTRL-X CTRL-O provides completion of various elements of (X)HTML files.
It is designed to support writing of XHTML 1.0 Strict files but will
also works for other versions of HTML. Features:
-- after "<" complete tag name depending on context (no div suggest
+- after "<" complete tag name depending on context (no div suggestion
inside of an a tag)
- inside of tag complete proper attributes (no width attribute for an
a tag)
@@ -1120,17 +1149,21 @@ also works for other versions of HTML. Features:
- complete names of entities
- complete values of "class" and "id" attributes with data obtained from
style tag and included CSS files
-- when completing "style" attribute or working inside of "style" tag
+- when completing value of "style" attribute or working inside of "style" tag
switch to |ft-css-omni| completion
+- when completing values of events attributes or working inside of "script" tag
+ switch to |ft-javascript-omni| completion
- when used after "</" CTRL-X CTRL-O will close the last opened tag
Note: When used first time completion menu will be shown with little delay
-- this is time needed for loading of data file.
+- this is time needed for loading of data file.
+Note: Completion may fail in badly formatted documents. In such case try to
+run |:make| command to detect formatting problems.
JAVASCRIPT *ft-javascript-omni*
-Completion of most elements of JavaScript language and HTML DOM.
+Completion of most elements of JavaScript language and DOM elements.
Complete:
@@ -1138,13 +1171,13 @@ Complete:
- function name
- function arguments
- properties of variables trying to detect type of variable
-- complete HTML DOM objects and properties depending on context
+- complete DOM objects and properties depending on context
- keywords of language
-Completion works in separate JavaScript files (&ft==javascript) and inside of
-<script> tag of (X)HTML. Note: scanning will be only in scope of current tag.
-At the moment separate files are not taken into account.
-
+Completion works in separate JavaScript files (&ft==javascript), inside of
+<script> tag of (X)HTML and in values of event attributes (including scanning
+of external files.
+
DOM compatibility
At the moment (beginning of 2006) there are two main browsers - MS Internet
diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt
index d642497cc..71f8f8e17 100644
--- a/runtime/doc/netbeans.txt
+++ b/runtime/doc/netbeans.txt
@@ -1,4 +1,4 @@
-*netbeans.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
+*netbeans.txt* For Vim version 7.0aa. Last change: 2006 Feb 05
VIM REFERENCE MANUAL by Gordon Prieur
@@ -179,6 +179,7 @@ These messages are specific for NetBeans:
Region is guarded, cannot modify
NetBeans defines guarded areas in the text, which you cannot
change.
+ Also sets the current buffer, if necessary.
*E656*
NetBeans disallows writes of unmodified buffers
@@ -485,8 +486,10 @@ setContentType
Not implemented.
setDot off Make the buffer the current buffer and set the cursor at the
- specified position. If there are folds they are opened to
- make the cursor line visible.
+ specified position. If the buffer is open in another window
+ than make that window the current window.
+ If there are folds they are opened to make the cursor line
+ visible.
In version 2.1 "lnum/col" can be used instead of "off".
setExitDelay seconds
@@ -566,6 +569,7 @@ stopDocumentListen
unguard off len
Opposite of "guard", remove guarding for a text area.
+ Also sets the current buffer, if necessary.
version Not implemented.
@@ -612,6 +616,7 @@ insert off text
123 no problem
123 !message failed
Note that the message in the reply is not quoted.
+ Also sets the current buffer, if necessary.
remove off length
Delete "length" bytes of text at position "off". Both
@@ -620,6 +625,7 @@ remove off length
123 no problem
123 !message failed
Note that the message in the reply is not quoted.
+ Also sets the current buffer, if necessary.
saveAndExit Perform the equivalent of closing Vim: ":confirm qall".
If there are no changed files or the user does not cancel the
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 4d69b877e..54cd9dd76 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -2151,6 +2151,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:lgrep quickfix.txt /*:lgrep*
:lgrepa quickfix.txt /*:lgrepa*
:lgrepadd quickfix.txt /*:lgrepadd*
+:lh various.txt /*:lh*
+:lhelpgrep various.txt /*:lhelpgrep*
:list various.txt /*:list*
:ll quickfix.txt /*:ll*
:lla quickfix.txt /*:lla*
@@ -5420,7 +5422,6 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help*
help-context help.txt /*help-context*
-help-tags tags 1
help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index ab46f8383..95df11bc8 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 04
+*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,25 +30,19 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Variant of ":helpgrep" that uses a location list? How about:
- :lhelpgrep (use local list in help window, not current window)
+Crash with X command server (Ciaran McCreesh).
ccomplete / omnicomplete:
-- Extra info for each entry to show in a tooltip kind of thing.
- Should use a dictionary for each entry. Fields could be:
- word the completed word
- menu menu text (use word when missing)
- info extra info, to be displayed in balloon (e.g., function args)
- kind single letter indicating the type of word:
- v = variable, f = function/method, c = composite (object,
- struct pointer).
- For C add tag "kind" field?
+When editing compl_leader <CR> should accept the current match.
+Somehow select another match without changing the compl_leader, so that you
+can use CTRL-L next? Perhaps with <S-Up> and <S-Down>?
- Complete the longest common match instead of the first match?
Do this when "longest" is in 'completeopt'.
Pressing CTRL-N or CTRL-P will get the whole match, as before.
Need to postpone inserting anything until all matches have been found.
Then add a completion item with the longest common string (after what was
typed), if there is one.
+- For C add tag "kind" field to each match?
- Finding out if an item has members (to add '.' or '->') requires a grep in
the tags files, that is very slow. Is there another solution? At least
stop at the first match.
@@ -109,6 +103,9 @@ Nov 24)
An error in a function uses a line number that doesn't take line continuation
into account. (Mikolaj Machowski) Store line count in an extra array?
+Is it possible to keep the command-line window open? Would actually work like
+closing it, executing the command and re-opening it (at the same position).
+
Mac unicode patch (Da Woon Jung):
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 4cb9687cd..a7cb74348 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -648,6 +648,15 @@ g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
compresses the help files).
{not in Vi}
+ *:lh* *:lhelpgrep*
+:lh[elpgrep] {pattern}[@xx]
+ Same as ":helpgrep", except the location list is used
+ instead of the quickfix list. If the help window is
+ already opened, then the location list for that window
+ is used. Otherwise, a new help window is opened and
+ the location list for that window is set. The
+ location list for the current window is not changed.
+
*:exu* *:exusage*
:exu[sage] Show help on Ex commands. Added to simulate the Nvi
command. {not in Vi}
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index d0d1e85cc..ced704f3b 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 04
+*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -192,8 +192,8 @@ Omni completion *new-omni-completion*
This could also be called "intellisense", but that is a trademark. It is a
smart kind of completion. The text in front of the cursor is inspected to
-figure out what could be following. This considers struct and class members,
-unions, etc.
+figure out what could be following. This may suggest struct and class
+members, system functions, etc.
Use CTRL-X CTRL-O in Insert mode to start the completion. |i_CTRL-X_CTRL-O|
@@ -201,8 +201,11 @@ The 'omnifunc' option is set by filetype plugins to define the function that
figures out the completion.
Currently supported languages:
- C |ft-c-omni|
- XHTML |ft-html-omni|
+ C |ft-c-omni|
+ (X)HTML with CSS |ft-html-omni|
+ JavaScript |ft-javascript-omni|
+ any language wih syntax highligting |ft-syntax-omni|
+ XML |ft-xml-omni|
When the 'completeopt' option contains "menu" then matches for Insert mode
completion are displayed in a popup menu.
@@ -460,7 +463,30 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:lgrepadd| Like |:grepadd| but use the location list.
|:lvimgrep| Like |:vimgrep| but use the location list.
|:lvimgrepadd| Like |:vimgrepadd| but use the location list.
+|:lhelpgrep| Like |:helpgrep| but use the location list.
+|:lfile| Like |:cfile| but use the location list.
+|:lgetfile| Like |:cgetfile| but use the location list.
+|:laddfile| Like |:caddfile| but use the location list.
+|:lbuffer| Like |:cbuffer| but use the location list.
|:laddbuffer| Like |:caddbuffer| but use the location list.
+|:lexpr| Like |:cexpr| but use the location list.
+|:laddexpr| Like |:caddexpr| but use the location list.
+|:ll| Like |:cc| but use the location list.
+|:llist| Like |:clist| but use the location list.
+|:lnext| Like |:cnext| but use the location list.
+|:lprev| Like |:cprev| but use the location list.
+|:lNext| Like |:cNext| but use the location list.
+|:lfirst| Like |:cfirst| but use the location list.
+|:lrewind| Like |:crewind| but use the location list.
+|:llast| Like |:clast| but use the location list.
+|:lnfile| Like |:cnfile| but use the location list.
+|:lpfile| Like |:cpfile| but use the location list.
+|:lNfile| Like |:cNfile| but use the location list.
+|:lolder| Like |:colder| but use the location list.
+|:lnewer| Like |:cnewer| but use the location list.
+|:lwindow| Like |:cwindow| but use the location list.
+|:lopen| Like |:copen| but use the location list.
+|:lclose| Like |:cclose| but use the location list.
Ex command modifiers: ~
diff --git a/runtime/ftplugin/lprolog.vim b/runtime/ftplugin/lprolog.vim
index cc28c6a97..a8a3c612c 100644
--- a/runtime/ftplugin/lprolog.vim
+++ b/runtime/ftplugin/lprolog.vim
@@ -1,8 +1,8 @@
" Vim settings file
" Language: LambdaProlog (Teyjus)
-" Maintainer: Markus Mottl <markus@oefai.at>
-" URL: http://www.oefai.at/~markus/vim/ftplugin/lprolog.vim
-" Last Change: 2001 Oct 02 - fixed uncommenting bug (MM)
+" Maintainer: Markus Mottl <markus.mottl@gmail.com>
+" URL: http://www.ocaml.info/vim/ftplugin/lprolog.vim
+" Last Change: 2006 Feb 05
" 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM)
" 2001 Sep 02 - initial release (MM)
diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim
index 322be55f8..6f2b17cb7 100644
--- a/runtime/ftplugin/ocaml.vim
+++ b/runtime/ftplugin/ocaml.vim
@@ -4,7 +4,7 @@
" Markus Mottl <markus.mottl@gmail.com>
" Stefano Zacchiroli <zack@bononia.it>
" URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim
-" Last Change: 2005 Oct 13 - removed GPL; better matchit support (MM, SZ)
+" Last Change: 2006 Feb 05
"
" if exists("b:did_ftplugin")
" finish
@@ -377,4 +377,3 @@ let &cpoptions=s:cposet
unlet s:cposet
" vim:sw=2
-
diff --git a/runtime/syntax/dot.vim b/runtime/syntax/dot.vim
index 64255000b..507f72e28 100644
--- a/runtime/syntax/dot.vim
+++ b/runtime/syntax/dot.vim
@@ -1,9 +1,9 @@
" Vim syntax file
" Language: Dot
" Filenames: *.dot
-" Maintainer: Markus Mottl <markus@oefai.at>
-" URL: http://www.oefai.at/~markus/vim/syntax/dot.vim
-" Last Change: 2004 Jul 26
+" Maintainer: Markus Mottl <markus.mottl@gmail.com>
+" URL: http://www.ocaml.info/vim/syntax/dot.vim
+" Last Change: 2006 Feb 05
" 2001 May 04 - initial version
" For version 5.x: Clear all syntax items
diff --git a/runtime/syntax/lprolog.vim b/runtime/syntax/lprolog.vim
index 7007f239f..086c00fd5 100644
--- a/runtime/syntax/lprolog.vim
+++ b/runtime/syntax/lprolog.vim
@@ -1,9 +1,9 @@
" Vim syntax file
" Language: LambdaProlog (Teyjus)
" Filenames: *.mod *.sig
-" Maintainer: Markus Mottl <markus@oefai.at>
-" URL: http://www.oefai.at/~markus/vim/syntax/lprolog.vim
-" Last Change: 2004 Jul 26
+" Maintainer: Markus Mottl <markus.mottl@gmail.com>
+" URL: http://www.ocaml.info/vim/syntax/lprolog.vim
+" Last Change: 2006 Feb 05
" 2001 Apr 26 - Upgraded for new Vim version
" 2000 Jun 5 - Initial release
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 5aa1e4de8..74f96bc23 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change: Dec 29, 2005
-" Version: 79
+" Last Change: Feb 01, 2006
+" Version: 80
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Using the following VIM variables: {{{1
@@ -173,7 +173,7 @@ syn match shComma contained ","
" ====
syn match shCaseBar contained skipwhite "[^|"`'()]\{-}|"hs=e nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar
-syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="[^#$()]\{-})"ms=s,hs=e end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,,shComment
+syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="[^#$()'"]\{-})"ms=s,hs=e end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
if exists("b:is_bash")
@@ -181,7 +181,7 @@ if exists("b:is_bash")
else
syn region shCaseExSingleQuote matchgroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
endif
-syn region shCaseSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
+syn region shCaseSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
syn region shCaseDoubleQuote matchgroup=shOperator start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained
syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained
diff --git a/runtime/syntax/sml.vim b/runtime/syntax/sml.vim
index 5f6a86217..a45b204a8 100644
--- a/runtime/syntax/sml.vim
+++ b/runtime/syntax/sml.vim
@@ -1,10 +1,10 @@
" Vim syntax file
" Language: SML
" Filenames: *.sml *.sig
-" Maintainers: Markus Mottl <markus@oefai.at>
+" Maintainers: Markus Mottl <markus.mottl@gmail.com>
" Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it>
-" URL: http://www.oefai.at/~markus/vim/syntax/sml.vim
-" Last Change: 2004 Jul 26
+" URL: http://www.ocaml.info/vim/syntax/sml.vim
+" Last Change: 2006 Feb 05
" 2001 Nov 20 - Fixed small highlighting bug with modules (MM)
" 2001 Aug 29 - Fixed small highlighting bug (MM)
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 613a16cd4..a8543fc9f 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.0 script
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: January 30, 2006
-" Version: 7.0-23
+" Last Change: February 07, 2006
+" Version: 7.0-25
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -16,7 +16,7 @@ syn keyword vimTodo contained COMBAK NOT RELEASED TODO WIP
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
-syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cad[dexpr] caddf[ile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] Explore exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] Hexplore hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] lad[dexpr] laddf[ile] lan[guage] la[st] lb[uffer] lc[d] lch[dir] lcl[ose] le[ft] lefta[bove] lex[pr] lf[ile] lfir[st] lg[etfile] l[ist] ll lla[st] lli[st] lm[ap] lmapc[lear] lnew[er] lne[xt] lN[ext] lnf[ile] lNf[ile] ln[oremap] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lpf[ile] lp[revious] lr[ewind] ls lu[nmap] lw[indow] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey NetrwSettings new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] Sexplore sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] sor[t] so[urce] spelld[ump] spe[llgood] spellr[epall] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] startg[replace] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] Vexplore v[global] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] XMLent XMLns y[ank]
+syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] caddb[uffer] cad[dexpr] caddf[ile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] Explore exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] Hexplore hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] laddb[uffer] lad[dexpr] laddf[ile] lan[guage] la[st] lb[uffer] lc[d] lch[dir] lcl[ose] le[ft] lefta[bove] lex[pr] lf[ile] lfir[st] lg[etfile] lgr[ep] lgrepa[dd] l[ist] ll lla[st] lli[st] lmak[e] lm[ap] lmapc[lear] lnew[er] lne[xt] lN[ext] lnf[ile] lNf[ile] ln[oremap] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lpf[ile] lp[revious] lr[ewind] ls lt[ag] lu[nmap] lv[imgrep] lvimgrepa[dd] lw[indow] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey NetrwSettings new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] Sexplore sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] sor[t] so[urce] spelld[ump] spe[llgood] spellr[epall] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] startg[replace] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] Vexplore v[global] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] XMLent XMLns y[ank]
syn match vimCommand contained "\<z[-+^.=]"
" vimOptions are caught only when contained in a vimSet {{{2
@@ -44,7 +44,7 @@ syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
" AutoBuf Events {{{2
syn case ignore
-syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold E135 E143 E200 E201 E203 E204 EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost StdinReadPost StdinReadPre SwapExists Syntax TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre WinEnter WinLeave
+syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold E135 E143 E200 E201 E203 E204 EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre WinEnter WinLeave
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
@@ -126,7 +126,7 @@ syn keyword vimPattern contained start skip end
syn cluster vimOperGroup contains=vimOper,vimOperParen,vimNumber,vimString,vimOperOk,vimRegister,vimContinue
syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile
-syn region vimOperParen oneline matchgroup=vimOper start="(" end=")" contains=@vimOperGroup
+syn region vimOperParen matchgroup=vimOper start="(" end=")" contains=@vimOperGroup
syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar
syn match vimOperOk "\<[aiAIrR][()]"
if !exists("g:vimsyntax_noerror")
@@ -185,7 +185,6 @@ syn match vimEnvvar "\${\I\i*}"
" In-String Specials: {{{2
" Try to catch strings, if nothing else matches (therefore it must precede the others!)
" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside [])
-" COMBAK: I don't know why the \ze is needed in vimPatSepZone
syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\^\=\]\=" skip="\\\\\|\\\]" end="\]"me=e-1
syn match vimPatSepErr contained "\\)"
syn match vimPatSep contained "\\|"
@@ -194,7 +193,7 @@ syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%
syn match vimNotPatSep contained "\\\\"
syn cluster vimStringGroup contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone
syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup
-syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]'+lc=1 end=+'+ contains=@vimStringGroup
+syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]'+lc=1 end=+'+
syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup
syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup
syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup
@@ -221,7 +220,7 @@ syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
syn match vimSubstFlags contained "[&cegiIpr]\+"
" 'String': {{{2
-syn match vimString "[^(,]'[^']\{-}'"lc=1 contains=@vimStringGroup
+syn match vimString "[^(,]'[^']\{-}\zs'"
" Marks, Registers, Addresses, Filters: {{{2
syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst
@@ -249,8 +248,8 @@ syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile
"syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\)'
" Set command and associated set-options (vimOptions) with comment {{{2
-syn region vimSet matchgroup=vimCommand start="\<setlocal\|set\>" end="|"me=e-1 end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
-syn region vimSetEqual contained start="=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation
+syn region vimSet matchgroup=vimCommand start="\<setlocal\|set\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
+syn region vimSetEqual contained start="=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation oneline
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
syn match vimSetSep contained "[,:]"
syn match vimSetMod contained "&vim\|[!&]\|all&"