" Vim syntax file " Language: Netcool Probe Properties File " Maintainer: Scott R. Keszler " Info: $Id$ " URL: http://srkconsulting.com/netcool_vim " Anon SVN: $HeadURL$ " Release Coordinator: Scott R. Keszler " ---------------------------------------------------------------------------- " Defined properties for the following probes: " " Common probe properties " mttrapd " syslog " Nokia NMS100 " Nokia NMS2000 " Nortel Magellan NMS " Microsoft Operations Manager " Sun Management Center " Remove any old syntax stuff that was loaded (5.x) or quit when a syntax file " was already loaded (6.x). if version < 600 syntax clear elseif exists("b:current_syntax") finish endif syn case match setlocal iskeyword+=. " Highlight everything that isn't caught by the rules as errors syn match propsError "^.*$" " For the generic probe-specific property with any possible value. " (The alternative would be to attempt to list every single probe-specific " property; possibly valuable, but too time-consuming to be practical.) " This will remove the error highlighting from any correctly formatted line, " with a separate set of colors for the property and value. Standard " properties, and the probe-specific properties that have been entered, " will have differing colors. The intent is to make the uncoded probe-specific " properties stand out in case of errors like misspelling the property name. syn match propsPropSpecific skipwhite /^\k\+/ nextgroup=propsSpecColonVal,propsSpecColonError syn match propsSpecColonError contained /[^:[:space:]]\+/ syn match propsSpecColonVal contained /:/ skipwhite nextgroup=propsSpecAnyValue,propsSpecError syn match propsSpecError contained /.*/ syn match propsSpecAnyValue contained /\s*\%("[^"]*"\|'[^']*'\|\ctrue\|\cfalse\|-\=\d\+\)/ hi def link propsPropSpecific Statement hi def link propsSpecColonVal Identifier hi def link propsSpecColonError Error hi def link propsSpecAnyValue PreProc hi def link propsSpecError Error " Properties with a string value " Add probe-specific property names here to allow any string as a value syn keyword propsPropString skipwhite nextgroup=propsStringColonVal,propsStringColonError AuthPassword AuthUserName Manager MessageLog MsgTimeLog Name PeerHost PidFile PropsFile RawCaptureFile RecoveryFile RulesFile SAFFileName Server ServerBackup ConfPath MIBDirs MIBFile MIBs PersistentDir BreakCharacters FifoName LogFile QuoteCharacters SyslogPIDFile TimeFormat WhiteSpaces Hostname StreamCaptureFile ChatinString ChatoutString Host InvalidAlarmLogFile AuthUsername AxisConfigFile CertificateTrustStore ForwardeeName Password RegistrationIdRecoveryFile Username AlarmIdFilter AlarmTypeFilter HostNameFilter McPassword Mcpassword McUser Mcuser MoUrlFilter RequestId RuleIdFilter ServerName Servername DomainName syn match propsStringColonError contained /[^:[:space:]]\+/ syn match propsStringColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsStringValue,propsStringError syn match propsStringError contained /.*/ syn region propsStringValue contained matchgroup=propsQuote start=/"/ end=/"/ syn region propsStringValue contained matchgroup=propsQuote start=/'/ end=/'/ hi def link propsPropString Type hi def link propsStringColonError Error hi def link propsStringColonVal Special hi def link propsStringError Error hi def link propsStringValue String " Properties with a value of zero or one " Add probe-specific property names here to allow 0 or 1 as valid values syn keyword propsPropBoolean01 skipwhite nextgroup=propsBool01ColonVal,propsBool01ColonError AutoSAF Buffering MsgDailyLog RawCapture RawCaptureFileAppend RawCaptureFileBackup StoreAndForward NoNameResolution NoNetbiosLookups NonPrintableAsHex QuietOutput CleanStart SendHUP playFile Help DateStreamCapture StreamFlag InvalidAlarmLogging syn match propsBool01ColonError contained /[^:[:space:]]\+/ syn match propsBool01ColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsBool01Value,propsBool01Error syn match propsBool01Error contained /[^01].*/ syn keyword propsBool01Value contained 0 1 hi def link propsPropBoolean01 Type hi def link propsBool01ColonError Error hi def link propsBool01ColonVal Special hi def link propsBool01Error Error hi def link propsBool01Value Boolean " Properties with a value of TRUE or FALSE " Add probe-specific property names here to allow TRUE or FALSE as valid values syn keyword propsPropBooleanTF skipwhite nextgroup=propsBoolTFColonVal,propsBoolTFColonError Props.CheckNames syn match propsBoolTFColonError contained /[^:[:space:]]\+/ syn match propsBoolTFColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsBoolTFValue,propsBoolTFError syn match propsBoolTFError contained /.*/ syn keyword propsBoolTFValue contained TRUE FALSE hi def link propsPropBooleanTF Type hi def link propsBoolTFColonError Error hi def link propsBoolTFColonVal Special hi def link propsBoolTFError Error hi def link propsBoolTFValue Boolean " Properties with an integer value " Add probe-specific property names here to allow any integer as a value syn keyword propsPropInteger skipwhite nextgroup=propsIntColonVal,propsIntColonError BeatInterval BufferSize MaxLogFileSize MaxRawFileSize MaxSAFFileSize NetworkTimeout PeerPort Peerport PollServer RetryConnectionCount RetryConnectionTimeOut Version FlushBufferInterval Heartbeat LogStatisticsInterval Port SleepTime SocketSize TrapQueueMax InactivityAlarmTime OffsetOne OffsetTwo OffsetZero ConnectTimeout MaxStreamCapFileSize PortCurrent PortUpload RetryTimeout UploadReadTimeout FlushTime ReadTimeout Inactivity MaxInvalidAlarmLogFileSize MaxEvents ReconnectionAttempts ReconnectionInterval CommandPort CommandPortLimit PollInterval ResolutionState SetResolutionState Timeout ServerPort TimeOut SslPort syn match propsIntColonError contained /[^:[:space:]]\+/ syn match propsIntColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsIntValue,propsIntError syn match propsIntError contained /.*/ syn match propsIntValue contained /-\=\d\+/ hi def link propsPropInteger Type hi def link propsIntColonError Error hi def link propsIntColonVal Special hi def link propsIntError Error hi def link propsIntValue Number " Properties with values limited to 0, 1, or 2 " Add probe-specific property names here to allow 0, 1, or 2 as valid values syn keyword propsProp012 skipwhite nextgroup=props012ColonVal,props012ColonError Replay syn match props012ColonError contained /[^:[:space:]]\+/ syn match props012ColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=props012Value,props012Error syn match props012Error contained /.*/ syn keyword props012Value contained 0 1 2 hi def link propsProp012 Type hi def link props012ColonError Error hi def link props012ColonVal Special hi def link props012Error Error hi def link props012Value Boolean " Properties with values limited to 1, 2, or 3 " Add probe-specific property names here to allow 1, 2, or 3 as valid values syn keyword propsProp123 skipwhite nextgroup=props123ColonVal,props123ColonError LookupTableMode syn match props123ColonError contained /[^:[:space:]]\+/ syn match props123ColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=props123Value,props123Error syn match props123Error contained /.*/ syn keyword props123Value contained 1 2 3 hi def link propsProp123 Type hi def link props123ColonError Error hi def link props123ColonVal Special hi def link props123Error Error hi def link props123Value Boolean " Properties with values limited to the strings debug, info, warn, error, or fatal " Add probe-specific property names here to allow debug, info, warn, error, or " fatal as valid strings syn keyword propsPropMSG skipwhite nextgroup=propsMSGColonVal,propsMSGColonError MessageLevel AxisLoggingLevel syn match propsMSGColonError contained /[^:[:space:]]\+/ syn match propsMSGColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsMSGValue,propsMSGError syn match propsMSGError contained /.*/ syn match propsMSGValue contained /\c\(['"]\)\%(debug\|info\|warn\|error\|fatal\)\1/ hi def link propsPropMSG Type hi def link propsMSGColonError Error hi def link propsMSGColonVal Special hi def link propsMSGError Error hi def link propsMSGValue Boolean " Properties with values limited to the strings master, slave, or standard " Add probe-specific property names here to allow master, slave, or standard " as valid strings syn keyword propsPropMOD skipwhite nextgroup=propsMODColonVal,propsMODColonError Mode syn match propsMODColonError contained /[^:[:space:]]\+/ syn match propsMODColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsMODValue,propsMODError syn match propsMODError contained /.*/ syn match propsMODValue contained /\c\(['"]\)\%(master\|slave\|standard\)\1/ hi def link propsPropMOD Type hi def link propsMODColonError Error hi def link propsMODColonVal Special hi def link propsMODError Error hi def link propsMODValue Boolean " Properties with string values that are IPv4 or IPv6 IP Addresses " Add probe-specific property names here to allow IPv4 or IPv6 strings as " valid syn keyword propsPropIPS skipwhite nextgroup=propsIPSColonVal,propsIPSColonError BindAddress syn match propsIPSColonError contained /[^:[:space:]]\+/ syn match propsIPSColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsIPSValue,propsIPSError syn match propsIPSError contained /.*/ syn match propsIPSValue contained /\(['"]\)\%(\%(25[0-5]\|2[0-4]\d\|[01]\=\d\{1,2\}\)\.\)\{3\}\%(25[0-5]\|2[0-4]\d\|[01]\=\d\{1,2\}\)\1/ syn match propsIPSValue contained /\(['"]\)\%(\x\{0,4\}:\)\{7\}\x\{1,4\}\1/ hi def link propsPropIPS Type hi def link propsIPSColonError Error hi def link propsIPSColonVal Special hi def link propsIPSError Error hi def link propsIPSValue Boolean " Properties with values limited to the strings UDP, TCP, ALL, ANY, UDPV6, " TCPV6, or ALLIPV6 syn keyword propsPropPROTO skipwhite nextgroup=propsPROTOColonVal,propsPROTOColonError Protocol syn match propsPROTOColonError contained /[^:[:space:]]\+/ syn match propsPROTOColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsPROTOValue,propsPROTOError syn match propsPROTOError contained /.*/ syn match propsPROTOValue contained /\c\(['"]\)\%(UDP\|TCP\|ALL\|ANY\|UDPV6\|TCPV6\|ALLIPV6\)\1/ hi def link propsPropPROTO Type hi def link propsPROTOColonError Error hi def link propsPROTOColonVal Special hi def link propsPROTOError Error hi def link propsPROTOValue Boolean " Properties with values limited to the strings '', 'a', or 'n' syn keyword propsPropBAN skipwhite nextgroup=propsBANColonVal,propsBANColonError AckFilter syn match propsBANColonError contained /[^:[:space:]]\+/ syn match propsBANColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsBANValue,propsBANError syn match propsBANError contained /.*/ syn match propsBANValue contained /\c\(['"]\)\%(a\|n\)\=\1/ hi def link propsPropBAN Type hi def link propsBANColonError Error hi def link propsBANColonVal Special hi def link propsBANError Error hi def link propsBANValue Boolean " Properties with values limited to the strings '', 'o', 'c', or 'f' syn keyword propsPropOCF skipwhite nextgroup=propsOCFColonVal,propsOCFColonError AlarmStateFilter syn match propsOCFColonError contained /[^:[:space:]]\+/ syn match propsOCFColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsOCFValue,propsOCFError syn match propsOCFError contained /.*/ syn match propsOCFValue contained /\c\(['"]\)\%(o\|c\|f\)\=\1/ hi def link propsPropOCF Type hi def link propsOCFColonError Error hi def link propsOCFColonVal Special hi def link propsOCFError Error hi def link propsOCFValue Boolean " Properties with values limited to the strings 'true' or 'false' syn keyword propsPropTFS skipwhite nextgroup=propsTFSColonVal,propsTFSColonError EncryptedLogon CleanUpOnShutdown UseIwa UseSsl syn match propsTFSColonError contained /[^:[:space:]]\+/ syn match propsTFSColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsTFSValue,propsTFSError syn match propsTFSError contained /.*/ syn match propsTFSValue contained /\c\(['"]\)\%(true\|false\)\=\1/ hi def link propsPropTFS Type hi def link propsTFSColonError Error hi def link propsTFSColonVal Special hi def link propsTFSError Error hi def link propsTFSValue Boolean " Properties with values limited to the strings 'ERR', 'WRN', 'INF', 'IRR', " 'DWN', 'DIS', or 'OFF' syn keyword propsPropSEV skipwhite nextgroup=propsSEVColonVal,propsSEVColonError SeverityFilter syn match propsSEVColonError contained /[^:[:space:]]\+/ syn match propsSEVColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsSEVValue,propsSEVError syn match propsSEVError contained /.*/ syn match propsSEVValue contained /\c\(['"]\)\%(ERR\|WRN\|INF\|IRR\|DWN\|DIS\|OFF\)\=\1/ hi def link propsPropSEV Type hi def link propsSEVColonError Error hi def link propsSEVColonVal Special hi def link propsSEVError Error hi def link propsSEVValue Boolean " Probe-specific property 'Retry' can be an integer for one probe, or " true/false for another. syn keyword propsPropRetry skipwhite nextgroup=propsRetryColonVal,propsRetryColonError Retry syn match propsRetryColonError contained /[^:[:space:]]\+/ syn match propsRetryColonVal contained /\s*:\s*/ skipwhite transparent nextgroup=propsRetryValue,propsRetryError syn match propsRetryError contained /.*/ syn match propsRetryValue contained /-\=\d\+/ syn match propsRetryValue contained /\c\(['"]\)\%(true\|false\)\=\1/ hi def link propsPropRetry Type hi def link propsRetryColonError Error hi def link propsRetryColonVal Special hi def link propsRetryError Error hi def link propsRetryValue Number " nice to highlight these in comments syn keyword propsTodo TODO TBD FIX FIXME CHECK CHECKTHIS TEST TEMP XXX contained " Comments syn match propsComment /#.*$/ contains=propsTodo hi def link propsTodo Todo hi def link PropsComment Comment let b:current_syntax = "props" " vim:ts=8 sw=3 et