~ubuntu-branches/ubuntu/maverick/vim/maverick

« back to all changes in this revision

Viewing changes to runtime/syntax/lex.vim

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-05-04 11:13:42 UTC
  • mfrom: (1.1.8 upstream) (0.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090504111342-60miqybsixdpc345
Tags: 2:7.2.148-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim.
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Disable autoindent, line-wrapping, and backup files by default.
* Dropped changes, merged in Debian:
  - Add jaunty, karmic to the list of valid suites.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - Create a .pot file for translations.
* Drop gutsy from the list of valid distro series, it's been EOLed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
" Vim syntax file
2
2
" Language:     Lex
3
3
" Maintainer:   Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
4
 
" Last Change:  Sep 06, 2005
5
 
" Version:      7
 
4
" Last Change:  Sep 04, 2008
 
5
" Version:      9
6
6
" URL:  http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
7
7
"
8
8
" Option:
41
41
syn cluster lexListPatCodeGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError
42
42
 
43
43
" Abbreviations Section
44
 
syn region lexAbbrvBlock        start="^\(\h\+\s\|%{\)" end="^\ze%%$"   skipnl  nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState
 
44
if has("folding")
 
45
 syn region lexAbbrvBlock       fold start="^\(\h\+\s\|%{\)" end="^\ze%%$"      skipnl  nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState
 
46
else
 
47
 syn region lexAbbrvBlock       start="^\(\h\+\s\|%{\)" end="^\ze%%$"   skipnl  nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment,lexStartState
 
48
endif
45
49
syn match  lexAbbrv             "^\I\i*\s"me=e-1                        skipwhite       contained nextgroup=lexAbbrvRegExp
46
50
syn match  lexAbbrv             "^%[sx]"                                        contained
47
51
syn match  lexAbbrvRegExp       "\s\S.*$"lc=1                           contained nextgroup=lexAbbrv,lexInclude
48
 
syn region lexInclude   matchgroup=lexSep       start="^%{" end="%}"    contained       contains=ALLBUT,@lexListGroup
49
 
syn region lexAbbrvComment      start="^\s\+/\*"        end="\*/"                       contains=@Spell
50
 
syn region lexStartState        matchgroup=lexAbbrv     start="^%\a\+"  end="$"                 contained
 
52
if has("folding")
 
53
 syn region lexInclude  fold matchgroup=lexSep  start="^%{" end="%}"    contained       contains=ALLBUT,@lexListGroup
 
54
 syn region lexAbbrvComment     fold start="^\s\+/\*"   end="\*/"                       contains=@Spell
 
55
 syn region lexStartState       fold matchgroup=lexAbbrv        start="^%\a\+"  end="$"                 contained
 
56
else
 
57
 syn region lexInclude  matchgroup=lexSep       start="^%{" end="%}"    contained       contains=ALLBUT,@lexListGroup
 
58
 syn region lexAbbrvComment     start="^\s\+/\*"        end="\*/"                       contains=@Spell
 
59
 syn region lexStartState       matchgroup=lexAbbrv     start="^%\a\+"  end="$"                 contained
 
60
endif
51
61
 
52
62
"%% : Patterns {Actions}
53
 
syn region lexPatBlock  matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPat,lexPatTag,lexPatComment
54
 
syn region lexPat               start=+\S+ skip="\\\\\|\\."     end="\s"me=e-1  contained nextgroup=lexMorePat,lexPatSep contains=lexPatString,lexSlashQuote,lexBrace
55
 
syn region lexBrace     start="\[" skip=+\\\\\|\\+              end="]"         contained
56
 
syn region lexPatString matchgroup=String start=+"+     skip=+\\\\\|\\"+        matchgroup=String end=+"+       contained
 
63
if has("folding")
 
64
 syn region lexPatBlock fold matchgroup=Todo    start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPat,lexPatTag,lexPatComment
 
65
 syn region lexPat              fold start=+\S+ skip="\\\\\|\\."        end="\s"me=e-1  contained nextgroup=lexMorePat,lexPatSep contains=lexPatString,lexSlashQuote,lexBrace
 
66
 syn region lexBrace    fold start="\[" skip=+\\\\\|\\+         end="]"         contained
 
67
 syn region lexPatString        fold matchgroup=String start=+"+        skip=+\\\\\|\\"+        matchgroup=String end=+"+       contained
 
68
else
 
69
 syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPat,lexPatTag,lexPatComment
 
70
 syn region lexPat              start=+\S+ skip="\\\\\|\\."     end="\s"me=e-1  contained nextgroup=lexMorePat,lexPatSep contains=lexPatString,lexSlashQuote,lexBrace
 
71
 syn region lexBrace    start="\[" skip=+\\\\\|\\+              end="]"         contained
 
72
 syn region lexPatString        matchgroup=String start=+"+     skip=+\\\\\|\\"+        matchgroup=String end=+"+       contained
 
73
endif
57
74
syn match  lexPatTag    "^<\I\i*\(,\I\i*\)*>*"                  contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep
58
75
syn match  lexPatTag    +^<\I\i*\(,\I\i*\)*>*\(\\\\\)*\\"+              contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep
59
 
syn region lexPatComment        start="^\s*/\*" end="\*/"               skipnl  contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell
 
76
if has("folding")
 
77
 syn region lexPatComment       fold start="\s\+/\*" end="\*/"          skipnl  contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell
 
78
else
 
79
 syn region lexPatComment       start="\s\+/\*" end="\*/"               skipnl  contained contains=cTodo skipwhite nextgroup=lexPatComment,lexPat,@Spell
 
80
endif
60
81
syn match  lexPatCodeLine       ".*$"                                   contained contains=ALLBUT,@lexListGroup
61
82
syn match  lexMorePat   "\s*|\s*$"                      skipnl  contained nextgroup=lexPat,lexPatTag,lexPatComment
62
83
syn match  lexPatSep    "\s\+"                                  contained nextgroup=lexMorePat,lexPatCode,lexPatCodeLine
63
84
syn match  lexSlashQuote        +\(\\\\\)*\\"+                          contained
64
 
syn region lexPatCode matchgroup=Delimiter start="{" matchgroup=Delimiter end="}"       skipnl contained contains=ALLBUT,@lexListPatCodeGroup
 
85
if has("folding")
 
86
 syn region lexPatCode fold matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" skipnl contained contains=ALLBUT,@lexListPatCodeGroup
 
87
else
 
88
 syn region lexPatCode matchgroup=Delimiter start="{" matchgroup=Delimiter end="}"      skipnl contained contains=ALLBUT,@lexListPatCodeGroup
 
89
endif
65
90
 
66
91
syn keyword lexCFunctions       BEGIN   input   unput   woutput yyleng  yylook  yytext
67
92
syn keyword lexCFunctions       ECHO    output  winput  wunput  yyless  yymore  yywrap