annotate runtime/syntax/sas.vim @ 6140:cb3218a69c2f v7.4.408

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