1" Vim syntax file 2" Language: LotusScript 3" Maintainer: Taryn East (taryneast@hotmail.com) 4" Last Change: 2003 May 11 5 6" This is a rough amalgamation of the visual basic syntax file, and the UltraEdit 7" and Textpad syntax highlighters. 8" It's not too brilliant given that a) I've never written a syntax.vim file before 9" and b) I'm not so crash hot at LotusScript either. If you see any problems 10" feel free to email me with them. 11 12" For version 5.x: Clear all syntax items 13" For version 6.x: Quit when a syntax file was already loaded 14if version < 600 15 syntax clear 16elseif exists("b:current_syntax") 17 finish 18endif 19 20" LotusScript is case insensitive 21syn case ignore 22 23" These are Notes thingies that had an equivalent in the vb highlighter 24" or I was already familiar with them 25syn keyword lscriptStatement ActivateApp As And Base Beep Call Case ChDir ChDrive Class 26syn keyword lscriptStatement Const Dim Declare DefCur DefDbl DefInt DefLng DefSng DefStr 27syn keyword lscriptStatement DefVar Do Else %Else ElseIf %ElseIf End %End Erase Event Exit 28syn keyword lscriptStatement Explicit FileCopy FALSE For ForAll Function Get GoTo GoSub 29syn keyword lscriptStatement If %If In Is Kill Let List Lock Loop MkDir 30syn keyword lscriptStatement Name Next New NoCase NoPitch Not Nothing NULL 31syn keyword lscriptStatement On Option Or PI Pitch Preserve Private Public 32syn keyword lscriptStatement Property Public Put 33syn keyword lscriptStatement Randomize ReDim Reset Resume Return RmDir 34syn keyword lscriptStatement Select SendKeys SetFileAttr Set Static Sub Then To TRUE 35syn keyword lscriptStatement Type Unlock Until While WEnd With Write XOr 36 37syn keyword lscriptDatatype Array Currency Double Integer Long Single String String$ Variant 38 39syn keyword lscriptNotesType Field Button Navigator 40syn keyword lscriptNotesType NotesACL NotesACLEntry NotesAgent NotesDatabase NotesDateRange 41syn keyword lscriptNotesType NotesDateTime NotesDbDirectory NotesDocument 42syn keyword lscriptNotesType NotesDocumentCollection NotesEmbeddedObject NotesForm 43syn keyword lscriptNotesType NotesInternational NotesItem NotesLog NotesName NotesNewsLetter 44syn keyword lscriptNotesType NotesMIMEEntry NotesOutline NotesOutlineEntry NotesRegistration 45syn keyword lscriptNotesType NotesReplication NotesRichTextItem NotesRichTextParagraphStyle 46syn keyword lscriptNotesType NotesRichTextStyle NotesRichTextTab 47syn keyword lscriptNotesType NotesSession NotesTimer NotesView NotesViewColumn NotesViewEntry 48syn keyword lscriptNotesType NotesViewEntryCollection NotesViewNavigator NotesUIDatabase 49syn keyword lscriptNotesType NotesUIDocument NotesUIView NotesUIWorkspace 50 51syn keyword lscriptNotesConst ACLLEVEL_AUTHOR ACLLEVEL_DEPOSITOR ACLLEVEL_DESIGNER 52syn keyword lscriptNotesConst ACLLEVEL_EDITOR ACLLEVEL_MANAGER ACLLEVEL_NOACCESS 53syn keyword lscriptNotesConst ACLLEVEL_READER ACLTYPE_MIXED_GROUP ACLTYPE_PERSON 54syn keyword lscriptNotesConst ACLTYPE_PERSON_GROUP ACLTYPE_SERVER ACLTYPE_SERVER_GROUP 55syn keyword lscriptNotesConst ACLTYPE_UNSPECIFIED ACTIONCD ALIGN_CENTER 56syn keyword lscriptNotesConst ALIGN_FULL ALIGN_LEFT ALIGN_NOWRAP ALIGN_RIGHT 57syn keyword lscriptNotesConst ASSISTANTINFO ATTACHMENT AUTHORS COLOR_BLACK 58syn keyword lscriptNotesConst COLOR_BLUE COLOR_CYAN COLOR_DARK_BLUE COLOR_DARK_CYAN 59syn keyword lscriptNotesConst COLOR_DARK_GREEN COLOR_DARK_MAGENTA COLOR_DARK_RED 60syn keyword lscriptNotesConst COLOR_DARK_YELLOW COLOR_GRAY COLOR_GREEN COLOR_LIGHT_GRAY 61syn keyword lscriptNotesConst COLOR_MAGENTA COLOR_RED COLOR_WHITE COLOR_YELLOW 62syn keyword lscriptNotesConst DATABASE DATETIMES DB_REPLICATION_PRIORITY_HIGH 63syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_LOW DB_REPLICATION_PRIORITY_MED 64syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_NOTSET EFFECTS_EMBOSS 65syn keyword lscriptNotesConst EFFECTS_EXTRUDE EFFECTS_NONE EFFECTS_SHADOW 66syn keyword lscriptNotesConst EFFECTS_SUBSCRIPT EFFECTS_SUPERSCRIPT EMBED_ATTACHMENT 67syn keyword lscriptNotesConst EMBED_OBJECT EMBED_OBJECTLINK EMBEDDEDOBJECT ERRORITEM 68syn keyword lscriptNotesConst EV_ALARM EV_COMM EV_MAIL EV_MISC EV_REPLICA EV_RESOURCE 69syn keyword lscriptNotesConst EV_SECURITY EV_SERVER EV_UNKNOWN EV_UPDATE FONT_COURIER 70syn keyword lscriptNotesConst FONT_HELV FONT_ROMAN FORMULA FT_DATABASE FT_DATE_ASC 71syn keyword lscriptNotesConst FT_DATE_DES FT_FILESYSTEM FT_FUZZY FT_SCORES FT_STEMS 72syn keyword lscriptNotesConst FT_THESAURUS HTML ICON ID_CERTIFIER ID_FLAT 73syn keyword lscriptNotesConst ID_HIERARCHICAL LSOBJECT MIME_PART NAMES NOTESLINKS 74syn keyword lscriptNotesConst NOTEREFS NOTES_DESKTOP_CLIENT NOTES_FULL_CLIENT 75syn keyword lscriptNotesConst NOTES_LIMITED_CLIENT NUMBERS OTHEROBJECT 76syn keyword lscriptNotesConst OUTLINE_CLASS_DATABASE OUTLINE_CLASS_DOCUMENT 77syn keyword lscriptNotesConst OUTLINE_CLASS_FOLDER OUTLINE_CLASS_FORM 78syn keyword lscriptNotesConst OUTLINE_CLASS_FRAMESET OUTLINE_CLASS_NAVIGATOR 79syn keyword lscriptNotesConst OUTLINE_CLASS_PAGE OUTLINE_CLASS_UNKNOWN 80syn keyword lscriptNotesConst OUTLINE_CLASS_VIEW OUTLINE_OTHER_FOLDERS_TYPE 81syn keyword lscriptNotesConst OUTLINE_OTHER_UNKNOWN_TYPE OUTLINE_OTHER_VIEWS_TYPE 82syn keyword lscriptNotesConst OUTLINE_TYPE_ACTION OUTLINE_TYPE_NAMEDELEMENT 83syn keyword lscriptNotesConst OUTLINE_TYPE_NOTELINK OUTLINE_TYPE_URL PAGINATE_BEFORE 84syn keyword lscriptNotesConst PAGINATE_DEFAULT PAGINATE_KEEP_TOGETHER 85syn keyword lscriptNotesConst PAGINATE_KEEP_WITH_NEXT PICKLIST_CUSTOM PICKLIST_NAMES 86syn keyword lscriptNotesConst PICKLIST_RESOURCES PICKLIST_ROOMS PROMPT_OK PROMPT_OKCANCELCOMBO 87syn keyword lscriptNotesConst PROMPT_OKCANCELEDIT PROMPT_OKCANCELEDITCOMBO PROMPT_OKCANCELLIST 88syn keyword lscriptNotesConst PROMPT_OKCANCELLISTMULT PROMPT_PASSWORD PROMPT_YESNO 89syn keyword lscriptNotesConst PROMPT_YESNOCANCEL QUERYCD READERS REPLICA_CANDIDATE 90syn keyword lscriptNotesConst RICHTEXT RULER_ONE_CENTIMETER RULER_ONE_INCH SEV_FAILURE 91syn keyword lscriptNotesConst SEV_FATAL SEV_NORMAL SEV_WARNING1 SEV_WARNING2 92syn keyword lscriptNotesConst SIGNATURE SPACING_DOUBLE SPACING_ONE_POINT_50 93syn keyword lscriptNotesConst SPACING_SINGLE STYLE_NO_CHANGE TAB_CENTER TAB_DECIMAL 94syn keyword lscriptNotesConst TAB_LEFT TAB_RIGHT TARGET_ALL_DOCS TARGET_ALL_DOCS_IN_VIEW 95syn keyword lscriptNotesConst TARGET_NEW_DOCS TARGET_NEW_OR_MODIFIED_DOCS TARGET_NONE 96syn keyword lscriptNotesConst TARGET_RUN_ONCE TARGET_SELECTED_DOCS TARGET_UNREAD_DOCS_IN_VIEW 97syn keyword lscriptNotesConst TEMPLATE TEMPLATE_CANDIDATE TEXT TRIGGER_AFTER_MAIL_DELIVERY 98syn keyword lscriptNotesConst TRIGGER_BEFORE_MAIL_DELIVERY TRIGGER_DOC_PASTED 99syn keyword lscriptNotesConst TRIGGER_DOC_UPDATE TRIGGER_MANUAL TRIGGER_NONE 100syn keyword lscriptNotesConst TRIGGER_SCHEDULED UNAVAILABLE UNKNOWN USERDATA 101syn keyword lscriptNotesConst USERID VC_ALIGN_CENTER VC_ALIGN_LEFT VC_ALIGN_RIGHT 102syn keyword lscriptNotesConst VC_ATTR_PARENS VC_ATTR_PUNCTUATED VC_ATTR_PERCENT 103syn keyword lscriptNotesConst VC_FMT_ALWAYS VC_FMT_CURRENCY VC_FMT_DATE VC_FMT_DATETIME 104syn keyword lscriptNotesConst VC_FMT_FIXED VC_FMT_GENERAL VC_FMT_HM VC_FMT_HMS 105syn keyword lscriptNotesConst VC_FMT_MD VC_FMT_NEVER VC_FMT_SCIENTIFIC 106syn keyword lscriptNotesConst VC_FMT_SOMETIMES VC_FMT_TIME VC_FMT_TODAYTIME VC_FMT_YM 107syn keyword lscriptNotesConst VC_FMT_YMD VC_FMT_Y4M VC_FONT_BOLD VC_FONT_ITALIC 108syn keyword lscriptNotesConst VC_FONT_STRIKEOUT VC_FONT_UNDERLINE VC_SEP_COMMA 109syn keyword lscriptNotesConst VC_SEP_NEWLINE VC_SEP_SEMICOLON VC_SEP_SPACE 110syn keyword lscriptNotesConst VIEWMAPDATA VIEWMAPLAYOUT VW_SPACING_DOUBLE 111syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_25 VW_SPACING_ONE_POINT_50 112syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_75 VW_SPACING_SINGLE 113 114syn keyword lscriptFunction Abs Asc Atn Atn2 ACos ASin 115syn keyword lscriptFunction CCur CDat CDbl Chr Chr$ CInt CLng Command Command$ 116syn keyword lscriptFunction Cos CSng CStr 117syn keyword lscriptFunction CurDir CurDir$ CVar Date Date$ DateNumber DateSerial DateValue 118syn keyword lscriptFunction Day Dir Dir$ Environ$ Environ EOF Error Error$ Evaluate Exp 119syn keyword lscriptFunction FileAttr FileDateTime FileLen Fix Format Format$ FreeFile 120syn keyword lscriptFunction GetFileAttr GetThreadInfo Hex Hex$ Hour 121syn keyword lscriptFunction IMESetMode IMEStatus Input Input$ InputB InputB$ 122syn keyword lscriptFunction InputBP InputBP$ InputBox InputBox$ InStr InStrB InStrBP InstrC 123syn keyword lscriptFunction IsA IsArray IsDate IsElement IsList IsNumeric 124syn keyword lscriptFunction IsObject IsResponse IsScalar IsUnknown LCase LCase$ 125syn keyword lscriptFunction Left Left$ LeftB LeftB$ LeftC 126syn keyword lscriptFunction LeftBP LeftBP$ Len LenB LenBP LenC Loc LOF Log 127syn keyword lscriptFunction LSet LTrim LTrim$ MessageBox Mid Mid$ MidB MidB$ MidC 128syn keyword lscriptFunction Minute Month Now Oct Oct$ Responses Right Right$ 129syn keyword lscriptFunction RightB RightB$ RightBP RightBP$ RightC Round Rnd RSet RTrim RTrim$ 130syn keyword lscriptFunction Second Seek Sgn Shell Sin Sleep Space Space$ Spc Sqr Str Str$ 131syn keyword lscriptFunction StrConv StrLeft StrleftBack StrRight StrRightBack 132syn keyword lscriptFunction StrCompare Tab Tan Time Time$ TimeNumber Timer 133syn keyword lscriptFunction TimeValue Trim Trim$ Today TypeName UCase UCase$ 134syn keyword lscriptFunction UniversalID Val Weekday Year 135 136syn keyword lscriptMethods AppendToTextList ArrayAppend ArrayReplace ArrayGetIndex 137syn keyword lscriptMethods Append Bind Close 138"syn keyword lscriptMethods Contains 139syn keyword lscriptMethods CopyToDatabase CopyAllItems Count CurrentDatabase Delete Execute 140syn keyword lscriptMethods GetAllDocumentsByKey GetDatabase GetDocumentByKey 141syn keyword lscriptMethods GetDocumentByUNID GetFirstDocument GetFirstItem 142syn keyword lscriptMethods GetItems GetItemValue GetNthDocument GetView 143syn keyword lscriptMethods IsEmpty IsNull %Include Items 144syn keyword lscriptMethods Line LBound LoadMsgText Open Print 145syn keyword lscriptMethods RaiseEvent ReplaceItemValue Remove RemoveItem Responses 146syn keyword lscriptMethods Save Stop UBound UnprocessedDocuments Write 147 148syn keyword lscriptEvents Compare OnError 149 150"************************************************************************************* 151"These are Notes thingies that I'm not sure how to classify as they had no vb equivalent 152" At a wild guess I'd put them as Functions... 153" if anyone sees something really out of place... tell me! 154 155syn keyword lscriptFunction Access Alias Any Bin Bin$ Binary ByVal 156syn keyword lscriptFunction CodeLock CodeLockCheck CodeUnlock CreateLock 157syn keyword lscriptFunction CurDrive CurDrive$ DataType DestroyLock Eqv 158syn keyword lscriptFunction Erl Err Fraction From FromFunction FullTrim 159syn keyword lscriptFunction Imp Int Lib Like ListTag LMBCS LSServer Me 160syn keyword lscriptFunction Mod MsgDescription MsgText Output Published 161syn keyword lscriptFunction Random Read Shared Step UChr UChr$ Uni Unicode 162syn keyword lscriptFunction Until Use UseLSX UString UString$ Width Yield 163 164 165syn keyword lscriptTodo contained TODO 166 167"integer number, or floating point number without a dot. 168syn match lscriptNumber "\<\d\+\>" 169"floating point number, with dot 170syn match lscriptNumber "\<\d\+\.\d*\>" 171"floating point number, starting with a dot 172syn match lscriptNumber "\.\d\+\>" 173 174" String and Character constants 175syn region lscriptString start=+"+ end=+"+ 176syn region lscriptComment start="REM" end="$" contains=lscriptTodo 177syn region lscriptComment start="'" end="$" contains=lscriptTodo 178syn region lscriptLineNumber start="^\d" end="\s" 179syn match lscriptTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 180 181" Define the default highlighting. 182" For version 5.7 and earlier: only when not done already 183" For version 5.8 and later: only when an item doesn't have highlighting yet 184if version >= 508 || !exists("did_lscript_syntax_inits") 185 if version < 508 186 let did_lscript_syntax_inits = 1 187 command -nargs=+ HiLink hi link <args> 188 else 189 command -nargs=+ HiLink hi def link <args> 190 endif 191 192 hi lscriptNotesType term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold 193 194 HiLink lscriptNotesConst lscriptNotesType 195 HiLink lscriptLineNumber Comment 196 HiLink lscriptDatatype Type 197 HiLink lscriptNumber Number 198 HiLink lscriptError Error 199 HiLink lscriptStatement Statement 200 HiLink lscriptString String 201 HiLink lscriptComment Comment 202 HiLink lscriptTodo Todo 203 HiLink lscriptFunction Identifier 204 HiLink lscriptMethods PreProc 205 HiLink lscriptEvents Special 206 HiLink lscriptTypeSpecifier Type 207 208 delcommand HiLink 209endif 210 211let b:current_syntax = "lscript" 212 213" vim: ts=8 214