On Monday, August 22, 2016, Tom Robinson <barefootg...@gmail.com> wrote:
> Presuming you’re only expecting colourisation in the editor, and not saved to > the file, etc.: > > You *should* be able to do that through a Codeless Language Module and 10–20 > lines of XML: There's an easier way, as of 11.0: + There is now a simple way to add language keywords to installed languages without fiddling your fingers in the application package or other off-limits places. As follows: - in the `Application Support/BBEdit/` folder, there is a new subfolder, named `Custom Keywords`. It is created automatically when the application starts. - In this folder, place one or more files containing the keywords that you wish to be colored. - Each file's name should map it to the appropriate language, e.g. ".js" for JavaScript files. You can have multiple keyword files mapped to the same language, if you wish. - Each file should be UTF-8 text, no BOM, and contain one keyword per line. - Keyword lookups are case-sensitive if the language is case sensitive; case-insensitive otherwise. - Words in these files are colored using the "Language Keywords" color. Beginning with 11.6: * Custom keyword files (those that live in `Application Support/BBEdit/Custom Keywords`) can now use an Emacs mode line to specify their language. This addresses the case in which you want to supply keywords for a language that doesn't have any filename extension mappings. For example. "`.php`" maps to "PHP in HTML", which means that embedded PHP keywords need to be in a keywords file that maps to the "PHP" language. Such a keyword file would look like this: <code> -*- mode: php; -*- keyword_one keyword_two ...etc... </code> Emacs mode lines and blank lines in the keyword file will be ignored. R. -- Rich Siegel Bare Bones Software, Inc. <sie...@barebones.com> <http://www.barebones.com/> Someday I'll look back on all this and laugh... until they sedate me. -- This is the BBEdit Talk public discussion group. If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+unsubscr...@googlegroups.com. To post to this group, send email to bbedit@googlegroups.com. Visit this group at https://groups.google.com/group/bbedit.