File: rexx.vim

package info (click to toggle)
vim-rt 5.3-12
  • links: PTS
  • area: main
  • in suites: slink
  • size: 3,172 kB
  • ctags: 815
  • sloc: makefile: 857; awk: 778; ansic: 379; perl: 192; sh: 167
file content (70 lines) | stat: -rw-r--r-- 2,492 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
" Vim syntax file
" Language:	Rexx
" Maintainer:	Thomas Geulig <geulig@nentec.de>
" Last change:	1998 Apr 2

" Remove any old syntax stuff hanging around
syn clear

syn case ignore

" A bunch of useful Rexx keywords
syn keyword rexxKeyword address arg begin break by call do drop echo else end
syn keyword rexxKeyword exit forever function if interpret iterate leave nop
syn keyword rexxKeyword module numeric off on options otherwise parse procedure
syn keyword rexxKeyword pull push queue return say select shell signal then to
syn keyword rexxKeyword trace until upper value var when with

syn keyword rexxTodo contained	TODO FIXME XXX

" String and Character constants
" Highlight special characters (those which have a backslash) differently
syn match rexxSpecial contained	"\\[0-7][0-7][0-7]\=\|\\."
syn region rexxString		start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rexxSpecial
syn region rexxString		start=+'+ skip=+\\\\\|\\"+ end=+'+ contains=rexxSpecial
syn match rexxCharacter		"'[^\\]'"
syn match rexxSpecialCharacter	"'\\.'"
syn match rexxSpecialCharacter	"'\\[0-7][0-7]'"
syn match rexxSpecialCharacter	"'\\[0-7][0-7][0-7]'"

"catch errors caused by wrong parenthesis
syn region rexxParen		transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxSpecial,rexxTodo,rexxUserLabel
syn match rexxParenError	")"
syn match rexxInParen contained	"[{}]"

" Comments
syn region rexxComment		start="/\*" end="\*/" contains=rexxTodo
syn match rexxCommentError	"\*/"

" Highlight User Labels
syn region rexxMulti	transparent start='?' end=':' contains=ALLBUT,rexxSpecial,rexxTodo,rexxUserLabel
syn match rexxUserLabel	"\s*\I\i*\s*:$"
syn match rexxUserLabel	";\s*\I\i*\s*:$"ms=s+1
syn match rexxUserLabel	"\s*\I\i*\s*:"me=e-1
syn match rexxUserLabel	";\s*\I\i*\s*:"ms=s+1,me=e-1

if !exists("rexx_minlines")
  let rexx_minlines = 10
endif
exec "syn sync ccomment rexxComment minlines=" . rexx_minlines

if !exists("did_rexx_syntax_inits")
  let did_rexx_syntax_inits = 1
  " The default methods for highlighting.  Can be overridden later
  hi link rexxUserLabel		Label
  hi link rexxCharacter		Character
  hi link rexxSpecialCharacter	rexxSpecial
  hi link rexxParenError	rexxError
  hi link rexxInParen		rexxError
  hi link rexxCommentError	rexxError
  hi link rexxError		Error
  hi link rexxKeyword		Statement
  hi link rexxString		String
  hi link rexxComment		Comment
  hi link rexxSpecial		SpecialChar
  hi link rexxTodo		Todo
endif

let b:current_syntax = "rexx"

" vim: ts=8