annotate runtime/syntax/form.vim @ 1509:79bba9e6af2b v7.1.224

updated for version 7.1-224
author vimboss
date Sun, 13 Jan 2008 15:18:01 +0000
parents 3fc0f57ecb91
children 7bc41231fbc7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: FORM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Michael M. Tung <michael.tung@uni-mainz.de>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2001 May 10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " First public release based on 'Symbolic Manipulation with FORM'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " by J.A.M. Vermaseren, CAN, Netherlands, 1991.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " This syntax file is still in development. Please send suggestions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " to the maintainer.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " A bunch of useful FORM keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword formType global local
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword formHeaderStatement symbol symbols cfunction cfunctions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword formHeaderStatement function functions vector vectors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword formHeaderStatement set sets index indices
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword formHeaderStatement dimension dimensions unittrace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword formStatement id identify drop skip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword formStatement write nwrite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword formStatement format print nprint load save
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword formStatement bracket brackets
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword formStatement multiply count match only discard
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword formStatement trace4 traceN contract symmetrize antisymmetrize
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword formConditional if else endif while
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword formConditional repeat endrepeat label goto
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " some special functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword formStatement g_ gi_ g5_ g6_ g7_ 5_ 6_ 7_
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword formStatement e_ d_ delta_ theta_ sum_ sump_
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " pattern matching for keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match formComment "^\ *\*.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match formComment "\;\ *\*.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region formString start=+"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn region formString start=+'+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match formPreProc "^\=\#[a-zA-z][a-zA-Z0-9]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match formNumber "\<\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match formNumber "\<\d\+\.\d*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match formNumber "\.\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match formNumber "-\d" contains=Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match formNumber "-\.\d" contains=Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match formNumber "i_\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match formNumber "fac_\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match formDirective "^\=\.[a-zA-z][a-zA-Z0-9]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " hi User Labels
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn sync ccomment formComment minlines=10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 if version >= 508 || !exists("did_form_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 let did_form_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink formConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink formNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink formStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink formComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink formPreProc PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink formDirective PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink formType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink formString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 if !exists("form_enhanced_color")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink formHeaderStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 " enhanced color mode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink formHeaderStatement HeaderStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 " dark and a light background for local types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 if &background == "dark"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 hi HeaderStatement term=underline ctermfg=LightGreen guifg=LightGreen gui=bold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 hi HeaderStatement term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 " change slightly the default for dark gvim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 if has("gui_running") && &background == "dark"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 hi Conditional guifg=LightBlue gui=bold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 hi Statement guifg=LightYellow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 let b:current_syntax = "form"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 " vim: ts=8