comparison runtime/autoload/syntaxcomplete.vim @ 3224:8b8ef1fed009

Update runtime files.
author Bram Moolenaar <bram@vim.org>
date Wed, 14 Dec 2011 21:17:39 +0100
parents 86532ee3ea41
children c53344bacabf
comparison
equal deleted inserted replaced
3223:576648218cb5 3224:8b8ef1fed009
1 " Vim completion script 1 " Vim completion script
2 " Language: All languages, uses existing syntax highlighting rules 2 " Language: All languages, uses existing syntax highlighting rules
3 " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com> 3 " Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
4 " Version: 7.0 4 " Version: 8.0
5 " Last Change: 2010 Jul 29 5 " Last Change: 2011 Nov 02
6 " Usage: For detailed help, ":help ft-syntax-omni" 6 " Usage: For detailed help, ":help ft-syntax-omni"
7 7
8 " History 8 " History
9 "
10 " Version 8.0
11 " Updated SyntaxCSyntaxGroupItems()
12 " - Some additional syntax items were also allowed
13 " on nextgroup= lines which were ignored by default.
14 " Now these lines are processed independently.
9 " 15 "
10 " Version 7.0 16 " Version 7.0
11 " Updated syntaxcomplete#OmniSyntaxList() 17 " Updated syntaxcomplete#OmniSyntaxList()
12 " - Looking up the syntax groups defined from a syntax file 18 " - Looking up the syntax groups defined from a syntax file
13 " looked for only 1 format of {filetype}GroupName, but some 19 " looked for only 1 format of {filetype}GroupName, but some
42 endif 48 endif
43 49
44 if exists('g:loaded_syntax_completion') 50 if exists('g:loaded_syntax_completion')
45 finish 51 finish
46 endif 52 endif
47 let g:loaded_syntax_completion = 70 53 let g:loaded_syntax_completion = 80
48 54
49 " Set ignorecase to the ftplugin standard 55 " Set ignorecase to the ftplugin standard
50 " This is the default setting, but if you define a buffer local 56 " This is the default setting, but if you define a buffer local
51 " variable you can override this on a per filetype. 57 " variable you can override this on a per filetype.
52 if !exists('g:omni_syntax_ignorecase') 58 if !exists('g:omni_syntax_ignorecase')
70 endif 76 endif
71 77
72 " This script will build a completion list based on the syntax 78 " This script will build a completion list based on the syntax
73 " elements defined by the files in $VIMRUNTIME/syntax. 79 " elements defined by the files in $VIMRUNTIME/syntax.
74 let s:syn_remove_words = 'match,matchgroup=,contains,'. 80 let s:syn_remove_words = 'match,matchgroup=,contains,'.
75 \ 'links to,start=,end=,nextgroup=' 81 \ 'links to,start=,end='
82 " \ 'links to,start=,end=,nextgroup='
76 83
77 let s:cache_name = [] 84 let s:cache_name = []
78 let s:cache_list = [] 85 let s:cache_list = []
79 let s:prepended = '' 86 let s:prepended = ''
80 87
409 \ ). 416 \ ).
410 \ '\).\{-}\%($\|'."\n".'\)' 417 \ '\).\{-}\%($\|'."\n".'\)'
411 \ , "\n", 'g' 418 \ , "\n", 'g'
412 \ ) 419 \ )
413 420
414 " Now strip off the newline + blank space + contained 421 " Now strip off the newline + blank space + contained.
422 " Also include lines with nextgroup=@someName skip_key_words syntax_element
415 let syn_list = substitute( 423 let syn_list = substitute(
416 \ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\)' 424 \ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\|nextgroup=\)'
425 \ , "", 'g'
426 \ )
427
428 " This can leave lines like this
429 " =@vimMenuList skipwhite onoremenu
430 " Strip the special option keywords first
431 " :h :syn-skipwhite*
432 let syn_list = substitute(
433 \ syn_list, '\<\(skipwhite\|skipnl\|skipempty\)\>'
434 \ , "", 'g'
435 \ )
436
437 " Now remove the remainder of the nextgroup=@someName lines
438 let syn_list = substitute(
439 \ syn_list, '\%(^\|\n\)\@<=\s*\(@\w\+\)'
417 \ , "", 'g' 440 \ , "", 'g'
418 \ ) 441 \ )
419 442
420 if b:omni_syntax_use_iskeyword == 0 443 if b:omni_syntax_use_iskeyword == 0
421 " There are a number of items which have non-word characters in 444 " There are a number of items which have non-word characters in