annotate runtime/syntax/sas.vim @ 2688:f016c3708ae3 v7.3.106

updated for version 7.3.106 Problem: When 'cursorbind' is set another window may scroll unexpectedly when 'scrollbind' is also set. (Xavier Wang) Solution: Don't call update_topline() if 'scrollbind' is set.
author Bram Moolenaar <bram@vim.org>
date Sat, 22 Jan 2011 21:05:07 +0100
parents f4f8014d516e
children 3482d151136b
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: SAS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: James Kidd <james.kidd@covance.com>
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
4 " Last Change: 18 Jul 2008 by Paulo Tanimoto <ptanimoto@gmail.com>
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
5 " Fixed comments with * taking multiple lines.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
6 " Fixed highlighting of macro keywords.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
7 " Added words to cases that didn't fit anywhere.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
8 " 02 Jun 2003
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Added highlighting for additional keywords and such;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " Attempted to match SAS default syntax colors;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Changed syncing so it doesn't lose colors on large blocks;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Much thanks to Bob Heckel for knowledgeable tweaking.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn region sasString start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn region sasString start=+'+ skip=+\\\\\|\\"+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Want region from 'cards;' to ';' to be captured (Bob Heckel)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn region sasCards start="^\s*CARDS.*" end="^\s*;\s*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn region sasCards start="^\s*DATALINES.*" end="^\s*;\s*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match sasNumber "-\=\<\d*\.\=[0-9_]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
32 " Block comment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn region sasComment start="/\*" end="\*/" contains=sasTodo
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
34
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Ignore misleading //JCL SYNTAX... (Bob Heckel)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region sasComment start="[^/][^/]/\*" end="\*/" contains=sasTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
38 " Previous code for comments was written by Bob Heckel
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
39 " Comments with * may take multiple lines (Paulo Tanimoto)
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
40 syn region sasComment start=";\s*\*"hs=s+1 end=";" contains=sasTodo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
42 " Comments with * starting after a semicolon (Paulo Tanimoto)
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
43 syn region sasComment start="^\s*\*" end=";" contains=sasTodo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " This line defines macro variables in code. HiLink at end of file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " defines the color scheme. Begin region with ampersand and end with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " any non-word character offset by -1; put ampersand in the skip list
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " just in case it is used to concatenate macro variable values.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Thanks to ronald höllwarth for this fix to an intra-versioning
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " problem with this little feature
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn region sasMacroVar start="\&" skip="[_&]" end="\W"he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 else " for the older Vim's just do it their way ...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn region sasMacroVar start="&" skip="[_&]" end="\W"he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " I dont think specific PROCs need to be listed if use this line (Bob Heckel).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match sasProc "^\s*PROC \w\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword sasStep RUN QUIT DATA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " Base SAS Procs - version 8.1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword sasConditional DO ELSE END IF THEN UNTIL WHILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword sasStatement ABORT ARRAY ATTRIB BY CALL CARDS CARDS4 CATNAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword sasStatement CONTINUE DATALINES DATALINES4 DELETE DISPLAY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword sasStatement DM DROP ENDSAS ERROR FILE FILENAME FOOTNOTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword sasStatement FORMAT GOTO INFILE INFORMAT INPUT KEEP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword sasStatement LABEL LEAVE LENGTH LIBNAME LINK LIST LOSTCARD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword sasStatement MERGE MISSING MODIFY OPTIONS OUTPUT PAGE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword sasStatement PUT REDIRECT REMOVE RENAME REPLACE RETAIN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword sasStatement RETURN SELECT SET SKIP STARTSAS STOP TITLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword sasStatement UPDATE WAITSAS WHERE WINDOW X SYSTASK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Keywords that are used in Proc SQL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " I left them as statements because SAS's enhanced editor highlights
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 " them the same as normal statements used in data steps (Jim Kidd)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword sasStatement ADD AND ALTER AS CASCADE CHECK CREATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword sasStatement DELETE DESCRIBE DISTINCT DROP FOREIGN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword sasStatement FROM GROUP HAVING INDEX INSERT INTO IN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword sasStatement KEY LIKE MESSAGE MODIFY MSGTYPE NOT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword sasStatement NULL ON OR ORDER PRIMARY REFERENCES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn keyword sasStatement RESET RESTRICT SELECT SET TABLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn keyword sasStatement UNIQUE UPDATE VALIDATE VIEW WHERE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
91 " Match declarations have to appear one per line (Paulo Tanimoto)
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
92 syn match sasStatement "FOOTNOTE\d"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
93 syn match sasStatement "TITLE\d"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
95 " Match declarations have to appear one per line (Paulo Tanimoto)
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
96 syn match sasMacro "%BQUOTE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
97 syn match sasMacro "%NRBQUOTE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
98 syn match sasMacro "%CMPRES"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
99 syn match sasMacro "%QCMPRES"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
100 syn match sasMacro "%COMPSTOR"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
101 syn match sasMacro "%DATATYP"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
102 syn match sasMacro "%DISPLAY"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
103 syn match sasMacro "%DO"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
104 syn match sasMacro "%ELSE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
105 syn match sasMacro "%END"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
106 syn match sasMacro "%EVAL"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
107 syn match sasMacro "%GLOBAL"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
108 syn match sasMacro "%GOTO"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
109 syn match sasMacro "%IF"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
110 syn match sasMacro "%INDEX"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
111 syn match sasMacro "%INPUT"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
112 syn match sasMacro "%KEYDEF"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
113 syn match sasMacro "%LABEL"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
114 syn match sasMacro "%LEFT"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
115 syn match sasMacro "%LENGTH"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
116 syn match sasMacro "%LET"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
117 syn match sasMacro "%LOCAL"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
118 syn match sasMacro "%LOWCASE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
119 syn match sasMacro "%MACRO"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
120 syn match sasMacro "%MEND"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
121 syn match sasMacro "%NRBQUOTE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
122 syn match sasMacro "%NRQUOTE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
123 syn match sasMacro "%NRSTR"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
124 syn match sasMacro "%PUT"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
125 syn match sasMacro "%QCMPRES"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
126 syn match sasMacro "%QLEFT"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
127 syn match sasMacro "%QLOWCASE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
128 syn match sasMacro "%QSCAN"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
129 syn match sasMacro "%QSUBSTR"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
130 syn match sasMacro "%QSYSFUNC"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
131 syn match sasMacro "%QTRIM"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
132 syn match sasMacro "%QUOTE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
133 syn match sasMacro "%QUPCASE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
134 syn match sasMacro "%SCAN"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
135 syn match sasMacro "%STR"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
136 syn match sasMacro "%SUBSTR"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
137 syn match sasMacro "%SUPERQ"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
138 syn match sasMacro "%SYSCALL"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
139 syn match sasMacro "%SYSEVALF"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
140 syn match sasMacro "%SYSEXEC"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
141 syn match sasMacro "%SYSFUNC"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
142 syn match sasMacro "%SYSGET"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
143 syn match sasMacro "%SYSLPUT"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
144 syn match sasMacro "%SYSPROD"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
145 syn match sasMacro "%SYSRC"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
146 syn match sasMacro "%SYSRPUT"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
147 syn match sasMacro "%THEN"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
148 syn match sasMacro "%TO"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
149 syn match sasMacro "%TRIM"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
150 syn match sasMacro "%UNQUOTE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
151 syn match sasMacro "%UNTIL"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
152 syn match sasMacro "%UPCASE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
153 syn match sasMacro "%VERIFY"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
154 syn match sasMacro "%WHILE"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
155 syn match sasMacro "%WINDOW"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 " SAS Functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 syn keyword sasFunction ABS ADDR AIRY ARCOS ARSIN ATAN ATTRC ATTRN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 syn keyword sasFunction BAND BETAINV BLSHIFT BNOT BOR BRSHIFT BXOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 syn keyword sasFunction BYTE CDF CEIL CEXIST CINV CLOSE CNONCT COLLATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 syn keyword sasFunction COMPBL COMPOUND COMPRESS COS COSH CSS CUROBS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 syn keyword sasFunction CV DACCDB DACCDBSL DACCSL DACCSYD DACCTAB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 syn keyword sasFunction DAIRY DATE DATEJUL DATEPART DATETIME DAY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 syn keyword sasFunction DCLOSE DEPDB DEPDBSL DEPDBSL DEPSL DEPSL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 syn keyword sasFunction DEPSYD DEPSYD DEPTAB DEPTAB DEQUOTE DHMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 syn keyword sasFunction DIF DIGAMMA DIM DINFO DNUM DOPEN DOPTNAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 syn keyword sasFunction DOPTNUM DREAD DROPNOTE DSNAME ERF ERFC EXIST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 syn keyword sasFunction EXP FAPPEND FCLOSE FCOL FDELETE FETCH FETCHOBS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 syn keyword sasFunction FEXIST FGET FILEEXIST FILENAME FILEREF FINFO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 syn keyword sasFunction FINV FIPNAME FIPNAMEL FIPSTATE FLOOR FNONCT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 syn keyword sasFunction FNOTE FOPEN FOPTNAME FOPTNUM FPOINT FPOS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 syn keyword sasFunction FPUT FREAD FREWIND FRLEN FSEP FUZZ FWRITE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 syn keyword sasFunction GAMINV GAMMA GETOPTION GETVARC GETVARN HBOUND
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 syn keyword sasFunction HMS HOSTHELP HOUR IBESSEL INDEX INDEXC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 syn keyword sasFunction INDEXW INPUT INPUTC INPUTN INT INTCK INTNX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 syn keyword sasFunction INTRR IRR JBESSEL JULDATE KURTOSIS LAG LBOUND
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 syn keyword sasFunction LEFT LENGTH LGAMMA LIBNAME LIBREF LOG LOG10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 syn keyword sasFunction LOG2 LOGPDF LOGPMF LOGSDF LOWCASE MAX MDY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 syn keyword sasFunction MEAN MIN MINUTE MOD MONTH MOPEN MORT N
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 syn keyword sasFunction NETPV NMISS NORMAL NOTE NPV OPEN ORDINAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 syn keyword sasFunction PATHNAME PDF PEEK PEEKC PMF POINT POISSON POKE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 syn keyword sasFunction PROBBETA PROBBNML PROBCHI PROBF PROBGAM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 syn keyword sasFunction PROBHYPR PROBIT PROBNEGB PROBNORM PROBT PUT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 syn keyword sasFunction PUTC PUTN QTR QUOTE RANBIN RANCAU RANEXP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 syn keyword sasFunction RANGAM RANGE RANK RANNOR RANPOI RANTBL RANTRI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 syn keyword sasFunction RANUNI REPEAT RESOLVE REVERSE REWIND RIGHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 syn keyword sasFunction ROUND SAVING SCAN SDF SECOND SIGN SIN SINH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 syn keyword sasFunction SKEWNESS SOUNDEX SPEDIS SQRT STD STDERR STFIPS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 syn keyword sasFunction STNAME STNAMEL SUBSTR SUM SYMGET SYSGET SYSMSG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 syn keyword sasFunction SYSPROD SYSRC SYSTEM TAN TANH TIME TIMEPART
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 syn keyword sasFunction TINV TNONCT TODAY TRANSLATE TRANWRD TRIGAMMA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 syn keyword sasFunction TRIM TRIMN TRUNC UNIFORM UPCASE USS VAR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 syn keyword sasFunction VARFMT VARINFMT VARLABEL VARLEN VARNAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 syn keyword sasFunction VARNUM VARRAY VARRAYX VARTYPE VERIFY VFORMAT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 syn keyword sasFunction VFORMATD VFORMATDX VFORMATN VFORMATNX VFORMATW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 syn keyword sasFunction VFORMATWX VFORMATX VINARRAY VINARRAYX VINFORMAT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 syn keyword sasFunction VINFORMATD VINFORMATDX VINFORMATN VINFORMATNX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 syn keyword sasFunction VINFORMATW VINFORMATWX VINFORMATX VLABEL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 syn keyword sasFunction VLABELX VLENGTH VLENGTHX VNAME VNAMEX VTYPE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 syn keyword sasFunction VTYPEX WEEKDAY YEAR YYQ ZIPFIPS ZIPNAME ZIPNAMEL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 syn keyword sasFunction ZIPSTATE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 " Handy settings for using vim with log files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 syn keyword sasLogMsg NOTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 syn keyword sasWarnMsg WARNING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 syn keyword sasErrMsg ERROR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 " Always contained in a comment (Bob Heckel)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 syn keyword sasTodo TODO TBD FIXME contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 " These don't fit anywhere else (Bob Heckel).
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
213 " Added others that were missing.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
214 syn match sasUnderscore "_ALL_"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
215 syn match sasUnderscore "_AUTOMATIC_"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
216 syn match sasUnderscore "_CHARACTER_"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 syn match sasUnderscore "_INFILE_"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 syn match sasUnderscore "_N_"
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
219 syn match sasUnderscore "_NAME_"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
220 syn match sasUnderscore "_NULL_"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 syn match sasUnderscore "_NUMERIC_"
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
222 syn match sasUnderscore "_USER_"
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 7
diff changeset
223 syn match sasUnderscore "_WEBOUT_"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 " End of SAS Functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 " 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
230
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 if version >= 508 || !exists("did_sas_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 let did_sas_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 " Default sas enhanced editor color syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 hi sComment term=bold cterm=NONE ctermfg=Green ctermbg=Black gui=NONE guifg=DarkGreen guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 hi sCard term=bold cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Black guibg=LightYellow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 hi sDate_Time term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 hi sKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 hi sFmtInfmt term=NONE cterm=NONE ctermfg=LightGreen ctermbg=Black gui=NONE guifg=SeaGreen guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 hi sString term=NONE cterm=NONE ctermfg=Magenta ctermbg=Black gui=NONE guifg=Purple guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 hi sText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 hi sNumber term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 hi sProc term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 hi sSection term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 hi mDefine term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 hi mKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 hi mReference term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Blue guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 hi mSection term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 hi mText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 " Colors that closely match SAS log colors for default color scheme
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 hi lError term=NONE cterm=NONE ctermfg=Red ctermbg=Black gui=none guifg=Red guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 hi lWarning term=NONE cterm=NONE ctermfg=Green ctermbg=Black gui=none guifg=Green guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 hi lNote term=NONE cterm=NONE ctermfg=Cyan ctermbg=Black gui=none guifg=Blue guibg=White
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 " Special hilighting for the SAS proc section
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 HiLink sasComment sComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 HiLink sasConditional sKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 HiLink sasStep sSection
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 HiLink sasFunction sKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 HiLink sasMacro mKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 HiLink sasMacroVar NonText
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 HiLink sasNumber sNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 HiLink sasStatement sKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 HiLink sasString sString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 HiLink sasProc sProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 " (Bob Heckel)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 HiLink sasTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 HiLink sasErrMsg lError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 HiLink sasWarnMsg lWarning
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278 HiLink sasLogMsg lNote
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279 HiLink sasCards sCard
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280 " (Bob Heckel)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 HiLink sasUnderscore PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 " Syncronize from beginning to keep large blocks from losing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286 " syntax coloring while moving through code.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 syn sync fromstart
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289 let b:current_syntax = "sas"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291 " vim: ts=8