syntax-patterns.txt

Parent Previous Next

(Updated 2011 August, 1st)


Under your /config folder as a sibling directory to your scripts folder there is a folder called /config/configuration.


In there you will find syntax-patterns.txt — make a back up of this file first, then edit syntax-patterns.txt adding the following at the very end of the existing file, and save it.




[QtScript]


red N ((\/\/\sScript\sBegins)|(\/\/\sScript\sEnds))


green        Y        \/\/.*


green   Y  \/\*.*.*\*\/


purple N ([A-Z_0-9]{2,}+)


red N \s*(function\s*.*)\(


maroon N \((.*)\)


blue N \s((break)|(case)|(catch)|(continue)|(default)|(delete)|(do)|(else)|(false)|(eval)|(for)|(function)|(if)|(in)|(instanceof)|(new)|(null)|(return)|(replace)|(super)|(switch)|(this)|(throw)|(true)|(try)|(typeof)|(undefined)|(var)|(const)|(while)|(with))


# EMCA standard functions properties

cornflowerblue N \.((indexOf)|(toLowerCase)|toUpperCase()|(lastIndexOf)|(substr)|(length)|(split)|(join))


# additions via EMCA prototype didn't include Array.lastIndexOf()

crimson N \.((contains)|(toTitleCase))


# twPan related


indianred N ((\$tw)|(twPan)|(callingScriptPath\(\))|(citationType)|(insertCite)|(citationOrder)|(citeOrderBy)|(bibleNamesAbrvs)|(global_load)|(create_helper)|(alert)|(select)|(chooseFromDirectoryListing)|(prompt)|(confirm)|(file_get_contents)|(file_put_contents)|(getRelativePath)|(initialise)|(finalise)|(getBibleVersion)|(getBibleVersionName)|(getBibleVersionAbrv)|(osCmd)|(getBibleVersionFull)|(getSuffixDateTh)|(insertSuperscriptDateTh)|(getDateWords)|(getDate)|(trim)|(ltrim)|(rtrim)|(LineBreakIs)|(convertSpeechMarks)|(cleanParaMarks)|(LineBreakIs)|(findFromScript)|(escapeLatex)|(pasteToLatex)|(latexFileName)|(responseObject)|(getSnippet)|(dataRecords_ArrayOfObjectsof_fieldName_And_fieldValue)|(commandUsed)|(toTitleCase)|(getArrayIndexKeyFromValue)|(cleanLineEnd)|(emptyString))


red N ((\.abbrv)(\.full))


# PhpJs related


limegreen N PhpJs\..*.\s


limegreen N $P\..*.\s


# global constants


darkorange N ((twConst)|(SystemAccess_NotAttempted)|(SystemAccess_OK)|(SystemAccess_Failed)|(SystemAccess_PermissionDenied))


# msgBox button return constants


tomato N msgBox\.((Ok)|(Open)|(Save)|(Cancel)|(Close)|(Discard)|(Apply)|(Reset)|(RestoreDefaults)|(Help)|(SaveAll)|(Yes)|(YesToAll)|(No)|(NoToAll)|(Abort)|(Retry)|(Ignore)|(NoButton))



red N (TW)


blue N  \.app


# TW.app. //functions properties

royalblue N  \.((about\(\))|(aboutQt\(\))|()|(hasGlobal)|(getGlobal)|(setGlobal)|(clipboard)|(about\(\))|(aboutQt\(\))|(aboutToQuit\(\))|(applyTranslation)|(applicationName)|(applicationVersion)|(getOpenFileName)|(getOpenFileNames)|(scriptListChanged\(\))|(openFileFromScript)|(openHelpFile)|(closeAllWindows\(\))|(deleteLater\(\))|(doResourcesDialog\(\))|(keyboardInputInterval)|(layoutDirection)|maybeQuit\(\)|(newFile\(\))|(openFileFromScript)|(openHelpFile)|(organizationDomain)|(organizationName)|(quit)|(quitOnLastWindowClosed)|(closeAllWindows\(\))|(setStyleSheet\(\))|(showScriptsFolder\(\))|(updateScriptsList\(\))|(syncPdf\(\))|())


limegreen N  \.target


# TW.target functions properties

seagreen  N  ((hasGlobal)|(getGlobal)|(setGlobal)|(balanceDelimiters\(\))|(clear\(\))|(close\(\))|(\.insertText)|(selection)|(selectionStart)|(selectRange)|(copyToFind)|(doFindDialog)|(fileName))


# show quoted material

darkorchid Y (["'])(?:.*)(\1)

# \1 requires exact matching quote mark - spell checking on


chocolate N  ((system)|(writeFile)|(readFile)|(information)|(warning)|(question)|(critical)|(getDouble)|(getInt)|(getItem)|(getText)|(createUI)|(createUIFromString)|(deleteLater\(\))|(platform\(\)))


# coral N \..*\(


black N [;,=.+]


[ConTeXt]

# special characters

darkred                N        [$#^_{}&]


# start/stop

darkgreen        N        \\(?:start|stop)[A-Za-z]+


# control sequences

blue                N        \\(?:[A-Za-z@]+|.)


# comments

gray                        Y        %.*


# other possibilities to be added....

# [BibTeX]

# [Metapost]

# etc


[HTML]


chocolate n class=.*"\s

MediumBlue;B n <[bBrRhH]{2}>


#http://www.webdeveloper.com/forum/showthread.php?t=175987

Gold n &[^\s]*;

darkgoldenrod n \d*pt


IndianRed/LightGray;B n ^[^\s]*:


Red/LightYellow  n (\[)|(\])


SeaGreen/LightCyan  n (\{)|(\})

#D7700A  n .*\.(jpg|JPG)

#D7700A  n .*\.(png|PNG)

 

Black/AliceBlue;I Y <(I|i)>[a-zA-Z0-9\s]*</\1>

Black/AliceBlue;B Y <(B|b)>[a-zA-Z0-9\s]*</\1>

Black/AliceBlue;U Y <(U|u)>[a-zA-Z0-9\s]*</\1>


SlateBlue/LightGoldenrod;I n <[a-zA-Z]*>

SlateBlue/LightGoldenrod;I n <[/a-zA-Z]*\s*

SlateBlue/LightGoldenrod;I n >


goldenrod;U n (\s*rgb\(.*\))


# show style quoted material

darkorchid n style=(["'])[^\s]*(\:)

darkorchid n (["'])

# \1 requires exact matching quote mark - spell checking on





Created with the Personal Edition of HelpNDoc: Create iPhone web-based documentation