Syntax Hilites

From Gwen Morse's Wiki
Jump to: navigation, search
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; IDE Highlighting
;;;
;;; I'm sure most of you have worked on a IDE that uses syntax highlighting if you're into
;;; any sort of coding at all, you all know how useful it can be. Of course, MUSHes didn't
;;; have that -- till now. If you paste the following into your .tfrc (for tinyfugue
;;; users; others probably will have to modify this code) and then do line joins if
;;; necessary, you'll get some form of syntax highlighting.
;;; Author: Kamikaze: http://www.imsa.edu/~kamikaze/

/def -p10 hilight_cmd = /def -PBCwhite -F -t"%1"
/def -p10 hilight_cmd2 = /def -PBCwhite -F -t"%1"
/def -p10 hilight_cmd3 = /def -PBCwhite -F -t"%1"
/def -p10 hilight_cmd4 = /def -PBCwhite -F -t"%1"
/def -p10 -F -PBCyellow -t'(\{|\})'
/def -p10 -F -PBCred -t'(\[|\])'
/def -p10 -F -PBCgreen -t'(\(|\))'
/def -p10 -F -PBCblue -t'(=|;|/|\%0|\%1|\%2|\%3|\%4|\%5|\%6|\%7|\%8|\%9|\%#|\%@|\%N)'
/def -p10 -F -PBCmagenta -t'(\%r|\%b|\%t|\%s|\%p|\%o|\%!|\%l)'
/def -p10 -F -PBCcyan -t'(\%q0|\%q1|\%q2|\%q3|\%q4|\%q5|\%q6|\%q7|\%q8|\%q9|\%Q0|\%Q1|\%Q2|\%Q3|\%Q4|\%Q5|\%Q6|\%Q7|\%Q8|\%Q9)'
/def -p10 -F -PBCmagenta -t'(,)'
/hilight_cmd (@@|@allhalt|@allquota|@atrchown|@atrlock|@attribute|@boot|@cemit|@channel|@chat|@chown)
/hilight_cmd (@chownall|@chzone|@chzoneall|@clock|@clone|@command|@config|@cpattr|@create|@dbck)
/hilight_cmd (@decompile|@destroy|@dig|@disable|@doing|@dolist|@drain|@dump|@edit|@elock|@emit|@enable)
/hilight_cmd (@entrances|@eunlock|@find|@firstexit|@fixdb|@force|@function|@gedit|@grep|@halt|@hide|@kick)
/hilight_cmd2 (@link|@listmotd|@list|@lock|@log|@mail|@map|@motd|@mvattr|@name|@newpassword|@notify|@nuke)
/hilight_cmd2 (@oemit|@open|@parent|@password|@pcreate|@pemit/list|@pemit|@poll|@poor|@power|@ps|@purge|@quota)
/hilight_cmd2 (@recycle|@rejectmotd|@remit|@restart|@rwall|@rwallemit|@rwallpose|@scan|@search|@select)
/hilight_cmd3 (@shutdown|@sitelock|@squota|@stats|@sweep|@switch|@tel|@teleport|@toad|@trigger|@ulock|@unlock)
/hilight_cmd3 (@undestroy|@unlink|@unlock|@unrecycle|@uptime|@uunlock|@verb|@version|@wait|@wall|@wallemit)
/hilight_cmd3 (@wallpose|@warnings|@wcheck|@wipe|@wizemit|@wizmotd|@wizpose|@wizwall|@zemit|@desc|@dol)
/hilight_cmd4 (@sel|@fo|@no|@listen|@lemit|@femit|@fpose|@fsay|@mudwho|@alias|@last|@robot|@readcache)
/hilight_cmd4 (@setq|@set)

; Hilite various Tiny-MUSH specific settings (dbrefs, flags, @'s, etc)
; written by Andrew Mortimer

/def -i -p1 -P0BCred -mregexp -F -t'#[0-9]+' tiny_dbrefnum
/def -i -p1 -P0BCred -mregexp -F -t'#-1' tiny_dbreferr
/def -i -p1 -P1BCred -mregexp -F -t'#[0-9]+([A-Za-z\$+&@]+( \[[^]]+\])?)' tiny_dbrefflag
/def -i -p1 -P0Cwhite -mregexp -F -t'@[A-Za-z_]+' tiny_atcomm
/def -i -p1 -P1Cwhite -mregexp -F -t'^([ ]*[^;()# ]+)(\\(#[0-9]+\\))?:.*' tiny_heads