annotate runtime/syntax/st.vim @ 226:4e7dca477fee

updated for version 7.0063
author vimboss
date Tue, 22 Mar 2005 22:54:12 +0000
parents 3fc0f57ecb91
children b37888de599c
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: Smalltalk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Arndt Hesse <hesse@self.de>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2001 May 09
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " some Smalltalk keywords and standard methods
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn keyword stKeyword super self class true false new not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword stKeyword notNil isNil inspect out nil
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn match stMethod "\<do\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match stMethod "\<whileTrue\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match stMethod "\<whileFalse\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match stMethod "\<ifTrue\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match stMethod "\<ifFalse\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match stMethod "\<put\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match stMethod "\<to\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match stMethod "\<at\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match stMethod "\<add\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match stMethod "\<new\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match stMethod "\<for\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match stMethod "\<methods\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match stMethod "\<methodsFor\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match stMethod "\<instanceVariableNames\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match stMethod "\<classVariableNames\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match stMethod "\<poolDictionaries\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match stMethod "\<subclass\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " the block of local variables of a method
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region stLocalVariables start="^[ \t]*|" end="|"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " the Smalltalk comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn region stComment start="\"" end="\""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " the Smalltalk strings and single characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn region stString start='\'' skip="''" end='\''
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match stCharacter "$."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " the symols prefixed by a '#'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match stSymbol "\(#\<[a-z_][a-z0-9_]*\>\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match stSymbol "\(#'[^']*'\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " the variables in a statement block for loops
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match stBlockVariable "\(:[ \t]*\<[a-z_][a-z0-9_]*\>[ \t]*\)\+|" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " some representations of numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match stNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match stFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match stFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " a try to higlight paren mismatches
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn region stParen transparent start='(' end=')' contains=ALLBUT,stParenError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match stParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn region stBlock transparent start='\[' end='\]' contains=ALLBUT,stBlockError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match stBlockError "\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn region stSet transparent start='{' end='}' contains=ALLBUT,stSetError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match stSetError "}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 hi link stParenError stError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 hi link stSetError stError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 hi link stBlockError stError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " synchronization for syntax analysis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " 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
79 if version >= 508 || !exists("did_st_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 let did_st_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink stKeyword Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink stMethod Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink stComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink stCharacter Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink stString Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink stSymbol Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink stNumber Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 HiLink stFloat Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 HiLink stError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink stLocalVariables Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 HiLink stBlockVariable Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 let b:current_syntax = "st"