• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisionbc95c6c4bac13d4a0f8a4bd6ec10f495d3fa5eea (tree)
Time2006-02-02 06:56:25
Authorvimboss
Commitervimboss

Log Message

updated for version 7.0191

Change Summary

Incremental Difference

diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/autoload/ccomplete.vim
--- a/runtime/autoload/ccomplete.vim Wed Feb 01 21:51:12 2006 +0000
+++ b/runtime/autoload/ccomplete.vim Wed Feb 01 21:56:25 2006 +0000
@@ -1,7 +1,7 @@
11 " Vim completion script
22 " Language: C
33 " Maintainer: Bram Moolenaar <Bram@vim.org>
4-" Last Change: 2006 Jan 29
4+" Last Change: 2006 Jan 30
55
66
77 " This function is used for the 'omnifunc' option.
diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/autoload/javascriptcomplete.vim
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/runtime/autoload/javascriptcomplete.vim Wed Feb 01 21:56:25 2006 +0000
@@ -0,0 +1,495 @@
1+" Vim completion script
2+" Language: Java Script
3+" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
4+" Last Change: 2006 Jan 30
5+
6+function! javascriptcomplete#CompleteJS(findstart, base)
7+ if a:findstart
8+ " locate the start of the word
9+ let line = getline('.')
10+ let start = col('.') - 1
11+ let curline = line('.')
12+ let compl_begin = col('.') - 2
13+ " Bit risky but JS is rather limited language and local chars shouldn't
14+ " fint way into names
15+ while start >= 0 && line[start - 1] =~ '\w'
16+ let start -= 1
17+ endwhile
18+ let b:compl_context = getline('.')[0:compl_begin]
19+ return start
20+ else
21+ " Initialize base return lists
22+ let res = []
23+ let res2 = []
24+ " a:base is very short - we need context
25+ let context = b:compl_context
26+ " Shortcontext is context without a:base, useful for checking if we are
27+ " looking for objects
28+ let shortcontext = substitute(context, a:base.'$', '', '')
29+ unlet! b:compl_context
30+
31+ if shortcontext =~ '\.$'
32+ " Complete methods and properties for objects
33+ " DOM separate
34+ let doms = ['style.']
35+ " Arrays
36+ let arrayprop = ['constructor', 'index', 'input', 'length', 'prototype']
37+ let arraymeth = ['concat', 'join', 'pop', 'push', 'reverse', 'shift',
38+ \ 'splice', 'sort', 'toSource', 'toString', 'unshift', 'valueOf',
39+ \ 'watch', 'unwatch']
40+ call map(arraymeth, 'v:val."("')
41+ let arrays = arrayprop + arraymeth
42+
43+ " Boolean - complete subset of array values
44+ " properties - constructor, prototype
45+ " methods - toSource, toString, valueOf
46+
47+ " Date
48+ " properties - constructor, prototype
49+ let datemeth = ['getDate', 'getDay', 'getFullYear', 'getHours', 'getMilliseconds',
50+ \ 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'getTimezoneOffset',
51+ \ 'getUTCDate', 'getUTCDay', 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds',
52+ \ 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds',
53+ \ 'getYear', 'parse', 'parse',
54+ \ 'setDate', 'setDay', 'setFullYear', 'setHours', 'setMilliseconds',
55+ \ 'setMinutes', 'setMonth', 'setSeconds',
56+ \ 'setUTCDate', 'setUTCDay', 'setUTCFullYear', 'setUTCHours', 'setUTCMilliseconds',
57+ \ 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setYear', 'setTime',
58+ \ 'toGMTString', 'toLocaleString', 'toLocaleDateString', 'toLocaleTimeString',
59+ \ 'toSource', 'toString', 'toUTCString', 'UTC', 'valueOf', 'watch', 'unwatch']
60+ call map(datemeth, 'v:val."("')
61+ let dates = datemeth
62+
63+ " Function
64+ let funcprop = ['arguments', 'arguments.callee', 'arguments.caller', 'arguments.length',
65+ \ 'arity', 'constructor', 'length', 'prototype']
66+ let funcmeth = ['apply', 'call', 'toSource', 'toString', 'valueOf']
67+ call map(funcmeth, 'v:val."("')
68+ let funcs = funcprop + funcmeth
69+
70+ " Math
71+ let mathprop = ['E', 'LN2', 'LN10', 'LOG2E', 'LOG10E', 'PI', 'SQRT1_2', 'SQRT']
72+ let mathmeth = ['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor',
73+ \ 'log', 'max', 'min', 'pow', 'random', 'round', 'sin', 'sqrt', 'tan',
74+ \ 'watch', 'unwatch']
75+ call map(mathmeth, 'v:val."("')
76+ let maths = mathprop + mathmeth
77+
78+ " Number
79+ let numbprop = ['MAX_VALUE', 'MIN_VALUE', 'NaN', 'NEGATIVE_INFINITY', 'POSITIVE_INFINITY',
80+ \ 'constructor', 'prototype']
81+ let numbmeth = ['toExponential', 'toFixed', 'toPrecision', 'toSource', 'toString', 'valueOf',
82+ \ 'watch', 'unwatch']
83+ call map(numbmeth, 'v:val."("')
84+ let numbs = numbprop + numbmeth
85+
86+ " Object
87+ let objeprop = ['constructor', 'prototype']
88+ let objemeth = ['eval', 'toSource', 'toString', 'unwatch', 'watch', 'valueOf']
89+ call map(objemeth, 'v:val."("')
90+ let objes = objeprop + objemeth
91+
92+ " RegExp
93+ let regeprop = ['constructor', 'global', 'ignoreCase', 'lastIndex', 'multiline', 'source', 'prototype']
94+ let regemeth = ['exec', 'toSource', 'toString', 'test', 'watch', 'unwatch']
95+ call map(regemeth, 'v:val."("')
96+ let reges = regeprop + regemeth
97+
98+ " String
99+ let striprop = ['constructor', 'length', 'prototype']
100+ let strimeth = ['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'concat',
101+ \ 'fixed', 'fontcolor', 'fontsize', 'fromCharCode', 'indexOf', 'italics',
102+ \ 'lastIndexOf', 'link', 'match', 'replace', 'search', 'slice', 'small',
103+ \ 'split', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLowerCase',
104+ \ 'toSource', 'toString', 'toUpperCase', 'watch', 'unwatch']
105+ call map(strimeth, 'v:val."("')
106+ let stris = striprop + strimeth
107+
108+ " User created properties
109+ if exists("b:jsrange")
110+ let file = getline(b:jsrange[0],b:jsrange[1])
111+ unlet! b:jsrange
112+ else
113+ let file = getline(1, '$')
114+ endif
115+ let user_props1 = filter(copy(file), 'v:val =~ "this\\.\\w"')
116+ let juser_props1 = join(user_props1, ' ')
117+ let user_props1 = split(juser_props1, '\zethis\.')
118+ unlet! juser_props1
119+ call map(user_props1, 'matchstr(v:val, "this\\.\\zs\\w\\+\\ze")')
120+ let user_props2 = filter(copy(file), 'v:val =~ "\\.prototype\\.\\w"')
121+ call map(user_props2, 'matchstr(v:val, "\\.prototype\\.\\zs\\w\\+\\ze")')
122+ let user_props = user_props1 + user_props2
123+
124+ " HTML DOM properties
125+ " Anchors - anchor.
126+ let anchprop = ['accessKey', 'charset', 'coords', 'href', 'hreflang', 'id', 'innerHTML',
127+ \ 'name', 'rel', 'rev', 'shape', 'tabIndex', 'target', 'type', 'onBlur', 'onFocus']
128+ let anchmeth = ['blur', 'focus']
129+ call map(anchmeth, 'v:val."("')
130+ let anths = anchprop + anchmeth
131+ " Area - area.
132+ let areaprop = ['accessKey', 'alt', 'coords', 'hash', 'host', 'hostname', 'href', 'id',
133+ \ 'noHref', 'pathname', 'port', 'protocol', 'search', 'shape', 'tabIndex', 'target']
134+ let areameth = ['onClick', 'onDblClick', 'onMouseOut', 'onMouseOver']
135+ call map(areameth, 'v:val."("')
136+ let areas = areaprop + areameth
137+ " Base - base.
138+ let baseprop = ['href', 'id', 'target']
139+ let bases = baseprop
140+ " Body - body.
141+ let bodyprop = ['aLink', 'background', 'gbColor', 'id', 'link', 'scrollLeft', 'scrollTop',
142+ \ 'text', 'vLink']
143+ let bodys = bodyprop
144+ " Document - document.
145+ let docuprop = ['anchors', 'applets', 'childNodes', 'embeds', 'forms', 'images', 'links', 'stylesheets',
146+ \ 'body', 'cookie', 'documentElement', 'domain', 'lastModified', 'referrer', 'title', 'URL']
147+ let documeth = ['close', 'createAttribute', 'createElement', 'createTextNode', 'focus', 'getElementById',
148+ \ 'getElementsByName', 'getElementsByTagName', 'open', 'write', 'writeln',
149+ \ 'onClick', 'onDblClick', 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp',
150+ \ 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onResize']
151+ call map(documeth, 'v:val."("')
152+ let docus = docuprop + documeth
153+ " Form - form.
154+ let formprop = ['elements', 'acceptCharset', 'action', 'encoding', 'enctype', 'id', 'length',
155+ \ 'method', 'name', 'tabIndex', 'target']
156+ let formmeth = ['reset', 'submit', 'onReset', 'onSubmit']
157+ call map(formmeth, 'v:val."("')
158+ let forms = formprop + formmeth
159+ " Frame - frame.
160+ let framprop = ['contentDocument', 'frameBorder', 'id', 'longDesc', 'marginHeight', 'marginWidth',
161+ \ 'name', 'noResize', 'scrolling', 'src']
162+ let frammeth = ['blur', 'focus']
163+ call map(frammeth, 'v:val."("')
164+ let frams = framprop + frammeth
165+ " Frameset - frameset.
166+ let fsetprop = ['cols', 'id', 'rows']
167+ let fsetmeth = ['blur', 'focus']
168+ call map(fsetmeth, 'v:val."("')
169+ let fsets = fsetprop + fsetmeth
170+ " History - history.
171+ let histprop = ['length']
172+ let histmeth = ['back', 'forward', 'go']
173+ call map(histmeth, 'v:val."("')
174+ let hists = histprop + histmeth
175+ " Iframe - iframe.
176+ let ifraprop = ['align', 'frameBorder', 'height', 'id', 'longDesc', 'marginHeight', 'marginWidth',
177+ \ 'name', 'scrolling', 'src', 'width']
178+ let ifras = ifraprop
179+ " Image - image.
180+ let imagprop = ['align', 'alt', 'border', 'complete', 'height', 'hspace', 'id', 'isMap', 'longDesc',
181+ \ 'lowsrc', 'name', 'src', 'useMap', 'vspace', 'width']
182+ let imagmeth = ['onAbort', 'onError', 'onLoad']
183+ call map(imagmeth, 'v:val."("')
184+ let imags = histprop + imagmeth
185+ " Button - accessible only by other properties
186+ let buttprop = ['accessKey', 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
187+ let buttmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
188+ call map(buttmeth, 'v:val."("')
189+ let butts = buttprop + buttmeth
190+ " Checkbox - accessible only by other properties
191+ let checprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked',
192+ \ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
193+ let checmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
194+ call map(checmeth, 'v:val."("')
195+ let checs = checprop + checmeth
196+ " File upload - accessible only by other properties
197+ let fileprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
198+ \ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
199+ let filemeth = ['blur', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
200+ call map(filemeth, 'v:val."("')
201+ let files = fileprop + filemeth
202+ " Hidden - accessible only by other properties
203+ let hiddprop = ['defaultValue', 'form', 'id', 'name', 'type', 'value']
204+ let hidds = hiddprop
205+ " Password - accessible only by other properties
206+ let passprop = ['accept', 'accessKey', 'defaultValue',
207+ \ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly', 'size', 'tabIndex',
208+ \ 'type', 'value']
209+ let passmeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus', 'onKeyDown',
210+ \ 'onKeyPress', 'onKeyUp']
211+ call map(passmeth, 'v:val."("')
212+ let passs = passprop + passmeth
213+ " Radio - accessible only by other properties
214+ let radiprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked',
215+ \ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
216+ let radimeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus']
217+ call map(radimeth, 'v:val."("')
218+ let radis = radiprop + radimeth
219+ " Reset - accessible only by other properties
220+ let reseprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
221+ \ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value']
222+ let resemeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus']
223+ call map(resemeth, 'v:val."("')
224+ let reses = reseprop + resemeth
225+ " Submit - accessible only by other properties
226+ let submprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
227+ \ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value']
228+ let submmeth = ['blur', 'click', 'focus', 'select', 'onClick', 'onSelectStart']
229+ call map(submmeth, 'v:val."("')
230+ let subms = submprop + submmeth
231+ " Text - accessible only by other properties
232+ let textprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
233+ \ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly',
234+ \ 'size', 'tabIndex', 'type', 'value']
235+ let textmeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus', 'onKeyDown',
236+ \ 'onKeyPress', 'onKeyUp', 'onSelect']
237+ call map(textmeth, 'v:val."("')
238+ let texts = textprop + textmeth
239+ " Link - link.
240+ let linkprop = ['charset', 'disabled', 'href', 'hreflang', 'id', 'media',
241+ \ 'rel', 'rev', 'target', 'type']
242+ let linkmeth = ['onLoad']
243+ call map(linkmeth, 'v:val."("')
244+ let links = linkprop + linkmeth
245+ " Location - location.
246+ let locaprop = ['href', 'hash', 'host', 'hostname', 'pathname', 'port', 'protocol',
247+ \ 'search']
248+ let locameth = ['assign', 'reload', 'replace']
249+ call map(locameth, 'v:val."("')
250+ let locas = locaprop + locameth
251+ " Meta - meta.
252+ let metaprop = ['charset', 'content', 'disabled', 'httpEquiv', 'name', 'scheme']
253+ let metas = metaprop
254+ " Navigator - navigator.
255+ let naviprop = ['plugins', 'appCodeName', 'appName', 'appVersion', 'cookieEnabled',
256+ \ 'platform', 'userAgent']
257+ let navimeth = ['javaEnabled', 'taintEnabled']
258+ call map(navimeth, 'v:val."("')
259+ let navis = naviprop + navimeth
260+ " Object - object.
261+ let objeprop = ['align', 'archive', 'border', 'code', 'codeBase', 'codeType', 'data',
262+ \ 'declare', 'form', 'height', 'hspace', 'id', 'name', 'standby', 'tabIndex',
263+ \ 'type', 'useMap', 'vspace', 'width']
264+ let objes = objeprop
265+ " Option - accessible only by other properties
266+ let optiprop = ['defaultSelected',
267+ \ 'disabled', 'form', 'id', 'index', 'label', 'selected', 'text', 'value']
268+ let optis = optiprop
269+ " Screen - screen.
270+ let screprop = ['availHeight', 'availWidth', 'colorDepth', 'height', 'width']
271+ let scres = screprop
272+ " Select - accessible only by other properties
273+ let seleprop = ['options', 'disabled', 'form', 'id', 'length', 'multiple', 'name',
274+ \ 'selectedIndex', 'size', 'tabIndex', 'type', 'value']
275+ let selemeth = ['blur', 'focus', 'remove', 'onBlur', 'onChange', 'onFocus']
276+ call map(selemeth, 'v:val."("')
277+ let seles = seleprop + selemeth
278+ " Style - style.
279+ let stylprop = ['background', 'backgroundAttachment', 'backgroundColor', 'backgroundImage',
280+ \ 'backgroundPosition', 'backgroundRepeat',
281+ \ 'border', 'borderBottom', 'borderLeft', 'borderRight', 'borderTop',
282+ \ 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor',
283+ \ 'borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle',
284+ \ 'borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth',
285+ \ 'borderColor', 'borderStyle', 'borderWidth', 'margin', 'marginBottom',
286+ \ 'marginLeft', 'marginRight', 'marginTop', 'outline', 'outlineStyle', 'outlineWidth',
287+ \ 'outlineColor', 'outlineStyle', 'outlineWidth', 'padding', 'paddingBottom',
288+ \ 'paddingLeft', 'paddingRight', 'paddingTop',
289+ \ 'clear', 'clip', 'clipBottom', 'clipLeft', 'clipRight', 'clipTop', 'content',
290+ \ 'counterIncrement', 'counterReset', 'cssFloat', 'cursor', 'direction',
291+ \ 'display', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight',
292+ \ 'minWidth', 'overflow', 'overflowX', 'overflowY', 'verticalAlign', 'visibility',
293+ \ 'width',
294+ \ 'listStyle', 'listStyleImage', 'listStylePosition', 'listStyleType',
295+ \ 'cssText', 'bottom', 'height', 'left', 'position', 'right', 'top', 'width', 'zindex',
296+ \ 'orphans', 'widows', 'page', 'pageBreakAfter', 'pageBreakBefore', 'pageBreakInside',
297+ \ 'borderCollapse', 'borderSpacing', 'captionSide', 'emptyCells', 'tableLayout',
298+ \ 'color', 'font', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch',
299+ \ 'fontStyle', 'fontVariant', 'fontWeight', 'letterSpacing', 'lineHeight', 'quotes',
300+ \ 'textAlign', 'textIndent', 'textShadow', 'textTransform', 'textUnderlinePosition',
301+ \ 'unicodeBidi', 'whiteSpace', 'wordSpacing']
302+ let styls = stylprop
303+ " Table - table.
304+ let tablprop = ['rows', 'tBodies', 'align', 'bgColor', 'border', 'caption', 'cellPadding',
305+ \ 'cellSpacing', 'frame', 'height', 'rules', 'summary', 'tFoot', 'tHead', 'width']
306+ let tablmeth = ['createCaption', 'createTFoot', 'createTHead', 'deleteCaption', 'deleteRow',
307+ \ 'deleteTFoot', 'deleteTHead', 'insertRow']
308+ call map(tablmeth, 'v:val."("')
309+ let tabls = tablprop + tablmeth
310+ " Table data - TableData.
311+ let tdatprop = ['abbr', 'align', 'axis', 'bgColor', 'cellIndex', 'ch', 'chOff',
312+ \ 'colSpan', 'headers', 'noWrap', 'rowSpan', 'scope', 'vAlign', 'width']
313+ let tdats = tdatprop
314+ " Table row - TableRow.
315+ let trowprop = ['cells', 'align', 'bgColor', 'ch', 'chOff', 'rowIndex', 'sectionRowIndex',
316+ \ 'vAlign']
317+ let trowmeth = ['deleteCell', 'insertCell']
318+ call map(trowmeth, 'v:val."("')
319+ let trows = trowprop + trowmeth
320+ " Textarea - accessible only by other properties
321+ let tareprop = ['accessKey', 'cols', 'defaultValue',
322+ \ 'disabled', 'form', 'id', 'name', 'readOnly', 'rows',
323+ \ 'tabIndex', 'type', 'value']
324+ let taremeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus']
325+ call map(taremeth, 'v:val."("')
326+ let tares = tareprop + taremeth
327+ " Window - window.
328+ let windprop = ['frames', 'closed', 'defaultStatus', 'length', 'name', 'opener', 'parent',
329+ \ 'self', 'status', 'top']
330+ let windmeth = ['alert', 'blur', 'clearInterval', 'clearTimeout', 'close', 'confirm', 'focus',
331+ \ 'moveBy', 'moveTo', 'open', 'print', 'prompt', 'scrollBy', 'scrollTo', 'setInterval',
332+ \ 'setTimeout']
333+ call map(windmeth, 'v:val."("')
334+ let winds = windprop + windmeth
335+ " XMLHttpRequest - access by new xxx()
336+ let xmlhprop = ['onreadystatechange', 'readyState', 'responseText', 'responseXML',
337+ \ 'status', 'statusText']
338+ let xmlhmeth = ['abort', 'getAllResponseHeaders', 'getResponseHeaders', 'open',
339+ \ 'send', 'setRequestHeader']
340+ call map(xmlhmeth, 'v:val."("')
341+ let xmlhs = xmlhprop + xmlhmeth
342+
343+ let object = matchstr(shortcontext, '\zs\w\+\ze\(\[.\{-}\]\)\?\.$')
344+ let decl_line = search(object.'.\{-}=\s*new\s*', 'bn')
345+ let object_type = matchstr(getline(decl_line), object.'.\{-}=\s*new\s*\zs\w\+\ze')
346+
347+ if object_type == 'Date'
348+ let values = dates
349+ elseif object_type == 'Image'
350+ let values = imags
351+ elseif object_type == 'Array'
352+ let values = arrays
353+ elseif object_type == 'Boolean'
354+ " TODO: a bit more than real boolean
355+ let values = arrays
356+ elseif object_type == 'XMLHttpRequest'
357+ let values = xmlhs
358+ elseif object_type == 'String'
359+ let values = stris
360+ endif
361+
362+ if !exists('values')
363+ " List of properties
364+ if shortcontext =~ 'Math\.$'
365+ let values = maths
366+ elseif shortcontext =~ 'anchor\.$'
367+ let values = anths
368+ elseif shortcontext =~ 'area\.$'
369+ let values = areas
370+ elseif shortcontext =~ 'base\.$'
371+ let values = bases
372+ elseif shortcontext =~ 'body\.$'
373+ let values = bodys
374+ elseif shortcontext =~ 'document\.$'
375+ let values = docus
376+ elseif shortcontext =~ 'form\.$'
377+ let values = forms
378+ elseif shortcontext =~ 'frameset\.$'
379+ let values = fsets
380+ elseif shortcontext =~ 'history\.$'
381+ let values = hists
382+ elseif shortcontext =~ 'iframe\.$'
383+ let values = ifras
384+ elseif shortcontext =~ 'image\.$'
385+ let values = imags
386+ elseif shortcontext =~ 'link\.$'
387+ let values = links
388+ elseif shortcontext =~ 'location\.$'
389+ let values = locas
390+ elseif shortcontext =~ 'meta\.$'
391+ let values = metas
392+ elseif shortcontext =~ 'navigator\.$'
393+ let values = navis
394+ elseif shortcontext =~ 'object\.$'
395+ let values = objes
396+ elseif shortcontext =~ 'screen\.$'
397+ let values = scres
398+ elseif shortcontext =~ 'style\.$'
399+ let values = styls
400+ elseif shortcontext =~ 'table\.$'
401+ let values = tabls
402+ elseif shortcontext =~ 'TableData\.$'
403+ let values = tdats
404+ elseif shortcontext =~ 'TableRow\.$'
405+ let values = trows
406+ elseif shortcontext =~ 'window\.$'
407+ let values = winds
408+ else
409+ let values = user_props + arrays + dates + funcs + maths + numbs + objes + reges + stris
410+ let values += doms + anths + areas + bases + bodys + docus + forms + frams + fsets + hists
411+ let values += ifras + imags + links + locas + metas + navis + objes + scres + styls
412+ let values += tabls + trows + winds
413+ endif
414+ endif
415+
416+ for m in values
417+ if m =~? '^'.a:base
418+ call add(res, m)
419+ elseif m =~? a:base
420+ call add(res2, m)
421+ endif
422+ endfor
423+
424+ unlet! values
425+ return res + res2
426+
427+ endif
428+
429+ if exists("b:jsrange")
430+ let file = getline(b:jsrange[0],b:jsrange[1])
431+ unlet! b:jsrange
432+ else
433+ let file = getline(1, '$')
434+ endif
435+
436+ " Get variables data.
437+ let variables = filter(copy(file), 'v:val =~ "var\\s"')
438+ call map(variables, 'matchstr(v:val, ".\\{-}var\\s\\+\\zs.*\\ze")')
439+ call map(variables, 'substitute(v:val, ";\\|$", ",", "g")')
440+ let vars = []
441+ " This loop is necessary to get variable names from constructs like:
442+ " var var1, var2, var3 = "something";
443+ for i in range(len(variables))
444+ let comma_separated = split(variables[i], ',\s*')
445+ call map(comma_separated, 'matchstr(v:val, "\\w\\+")')
446+ let vars += comma_separated
447+ endfor
448+
449+ let variables = sort(vars)
450+
451+ " Add undeclared variables.
452+ let undeclared_variables = filter(copy(file), 'v:val =~ "^\\s*\\w\\+\\s*="')
453+ call map(undeclared_variables, 'matchstr(v:val, "^\\s*\\zs\\w\\+\\ze")')
454+
455+ let variables += sort(undeclared_variables)
456+
457+ " Get functions
458+ let functions = filter(copy(file), 'v:val =~ "^\\s*function\\s"')
459+ let arguments = copy(functions)
460+ call map(functions, 'matchstr(v:val, "^\\s*function\\s\\+\\zs\\w\\+")')
461+ call map(functions, 'v:val."("')
462+
463+ " Get functions arguments
464+ call map(arguments, 'matchstr(v:val, "function.\\{-}(\\zs.\\{-}\\ze)")')
465+ let jargs = join(arguments, ',')
466+ let jargs = substitute(jargs, '\s', '', 'g')
467+ let arguments = split(jargs, ',')
468+
469+ " Built-in functions
470+ let builtin = []
471+
472+ " Top-level HTML DOM objects
473+ 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']
474+ call map(htmldom, 'v:val."."')
475+
476+ " Top-level properties
477+ let properties = ['decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent',
478+ \ 'eval', 'Infinity', 'isFinite', 'isNaN', 'NaN', 'Number', 'parseFloat',
479+ \ 'parseInt', 'String', 'undefined', 'escape', 'unescape']
480+
481+ " Keywords
482+ 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"]
483+
484+ let values = variables + functions + htmldom + arguments + builtin + properties + keywords
485+
486+ for m in values
487+ if m =~? '^'.a:base
488+ call add(res, m)
489+ elseif m =~? a:base
490+ call add(res2, m)
491+ endif
492+ endfor
493+
494+ return res + res2
495+endfunction
diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/autoload/spellfile.vim
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/runtime/autoload/spellfile.vim Wed Feb 01 21:56:25 2006 +0000
@@ -0,0 +1,111 @@
1+" Vim script to download a missing spell file
2+" Maintainer: Bram Moolenaar <Bram@vim.org>
3+" Last Change: 2006 Feb 01
4+
5+if !exists('g:spellfile_URL')
6+ let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/unstable/runtime/spell'
7+endif
8+let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
9+
10+" This function is used for the spellfile plugin.
11+function! spellfile#LoadFile(lang)
12+ " If the netrw plugin isn't loaded we silently skip everything.
13+ if !exists(":Nread")
14+ if &verbose
15+ echomsg 'spellfile#LoadFile(): Nread command is not available.'
16+ endif
17+ return
18+ endif
19+
20+ " If the URL changes we try all files again.
21+ if s:spellfile_URL != g:spellfile_URL
22+ let s:donedict = {}
23+ let s:spellfile_URL = g:spellfile_URL
24+ endif
25+
26+ " I will say this only once!
27+ if has_key(s:donedict, a:lang . &enc)
28+ if &verbose
29+ echomsg 'spellfile#LoadFile(): Tried this language/encoding before.'
30+ endif
31+ return
32+ endif
33+ let s:donedict[a:lang . &enc] = 1
34+
35+ " Find spell directories we can write in.
36+ let dirlist = []
37+ let dirchoices = '&Cancel'
38+ for dir in split(globpath(&rtp, 'spell'), "\n")
39+ if filewritable(dir) == 2
40+ call add(dirlist, dir)
41+ let dirchoices .= "\n&" . len(dirlist)
42+ endif
43+ endfor
44+ if len(dirlist) == 0
45+ if &verbose
46+ echomsg 'spellfile#LoadFile(): There is no writable spell directory.'
47+ endif
48+ return
49+ endif
50+
51+ let msg = 'Cannot find spell file for "' . a:lang . '" in ' . &enc
52+ let msg .= "\nDo you want me to try downloading it?"
53+ if confirm(msg, "&Yes\n&No", 2) == 1
54+ let enc = &encoding
55+ if enc == 'iso-8859-15'
56+ let enc = 'latin1'
57+ endif
58+ let fname = a:lang . '.' . enc . '.spl'
59+
60+ " Split the window, read the file into a new buffer.
61+ new
62+ setlocal bin
63+ echo 'Downloading ' . fname . '...'
64+ exe 'Nread ' g:spellfile_URL . '/' . fname
65+ if getline(2) !~ 'VIMspell'
66+ " Didn't work, perhaps there is an ASCII one.
67+ g/^/d
68+ let fname = a:lang . '.ascii.spl'
69+ echo 'Could not find it, trying ' . fname . '...'
70+ exe 'Nread ' g:spellfile_URL . '/' . fname
71+ if getline(2) !~ 'VIMspell'
72+ echo 'Sorry, downloading failed'
73+ bwipe!
74+ return
75+ endif
76+ endif
77+
78+ " Delete the empty first line and mark the file unmodified.
79+ 1d
80+ set nomod
81+
82+ let msg = "In which directory do you want to write the file:"
83+ for i in range(len(dirlist))
84+ let msg .= "\n" . (i + 1) . '. ' . dirlist[i]
85+ endfor
86+ let dirchoice = confirm(msg, dirchoices) - 2
87+ if dirchoice >= 0
88+ exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
89+
90+ " Also download the .sug file, if the user wants to.
91+ let msg = "Do you want me to try getting the .sug file?\n"
92+ let msg .= "This will improve making suggestions for spelling mistakes,\n"
93+ let msg .= "but it uses quite a bit of memory."
94+ if confirm(msg, "&No\n&Yes") == 2
95+ g/^/d
96+ let fname = substitute(fname, '\.spl$', '.sug', '')
97+ echo 'Downloading ' . fname . '...'
98+ exe 'Nread ' g:spellfile_URL . '/' . fname
99+ if getline(2) !~ 'VIMsug'
100+ echo 'Sorry, downloading failed'
101+ else
102+ 1d
103+ exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
104+ endif
105+ set nomod
106+ endif
107+ endif
108+
109+ bwipe
110+ endif
111+endfunc
diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/doc/pattern.txt
--- a/runtime/doc/pattern.txt Wed Feb 01 21:51:12 2006 +0000
+++ b/runtime/doc/pattern.txt Wed Feb 01 21:56:25 2006 +0000
@@ -1,4 +1,4 @@
1-*pattern.txt* For Vim version 7.0aa. Last change: 2006 Jan 22
1+*pattern.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -821,7 +821,7 @@
821821 {not in Vi}
822822 WARNING: When the mark is moved after the pattern was used, the result
823823 becomes invalid. Vim doesn't automatically update the matches.
824- Similar to moving the cursor for |\%#|.
824+ Similar to moving the cursor for "\%#" |/\%#|.
825825
826826 */\%l* */\%>l* */\%<l*
827827 \%23l Matches in a specific line.
diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/doc/quickfix.txt
--- a/runtime/doc/quickfix.txt Wed Feb 01 21:51:12 2006 +0000
+++ b/runtime/doc/quickfix.txt Wed Feb 01 21:56:25 2006 +0000
@@ -1,4 +1,4 @@
1-*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Jan 29
1+*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Jan 30
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -311,14 +311,17 @@
311311
312312 When the quickfix window has been filled, two autocommand events are
313313 triggered. First the 'filetype' option is set to "qf", which triggers the
314-FileType event. Then the BufReadPost event is triggered. This can be used to
315-perform some action on the listed errors. Example: >
314+FileType event. Then the BufReadPost event is triggered, using "quickfix" for
315+the buffer name. This can be used to perform some action on the listed
316+errors. Example: >
316317 au BufReadPost quickfix setlocal modifiable
317318 \ | silent exe 'g/^/s//\=line(".")." "/'
318319 \ | setlocal nomodifiable
319320 This prepends the line number to each line. Note the use of "\=" in the
320321 substitute string of the ":s" command, which is used to evaluate an
321322 expression.
323+The BufWinEnter event is also triggered, again using "quickfix" for the buffer
324+name.
322325
323326 Note: Making changes in the quickfix window has no effect on the list of
324327 errors. 'modifiable' is off to avoid making changes. If you delete or insert
@@ -332,7 +335,8 @@
332335 open a location list window, it is created below the current window and
333336 displays the location list for the current window. The location list window
334337 is similar to the quickfix window, except that you can have more than one
335-location list window open at a time.
338+location list window open at a time. When you use a location list command in
339+this window, the displayed location list is used.
336340
337341 When you select a file from the location list window, the following steps are
338342 used to find a window to edit the file:
diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/doc/spell.txt
--- a/runtime/doc/spell.txt Wed Feb 01 21:51:12 2006 +0000
+++ b/runtime/doc/spell.txt Wed Feb 01 21:56:25 2006 +0000
@@ -1,4 +1,4 @@
1-*spell.txt* For Vim version 7.0aa. Last change: 2006 Jan 25
1+*spell.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -261,6 +261,10 @@
261261 this succeeds then additionally files with the name LL.EEE.add.spl are loaded.
262262 All the ones that are found are used.
263263
264+If no spell file is found the |SpellFileMissing| autocommand event is
265+triggered. This may trigger the |spellfile.vim| plugin to offer you
266+downloading the spell file.
267+
264268 Additionally, the files related to the names in 'spellfile' are loaded. These
265269 are the files that |zg| and |zw| add good and wrong words to.
266270
@@ -560,6 +564,48 @@
560564 Comment lines with the name of the .spl file are used as a header above the
561565 words that were generated from that .spl file.
562566
567+
568+SPELL FILE MISSING *spell-SpellFileMissing* *spellfile.vim*
569+
570+If the spell file for the language you are using is not available, you will
571+get an error message. But if the "spellfile.vim" plugin is active it will
572+offer you to download the spell file. Just follow the instructions, it will
573+ask you where to write the file.
574+
575+The plugin has a default place where to look for spell files, on the Vim ftp
576+server. If you want to use another location or another protocol, set the
577+g:spellfile_URL variable to the directory that holds the spell files. The
578+|netrw| plugin is used for getting the file, look there for the speficic
579+syntax of the URL. Example: >
580+ let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
581+You may need to escape special characters.
582+
583+The plugin will only ask about downloading a language once. If you want to
584+try again anyway restart Vim, or set g:spellfile_URL to another value (e.g.,
585+prepend a space).
586+
587+To avoid using the "spellfile.vim" plugin do this in your vimrc file: >
588+
589+ let loaded_spellfile_plugin = 1
590+
591+Instead of using the plugin you can define a |SpellFileMissing| autocommand to
592+handle the missing file yourself. You can use it like this: >
593+
594+ :au SpellFileMissing * call Download_spell_file(expand('<amatch>'))
595+
596+Thus the <amatch> item contains the name of the language. Another important
597+value is 'encoding', since every encoding has its own spell file. With two
598+exceptions:
599+- For ISO-8859-15 (latin9) the name "latin1" is used (the encodings only
600+ differ in characters not used in dictionary words).
601+- The name "ascii" may also be used for some languages where the words use
602+ only ASCII letters for most of the words.
603+
604+The default "spellfile.vim" plugin uses this autocommand, if you define your
605+autocommand afterwars you may want to use ":au! SpellFileMissing" to overrule
606+it. If you define your autocommand before the plugin is loaded it will notice
607+this and not do anything.
608+
563609 ==============================================================================
564610 4. Spell file format *spell-file-format*
565611
diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/doc/tagsrch.txt
--- a/runtime/doc/tagsrch.txt Wed Feb 01 21:51:12 2006 +0000
+++ b/runtime/doc/tagsrch.txt Wed Feb 01 21:56:25 2006 +0000
@@ -257,6 +257,17 @@
257257 :tl[ast][!] Jump to last matching tag. See |tag-!| for [!]. {not
258258 in Vi}
259259
260+ *:lt* *:ltag*
261+:lt[ag][!] [ident] Jump to tag [ident] and add the matching tags to a new
262+ location list for the current window. [ident] can be
263+ a regexp pattern, see |tag-regexp|. When [ident] is
264+ not given, the last tag name from the tag stack is
265+ used. The search pattern to locate the tag line is
266+ prefixed with "\V" to escape all the special
267+ characters (very nomagic). The location list showing
268+ the matching tags is independent of the tag stack.
269+ See |tag-!| for [!].
270+ {not in Vi}
260271
261272 When there is no other message, Vim shows which matching tag has been jumped
262273 to, and the number of matching tags: >
@@ -275,6 +286,7 @@
275286 missing files. When the end of the list of matches has been reached, an error
276287 message is given.
277288
289+ *tag-preview*
278290 The tag match list can also be used in the preview window. The commands are
279291 the same as above, with a "p" prepended.
280292 {not available when compiled without the |+quickfix| feature}
diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/doc/todo.txt
--- a/runtime/doc/todo.txt Wed Feb 01 21:51:12 2006 +0000
+++ b/runtime/doc/todo.txt Wed Feb 01 21:56:25 2006 +0000
@@ -1,4 +1,4 @@
1-*todo.txt* For Vim version 7.0aa. Last change: 2006 Jan 29
1+*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,8 +30,6 @@
3030 *known-bugs*
3131 -------------------- Known bugs and current work -----------------------
3232
33-Truncating error message keeps one char too many, causes an empty line.
34-
3533 Variant of ":helpgrep" that uses a location list? How about:
3634 :lhelpgrep (use local list in help window, not current window)
3735 :lgrep
@@ -64,18 +62,14 @@
6462 struct pointer).
6563 - Special mappings for when the popup menu is visible? Would allow for making
6664 a specific selection (e.g, methods vs variables).
67-- Provide a function to popup the menu, so that an insert mode mapping can
68- start it (with a specific selection).
6965
7066 spelling:
7167 - Also use the spelling dictionary for dictionary completion.
72- When 'dictionary' is empty and/or when "kspell" is in 'complete'.
68+ When 'dictionary' is empty and/or when "kspell" is in 'complete'.
7369 - Use runtime/cleanadd script to cleanup .add files. When to invoke it?
7470 After deleting a word with "zw" and some timestamp difference perhaps?
7571 Store it as spell/cleanadd.vim.
7672 - suggestion for "KG" to "kg" when it's keepcase.
77-- Autocommand event for when a spell file is missing. Allows making a plugin
78- that fetches the file over internet. Pattern == language.
7973 - Using KEEPCASE flag still allows all-upper word, docs say it doesn't.
8074 Don't allow it, because there is no other way to do this.
8175 - Implement NOSUGGEST flag (used for obscene words).
@@ -252,6 +246,8 @@
252246 Completion in .NET framework SharpDevelop: http://www.icsharpcode.net
253247
254248 - Pre-expand abbreviations, show which abbrevs would match?
249+ - Provide a function to popup the menu, so that an insert mode mapping can
250+ start it (with a specific selection).
255251
256252 - UNDO TREE: keep all states of the text, don't delete undo info.
257253 When making a change, instead of clearing any future undo (thus redo)
@@ -409,10 +405,6 @@
409405
410406 Add gui_mch_browsedir() for Motif, Mac OS/X.
411407
412-Implement:
413- :ltag list of matching tags, like :tselect
414-Patch from Yegappan Lakshmanan, Jan 13.
415-
416408 HTML indenting can be slow, find out why. Any way to do some kind of
417409 profiling for Vim script? At least add a function to get the current time in
418410 usec. reltime([start, [end]])
@@ -2101,14 +2093,10 @@
21012093
21022094
21032095 Tags:
2104-8 Add a function that returns the line in the tags file for a matching tag.
2105- Can be used to extract more info (class name, inheritance, etc.) (Rico
2106- Hendriks)
21072096 7 Count before CTRL-]: jump to N'th match
21082097 8 Scope arguments for ":tag", e.g.: ":tag class:cPage open", like Elvis.
21092098 8 When output of ":tselect" is long, getting the more-prompt, should be able
21102099 to type the tag number directly.
2111-7 Add a tag-select window. Works like ":cwindow". (Michal Malecki)
21122100 7 Add the possibility to use the "-t {tag}" argument multiple times. Open a
21132101 window for each tag.
21142102 7 Make output of ":tselect" a bit nicer. Use highlighting?
@@ -3321,8 +3309,7 @@
33213309 next <li>, ]< to next </li>, [< to previous </li>.
33223310 8 Add ":rename" command: rename the file of the current buffer and rename
33233311 the buffer. Buffer may be modified.
3324-- Perhaps ":cexpr" could read errors from a list?
3325- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
3312+- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
33263313 Govindachar)
33273314 6 In the quickfix window statusline add the command used to get the list of
33283315 errors, e.g. ":make foo", ":grep something *.c".
diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/doc/version7.txt
--- a/runtime/doc/version7.txt Wed Feb 01 21:51:12 2006 +0000
+++ b/runtime/doc/version7.txt Wed Feb 01 21:56:25 2006 +0000
@@ -1,4 +1,4 @@
1-*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 28
1+*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -449,6 +449,8 @@
449449 |:caddexpr| Add error messages from a Vim expression to an
450450 existing quickfix list. (Yegappan Lakshmanan).
451451
452+|:ltag| Jump to a tag and add matching tags to a location list.
453+
452454
453455 Ex command modifiers: ~
454456
@@ -547,6 +549,8 @@
547549 |QuickFixCmdPost| after :make, :grep et al. (Ciaran McCreesh)
548550 |SessionLoadPost| after loading a session file. (Yegappan Lakshmanan)
549551
552+|SpellFileMissing| when a spell file can't be found
553+
550554
551555 New items in search patterns: ~
552556 |/\%d| \%d123 search for character with decimal number
@@ -1629,4 +1633,7 @@
16291633
16301634 ":set sta ts=8 sw=4 sts=2" deleted 4 spaces halfway a line instead of 2.
16311635
1636+In a multi-byte file the foldmarker could be recognized in the trail byte.
1637+(Taro Muraoka)
1638+
16321639 vim:tw=78:ts=8:ft=help:norl:
diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/ftplugin/javascript.vim
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/runtime/ftplugin/javascript.vim Wed Feb 01 21:56:25 2006 +0000
@@ -0,0 +1,13 @@
1+" Vim filetype plugin file
2+" Language: Javascript
3+" Maintainer: Bram Moolenaar (for now)
4+" Last Change: 2006 Jan 30
5+
6+if exists("b:did_ftplugin")
7+ finish
8+endif
9+let b:did_ftplugin = 1
10+
11+if exists('&ofu')
12+ setlocal ofu=javascriptcomplete#CompleteJS
13+endif
diff -r 662e40bd2be1 -r bc95c6c4bac1 runtime/scripts.vim
--- a/runtime/scripts.vim Wed Feb 01 21:51:12 2006 +0000
+++ b/runtime/scripts.vim Wed Feb 01 21:56:25 2006 +0000
@@ -1,7 +1,7 @@
11 " Vim support file to detect file types in scripts
22 "
33 " Maintainer: Bram Moolenaar <Bram@vim.org>
4-" Last change: 2005 Oct 12
4+" Last change: 2006 Feb 01
55
66 " This file is called by an autocommand for every file that has just been
77 " loaded into a buffer. It checks if the type of file can be recognized by
@@ -184,7 +184,7 @@
184184 " - "*** " in first line and "--- " in second line (context diff).
185185 " - "# It was generated by makepatch " in the second line (makepatch diff).
186186 " - "Index: <filename>" in the first line (CVS file)
187- elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)'
187+ elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\)'
188188 \ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ')
189189 \ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ')
190190 \ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ')
diff -r 662e40bd2be1 -r bc95c6c4bac1 src/eval.c
--- a/src/eval.c Wed Feb 01 21:51:12 2006 +0000
+++ b/src/eval.c Wed Feb 01 21:56:25 2006 +0000
@@ -400,8 +400,6 @@
400400 static int get_string_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
401401 static int get_lit_string_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
402402 static int get_list_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
403-static list_T *list_alloc __ARGS((void));
404-static void list_free __ARGS((list_T *l));
405403 static listitem_T *listitem_alloc __ARGS((void));
406404 static void listitem_free __ARGS((listitem_T *item));
407405 static void listitem_remove __ARGS((list_T *l, listitem_T *item));
@@ -5197,7 +5195,7 @@
51975195 * Allocate an empty header for a list.
51985196 * Caller should take care of the reference count.
51995197 */
5200- static list_T *
5198+ list_T *
52015199 list_alloc()
52025200 {
52035201 list_T *l;
@@ -5231,7 +5229,7 @@
52315229 * Free a list, including all items it points to.
52325230 * Ignores the reference count.
52335231 */
5234- static void
5232+ void
52355233 list_free(l)
52365234 list_T *l;
52375235 {
diff -r 662e40bd2be1 -r bc95c6c4bac1 src/ex_cmds.h
--- a/src/ex_cmds.h Wed Feb 01 21:51:12 2006 +0000
+++ b/src/ex_cmds.h Wed Feb 01 21:56:25 2006 +0000
@@ -543,6 +543,8 @@
543543 RANGE|NOTADR|COUNT|TRLBAR|BANG),
544544 EX(CMD_lrewind, "lrewind", ex_cc,
545545 RANGE|NOTADR|COUNT|TRLBAR|BANG),
546+EX(CMD_ltag, "ltag", ex_tag,
547+ NOTADR|TRLBAR|BANG|WORD1),
546548 EX(CMD_lunmap, "lunmap", ex_unmap,
547549 EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
548550 EX(CMD_lwindow, "lwindow", ex_cwindow,
diff -r 662e40bd2be1 -r bc95c6c4bac1 src/fold.c
--- a/src/fold.c Wed Feb 01 21:51:12 2006 +0000
+++ b/src/fold.c Wed Feb 01 21:56:25 2006 +0000
@@ -3188,7 +3188,7 @@
31883188 --flp->lvl_next;
31893189 }
31903190 else
3191- ++s;
3191+ mb_ptr_adv(s);
31923192 }
31933193
31943194 /* The level can't go negative, must be missing a start marker. */
Show on old repository browser