xref: /vim-8.2.3635/runtime/syntax/lscript.vim (revision 89bcfda6)
1071d4279SBram Moolenaar" Vim syntax file
2071d4279SBram Moolenaar" Language:	LotusScript
3071d4279SBram Moolenaar" Maintainer:	Taryn East ([email protected])
4071d4279SBram Moolenaar" Last Change:	2003 May 11
5071d4279SBram Moolenaar
6071d4279SBram Moolenaar" This is a rough  amalgamation of the visual basic syntax file, and the UltraEdit
7071d4279SBram Moolenaar" and Textpad syntax highlighters.
8071d4279SBram Moolenaar" It's not too brilliant given that a) I've never written a syntax.vim file before
9071d4279SBram Moolenaar" and b) I'm not so crash hot at LotusScript either. If you see any problems
10071d4279SBram Moolenaar" feel free to email me with them.
11071d4279SBram Moolenaar
12*89bcfda6SBram Moolenaar" quit when a syntax file was already loaded
13*89bcfda6SBram Moolenaarif exists("b:current_syntax")
14071d4279SBram Moolenaar  finish
15071d4279SBram Moolenaarendif
16071d4279SBram Moolenaar
17071d4279SBram Moolenaar" LotusScript is case insensitive
18071d4279SBram Moolenaarsyn case ignore
19071d4279SBram Moolenaar
20071d4279SBram Moolenaar" These are Notes thingies that had an equivalent in the vb highlighter
21071d4279SBram Moolenaar" or I was already familiar with them
22071d4279SBram Moolenaarsyn keyword lscriptStatement ActivateApp As And Base Beep Call Case ChDir ChDrive Class
23071d4279SBram Moolenaarsyn keyword lscriptStatement Const Dim Declare DefCur DefDbl DefInt DefLng DefSng DefStr
24071d4279SBram Moolenaarsyn keyword lscriptStatement DefVar Do Else %Else ElseIf %ElseIf End %End Erase Event Exit
25071d4279SBram Moolenaarsyn keyword lscriptStatement Explicit FileCopy FALSE For ForAll Function Get GoTo GoSub
26071d4279SBram Moolenaarsyn keyword lscriptStatement If %If In Is Kill Let List Lock Loop MkDir
27071d4279SBram Moolenaarsyn keyword lscriptStatement Name Next New NoCase NoPitch Not Nothing NULL
28071d4279SBram Moolenaarsyn keyword lscriptStatement On Option Or PI Pitch Preserve Private Public
29071d4279SBram Moolenaarsyn keyword lscriptStatement Property Public Put
30071d4279SBram Moolenaarsyn keyword lscriptStatement Randomize ReDim Reset Resume Return RmDir
31071d4279SBram Moolenaarsyn keyword lscriptStatement Select SendKeys SetFileAttr Set Static Sub Then To TRUE
32071d4279SBram Moolenaarsyn keyword lscriptStatement Type Unlock Until While WEnd With Write XOr
33071d4279SBram Moolenaar
34071d4279SBram Moolenaarsyn keyword lscriptDatatype Array Currency Double Integer Long Single String String$ Variant
35071d4279SBram Moolenaar
36071d4279SBram Moolenaarsyn keyword lscriptNotesType Field Button Navigator
37071d4279SBram Moolenaarsyn keyword lscriptNotesType NotesACL NotesACLEntry NotesAgent NotesDatabase NotesDateRange
38071d4279SBram Moolenaarsyn keyword lscriptNotesType NotesDateTime NotesDbDirectory NotesDocument
39071d4279SBram Moolenaarsyn keyword lscriptNotesType NotesDocumentCollection NotesEmbeddedObject NotesForm
40071d4279SBram Moolenaarsyn keyword lscriptNotesType NotesInternational NotesItem NotesLog NotesName NotesNewsLetter
41071d4279SBram Moolenaarsyn keyword lscriptNotesType NotesMIMEEntry NotesOutline NotesOutlineEntry NotesRegistration
42071d4279SBram Moolenaarsyn keyword lscriptNotesType NotesReplication NotesRichTextItem NotesRichTextParagraphStyle
43071d4279SBram Moolenaarsyn keyword lscriptNotesType NotesRichTextStyle NotesRichTextTab
44071d4279SBram Moolenaarsyn keyword lscriptNotesType NotesSession NotesTimer NotesView NotesViewColumn NotesViewEntry
45071d4279SBram Moolenaarsyn keyword lscriptNotesType NotesViewEntryCollection NotesViewNavigator NotesUIDatabase
46071d4279SBram Moolenaarsyn keyword lscriptNotesType NotesUIDocument NotesUIView NotesUIWorkspace
47071d4279SBram Moolenaar
48071d4279SBram Moolenaarsyn keyword lscriptNotesConst ACLLEVEL_AUTHOR ACLLEVEL_DEPOSITOR ACLLEVEL_DESIGNER
49071d4279SBram Moolenaarsyn keyword lscriptNotesConst ACLLEVEL_EDITOR ACLLEVEL_MANAGER ACLLEVEL_NOACCESS
50071d4279SBram Moolenaarsyn keyword lscriptNotesConst ACLLEVEL_READER ACLTYPE_MIXED_GROUP ACLTYPE_PERSON
51071d4279SBram Moolenaarsyn keyword lscriptNotesConst ACLTYPE_PERSON_GROUP ACLTYPE_SERVER ACLTYPE_SERVER_GROUP
52071d4279SBram Moolenaarsyn keyword lscriptNotesConst ACLTYPE_UNSPECIFIED ACTIONCD ALIGN_CENTER
53071d4279SBram Moolenaarsyn keyword lscriptNotesConst ALIGN_FULL ALIGN_LEFT ALIGN_NOWRAP ALIGN_RIGHT
54071d4279SBram Moolenaarsyn keyword lscriptNotesConst ASSISTANTINFO ATTACHMENT AUTHORS COLOR_BLACK
55071d4279SBram Moolenaarsyn keyword lscriptNotesConst COLOR_BLUE COLOR_CYAN COLOR_DARK_BLUE COLOR_DARK_CYAN
56071d4279SBram Moolenaarsyn keyword lscriptNotesConst COLOR_DARK_GREEN COLOR_DARK_MAGENTA COLOR_DARK_RED
57071d4279SBram Moolenaarsyn keyword lscriptNotesConst COLOR_DARK_YELLOW COLOR_GRAY COLOR_GREEN COLOR_LIGHT_GRAY
58071d4279SBram Moolenaarsyn keyword lscriptNotesConst COLOR_MAGENTA COLOR_RED COLOR_WHITE COLOR_YELLOW
59071d4279SBram Moolenaarsyn keyword lscriptNotesConst DATABASE DATETIMES DB_REPLICATION_PRIORITY_HIGH
60071d4279SBram Moolenaarsyn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_LOW DB_REPLICATION_PRIORITY_MED
61071d4279SBram Moolenaarsyn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_NOTSET EFFECTS_EMBOSS
62071d4279SBram Moolenaarsyn keyword lscriptNotesConst EFFECTS_EXTRUDE EFFECTS_NONE EFFECTS_SHADOW
63071d4279SBram Moolenaarsyn keyword lscriptNotesConst EFFECTS_SUBSCRIPT EFFECTS_SUPERSCRIPT EMBED_ATTACHMENT
64071d4279SBram Moolenaarsyn keyword lscriptNotesConst EMBED_OBJECT EMBED_OBJECTLINK EMBEDDEDOBJECT ERRORITEM
65071d4279SBram Moolenaarsyn keyword lscriptNotesConst EV_ALARM EV_COMM EV_MAIL EV_MISC EV_REPLICA EV_RESOURCE
66071d4279SBram Moolenaarsyn keyword lscriptNotesConst EV_SECURITY EV_SERVER EV_UNKNOWN EV_UPDATE FONT_COURIER
67071d4279SBram Moolenaarsyn keyword lscriptNotesConst FONT_HELV FONT_ROMAN FORMULA FT_DATABASE FT_DATE_ASC
68071d4279SBram Moolenaarsyn keyword lscriptNotesConst FT_DATE_DES FT_FILESYSTEM FT_FUZZY FT_SCORES FT_STEMS
69071d4279SBram Moolenaarsyn keyword lscriptNotesConst FT_THESAURUS HTML ICON ID_CERTIFIER ID_FLAT
70071d4279SBram Moolenaarsyn keyword lscriptNotesConst ID_HIERARCHICAL LSOBJECT MIME_PART NAMES NOTESLINKS
71071d4279SBram Moolenaarsyn keyword lscriptNotesConst NOTEREFS NOTES_DESKTOP_CLIENT NOTES_FULL_CLIENT
72071d4279SBram Moolenaarsyn keyword lscriptNotesConst NOTES_LIMITED_CLIENT NUMBERS OTHEROBJECT
73071d4279SBram Moolenaarsyn keyword lscriptNotesConst OUTLINE_CLASS_DATABASE OUTLINE_CLASS_DOCUMENT
74071d4279SBram Moolenaarsyn keyword lscriptNotesConst OUTLINE_CLASS_FOLDER OUTLINE_CLASS_FORM
75071d4279SBram Moolenaarsyn keyword lscriptNotesConst OUTLINE_CLASS_FRAMESET OUTLINE_CLASS_NAVIGATOR
76071d4279SBram Moolenaarsyn keyword lscriptNotesConst OUTLINE_CLASS_PAGE OUTLINE_CLASS_UNKNOWN
77071d4279SBram Moolenaarsyn keyword lscriptNotesConst OUTLINE_CLASS_VIEW OUTLINE_OTHER_FOLDERS_TYPE
78071d4279SBram Moolenaarsyn keyword lscriptNotesConst OUTLINE_OTHER_UNKNOWN_TYPE OUTLINE_OTHER_VIEWS_TYPE
79071d4279SBram Moolenaarsyn keyword lscriptNotesConst OUTLINE_TYPE_ACTION OUTLINE_TYPE_NAMEDELEMENT
80071d4279SBram Moolenaarsyn keyword lscriptNotesConst OUTLINE_TYPE_NOTELINK OUTLINE_TYPE_URL PAGINATE_BEFORE
81071d4279SBram Moolenaarsyn keyword lscriptNotesConst PAGINATE_DEFAULT PAGINATE_KEEP_TOGETHER
82071d4279SBram Moolenaarsyn keyword lscriptNotesConst PAGINATE_KEEP_WITH_NEXT PICKLIST_CUSTOM PICKLIST_NAMES
83071d4279SBram Moolenaarsyn keyword lscriptNotesConst PICKLIST_RESOURCES PICKLIST_ROOMS PROMPT_OK PROMPT_OKCANCELCOMBO
84071d4279SBram Moolenaarsyn keyword lscriptNotesConst PROMPT_OKCANCELEDIT PROMPT_OKCANCELEDITCOMBO PROMPT_OKCANCELLIST
85071d4279SBram Moolenaarsyn keyword lscriptNotesConst PROMPT_OKCANCELLISTMULT PROMPT_PASSWORD PROMPT_YESNO
86071d4279SBram Moolenaarsyn keyword lscriptNotesConst PROMPT_YESNOCANCEL QUERYCD READERS REPLICA_CANDIDATE
87071d4279SBram Moolenaarsyn keyword lscriptNotesConst RICHTEXT RULER_ONE_CENTIMETER RULER_ONE_INCH SEV_FAILURE
88071d4279SBram Moolenaarsyn keyword lscriptNotesConst SEV_FATAL SEV_NORMAL SEV_WARNING1 SEV_WARNING2
89071d4279SBram Moolenaarsyn keyword lscriptNotesConst SIGNATURE SPACING_DOUBLE SPACING_ONE_POINT_50
90071d4279SBram Moolenaarsyn keyword lscriptNotesConst SPACING_SINGLE STYLE_NO_CHANGE TAB_CENTER TAB_DECIMAL
91071d4279SBram Moolenaarsyn keyword lscriptNotesConst TAB_LEFT TAB_RIGHT TARGET_ALL_DOCS TARGET_ALL_DOCS_IN_VIEW
92071d4279SBram Moolenaarsyn keyword lscriptNotesConst TARGET_NEW_DOCS TARGET_NEW_OR_MODIFIED_DOCS TARGET_NONE
93071d4279SBram Moolenaarsyn keyword lscriptNotesConst TARGET_RUN_ONCE TARGET_SELECTED_DOCS TARGET_UNREAD_DOCS_IN_VIEW
94071d4279SBram Moolenaarsyn keyword lscriptNotesConst TEMPLATE TEMPLATE_CANDIDATE TEXT TRIGGER_AFTER_MAIL_DELIVERY
95071d4279SBram Moolenaarsyn keyword lscriptNotesConst TRIGGER_BEFORE_MAIL_DELIVERY TRIGGER_DOC_PASTED
96071d4279SBram Moolenaarsyn keyword lscriptNotesConst TRIGGER_DOC_UPDATE TRIGGER_MANUAL TRIGGER_NONE
97071d4279SBram Moolenaarsyn keyword lscriptNotesConst TRIGGER_SCHEDULED UNAVAILABLE UNKNOWN USERDATA
98071d4279SBram Moolenaarsyn keyword lscriptNotesConst USERID VC_ALIGN_CENTER VC_ALIGN_LEFT VC_ALIGN_RIGHT
99071d4279SBram Moolenaarsyn keyword lscriptNotesConst VC_ATTR_PARENS VC_ATTR_PUNCTUATED VC_ATTR_PERCENT
100071d4279SBram Moolenaarsyn keyword lscriptNotesConst VC_FMT_ALWAYS VC_FMT_CURRENCY VC_FMT_DATE VC_FMT_DATETIME
101071d4279SBram Moolenaarsyn keyword lscriptNotesConst VC_FMT_FIXED VC_FMT_GENERAL VC_FMT_HM VC_FMT_HMS
102071d4279SBram Moolenaarsyn keyword lscriptNotesConst VC_FMT_MD VC_FMT_NEVER VC_FMT_SCIENTIFIC
103071d4279SBram Moolenaarsyn keyword lscriptNotesConst VC_FMT_SOMETIMES VC_FMT_TIME VC_FMT_TODAYTIME VC_FMT_YM
104071d4279SBram Moolenaarsyn keyword lscriptNotesConst VC_FMT_YMD VC_FMT_Y4M VC_FONT_BOLD VC_FONT_ITALIC
105071d4279SBram Moolenaarsyn keyword lscriptNotesConst VC_FONT_STRIKEOUT VC_FONT_UNDERLINE VC_SEP_COMMA
106071d4279SBram Moolenaarsyn keyword lscriptNotesConst VC_SEP_NEWLINE VC_SEP_SEMICOLON VC_SEP_SPACE
107071d4279SBram Moolenaarsyn keyword lscriptNotesConst VIEWMAPDATA VIEWMAPLAYOUT VW_SPACING_DOUBLE
108071d4279SBram Moolenaarsyn keyword lscriptNotesConst VW_SPACING_ONE_POINT_25 VW_SPACING_ONE_POINT_50
109071d4279SBram Moolenaarsyn keyword lscriptNotesConst VW_SPACING_ONE_POINT_75 VW_SPACING_SINGLE
110071d4279SBram Moolenaar
111071d4279SBram Moolenaarsyn keyword lscriptFunction Abs Asc Atn Atn2 ACos ASin
112071d4279SBram Moolenaarsyn keyword lscriptFunction CCur CDat CDbl Chr Chr$ CInt CLng Command Command$
113071d4279SBram Moolenaarsyn keyword lscriptFunction Cos CSng CStr
114071d4279SBram Moolenaarsyn keyword lscriptFunction CurDir CurDir$ CVar Date Date$ DateNumber DateSerial DateValue
115071d4279SBram Moolenaarsyn keyword lscriptFunction Day Dir Dir$ Environ$ Environ EOF Error Error$ Evaluate Exp
116071d4279SBram Moolenaarsyn keyword lscriptFunction FileAttr FileDateTime FileLen Fix Format Format$ FreeFile
117071d4279SBram Moolenaarsyn keyword lscriptFunction GetFileAttr GetThreadInfo Hex Hex$ Hour
118071d4279SBram Moolenaarsyn keyword lscriptFunction IMESetMode IMEStatus Input Input$ InputB InputB$
119071d4279SBram Moolenaarsyn keyword lscriptFunction InputBP InputBP$ InputBox InputBox$ InStr InStrB InStrBP InstrC
120071d4279SBram Moolenaarsyn keyword lscriptFunction IsA IsArray IsDate IsElement IsList IsNumeric
121071d4279SBram Moolenaarsyn keyword lscriptFunction IsObject IsResponse IsScalar IsUnknown LCase LCase$
122071d4279SBram Moolenaarsyn keyword lscriptFunction Left Left$ LeftB LeftB$ LeftC
123071d4279SBram Moolenaarsyn keyword lscriptFunction LeftBP LeftBP$ Len LenB LenBP LenC Loc LOF Log
124071d4279SBram Moolenaarsyn keyword lscriptFunction LSet LTrim LTrim$ MessageBox Mid Mid$ MidB MidB$ MidC
125071d4279SBram Moolenaarsyn keyword lscriptFunction Minute Month Now Oct Oct$ Responses Right Right$
126071d4279SBram Moolenaarsyn keyword lscriptFunction RightB RightB$ RightBP RightBP$ RightC Round Rnd RSet RTrim RTrim$
127071d4279SBram Moolenaarsyn keyword lscriptFunction Second Seek Sgn Shell Sin Sleep Space Space$ Spc Sqr Str Str$
128071d4279SBram Moolenaarsyn keyword lscriptFunction StrConv StrLeft StrleftBack StrRight StrRightBack
129071d4279SBram Moolenaarsyn keyword lscriptFunction StrCompare Tab Tan Time Time$ TimeNumber Timer
130071d4279SBram Moolenaarsyn keyword lscriptFunction TimeValue Trim Trim$ Today TypeName UCase UCase$
131071d4279SBram Moolenaarsyn keyword lscriptFunction UniversalID Val Weekday Year
132071d4279SBram Moolenaar
133071d4279SBram Moolenaarsyn keyword lscriptMethods AppendToTextList ArrayAppend ArrayReplace ArrayGetIndex
134071d4279SBram Moolenaarsyn keyword lscriptMethods Append Bind Close
135071d4279SBram Moolenaar"syn keyword lscriptMethods Contains
136071d4279SBram Moolenaarsyn keyword lscriptMethods CopyToDatabase CopyAllItems Count CurrentDatabase Delete Execute
137071d4279SBram Moolenaarsyn keyword lscriptMethods GetAllDocumentsByKey GetDatabase GetDocumentByKey
138071d4279SBram Moolenaarsyn keyword lscriptMethods GetDocumentByUNID GetFirstDocument GetFirstItem
139071d4279SBram Moolenaarsyn keyword lscriptMethods GetItems GetItemValue GetNthDocument GetView
140071d4279SBram Moolenaarsyn keyword lscriptMethods IsEmpty IsNull %Include Items
141071d4279SBram Moolenaarsyn keyword lscriptMethods Line LBound LoadMsgText Open Print
142071d4279SBram Moolenaarsyn keyword lscriptMethods RaiseEvent ReplaceItemValue Remove RemoveItem Responses
143071d4279SBram Moolenaarsyn keyword lscriptMethods Save Stop UBound UnprocessedDocuments Write
144071d4279SBram Moolenaar
145071d4279SBram Moolenaarsyn keyword lscriptEvents Compare OnError
146071d4279SBram Moolenaar
147071d4279SBram Moolenaar"*************************************************************************************
148071d4279SBram Moolenaar"These are Notes thingies that I'm not sure how to classify as they had no vb equivalent
149071d4279SBram Moolenaar" At a wild guess I'd put them as Functions...
150071d4279SBram Moolenaar" if anyone sees something really out of place... tell me!
151071d4279SBram Moolenaar
152071d4279SBram Moolenaarsyn keyword lscriptFunction Access Alias Any Bin Bin$ Binary ByVal
153071d4279SBram Moolenaarsyn keyword lscriptFunction CodeLock CodeLockCheck CodeUnlock CreateLock
154071d4279SBram Moolenaarsyn keyword lscriptFunction CurDrive CurDrive$ DataType DestroyLock Eqv
155071d4279SBram Moolenaarsyn keyword lscriptFunction Erl Err Fraction From FromFunction FullTrim
156071d4279SBram Moolenaarsyn keyword lscriptFunction Imp Int Lib Like ListTag LMBCS LSServer Me
157071d4279SBram Moolenaarsyn keyword lscriptFunction Mod MsgDescription MsgText Output Published
158071d4279SBram Moolenaarsyn keyword lscriptFunction Random Read Shared Step UChr UChr$ Uni Unicode
159071d4279SBram Moolenaarsyn keyword lscriptFunction Until Use UseLSX UString UString$ Width Yield
160071d4279SBram Moolenaar
161071d4279SBram Moolenaar
162071d4279SBram Moolenaarsyn keyword lscriptTodo contained	TODO
163071d4279SBram Moolenaar
164071d4279SBram Moolenaar"integer number, or floating point number without a dot.
165071d4279SBram Moolenaarsyn match  lscriptNumber		"\<\d\+\>"
166071d4279SBram Moolenaar"floating point number, with dot
167071d4279SBram Moolenaarsyn match  lscriptNumber		"\<\d\+\.\d*\>"
168071d4279SBram Moolenaar"floating point number, starting with a dot
169071d4279SBram Moolenaarsyn match  lscriptNumber		"\.\d\+\>"
170071d4279SBram Moolenaar
171071d4279SBram Moolenaar" String and Character constants
172071d4279SBram Moolenaarsyn region  lscriptString		start=+"+  end=+"+
173071d4279SBram Moolenaarsyn region  lscriptComment		start="REM" end="$" contains=lscriptTodo
174071d4279SBram Moolenaarsyn region  lscriptComment		start="'"   end="$" contains=lscriptTodo
175071d4279SBram Moolenaarsyn region  lscriptLineNumber	start="^\d" end="\s"
176071d4279SBram Moolenaarsyn match   lscriptTypeSpecifier	"[a-zA-Z0-9][\$%&!#]"ms=s+1
177071d4279SBram Moolenaar
178071d4279SBram Moolenaar" Define the default highlighting.
179*89bcfda6SBram Moolenaar" Only when an item doesn't have highlighting yet
180071d4279SBram Moolenaarcommand -nargs=+ HiLink hi def link <args>
181071d4279SBram Moolenaar
182071d4279SBram Moolenaarhi lscriptNotesType	term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold
183071d4279SBram Moolenaar
184071d4279SBram MoolenaarHiLink lscriptNotesConst	lscriptNotesType
185071d4279SBram MoolenaarHiLink lscriptLineNumber	Comment
186071d4279SBram MoolenaarHiLink lscriptDatatype	Type
187071d4279SBram MoolenaarHiLink lscriptNumber		Number
188071d4279SBram MoolenaarHiLink lscriptError		Error
189071d4279SBram MoolenaarHiLink lscriptStatement	Statement
190071d4279SBram MoolenaarHiLink lscriptString		String
191071d4279SBram MoolenaarHiLink lscriptComment		Comment
192071d4279SBram MoolenaarHiLink lscriptTodo		Todo
193071d4279SBram MoolenaarHiLink lscriptFunction	Identifier
194071d4279SBram MoolenaarHiLink lscriptMethods		PreProc
195071d4279SBram MoolenaarHiLink lscriptEvents		Special
196071d4279SBram MoolenaarHiLink lscriptTypeSpecifier	Type
197071d4279SBram Moolenaar
198071d4279SBram Moolenaardelcommand HiLink
199071d4279SBram Moolenaar
200071d4279SBram Moolenaarlet b:current_syntax = "lscript"
201071d4279SBram Moolenaar
202071d4279SBram Moolenaar" vim: ts=8
203