annotate runtime/syntax/st.vim @ 7679:c80284cfe1b8 v7.4.1138

commit https://github.com/vim/vim/commit/3a466a87180d677b898687ef72d09f14a397794e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 19 17:47:25 2016 +0100 patch 7.4.1138 Problem: When running gvim in the foreground some icons are missing. (Taylor Venable) Solution: Move the call to gui_gtk_register_resource(). (Kazunobu Kuriyama)
author Christian Brabandt <cb@256bit.org>
date Tue, 19 Jan 2016 18:00:06 +0100
parents b37888de599c
children 43efa4f5a8ea
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>
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " Last Change: 2012 Feb 12 by Thilo Six
7
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
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
14 let s:cpo_save = &cpo
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
15 set cpo&vim
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
16
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " some Smalltalk keywords and standard methods
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword stKeyword super self class true false new not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword stKeyword notNil isNil inspect out nil
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match stMethod "\<do\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match stMethod "\<whileTrue\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match stMethod "\<whileFalse\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match stMethod "\<ifTrue\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match stMethod "\<ifFalse\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match stMethod "\<put\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match stMethod "\<to\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match stMethod "\<at\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match stMethod "\<add\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match stMethod "\<new\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match stMethod "\<for\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match stMethod "\<methods\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match stMethod "\<methodsFor\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match stMethod "\<instanceVariableNames\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match stMethod "\<classVariableNames\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match stMethod "\<poolDictionaries\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match stMethod "\<subclass\>:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " the block of local variables of a method
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn region stLocalVariables start="^[ \t]*|" 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 comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn region stComment start="\"" end="\""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " the Smalltalk strings and single characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn region stString start='\'' skip="''" end='\''
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match stCharacter "$."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " the symols prefixed by a '#'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match stSymbol "\(#\<[a-z_][a-z0-9_]*\>\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match stSymbol "\(#'[^']*'\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " the variables in a statement block for loops
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match stBlockVariable "\(:[ \t]*\<[a-z_][a-z0-9_]*\>[ \t]*\)\+|" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " some representations of numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match stNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match stFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match stFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " a try to higlight paren mismatches
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn region stParen transparent start='(' end=')' contains=ALLBUT,stParenError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match stParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn region stBlock transparent start='\[' end='\]' contains=ALLBUT,stBlockError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match stBlockError "\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn region stSet transparent start='{' end='}' contains=ALLBUT,stSetError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match stSetError "}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 hi link stParenError stError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 hi link stSetError stError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 hi link stBlockError stError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " synchronization for syntax analysis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 " 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
82 if version >= 508 || !exists("did_st_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 let did_st_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink stKeyword Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink stMethod Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink stComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink stCharacter Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 HiLink stString Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 HiLink stSymbol Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink stNumber Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 HiLink stFloat Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 HiLink stError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 HiLink stLocalVariables Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 HiLink stBlockVariable Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 let b:current_syntax = "st"
3356
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
106
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
107 let &cpo = s:cpo_save
b37888de599c Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
108 unlet s:cpo_save