Please note that Glossary sets require a version of BBEdit which includes the Glossary feature. This precludes using these sets with BBEdit Lite, TextWrangler or Mailsmith. Create or install a Glossary ~/Library/Application Support/BBEdit/Glossary
In this folder you can find pre-defined BBEdit glossaries, and add your own Glossary or install a downloaded glossary.
A Glossary is a folder whose name ends with the filename extension it will be associated to, containing several text files (and/or subfolders grouping files).
Folders and subfolders names can start with a numbering in the "xx)" format, i.e.:
• "01)XSLT Glossary.xsl"
• "02)JSP Glossary.jsp"
• "03)CSS.css"
• "HTML Glossary.html" How to use a Glossary: Set Menu Keys In order to take the full advantage of a glossary we could set up a shortcut for the menu functions involved in the glossary facility:
• Edit|Auto-Complete Glossary…
• Edit|Insert Glossary Entry…
• Search|Go to Previous Placeholder
• Search|Go to Next Placeholder
An example:
• ⌘⌥↩ for Edit|Auto-Complete Glossary…
• ⌘↩ for Search|Go to Next Placeholder How to use a Glossary Once the language is recognized (through file extension or by choosing the language from the "Text Options" quick window menu) the related Glossary becomes active.
We can choose to see the full list of available glossaries commands by activating the Glossary Palette from "Window|Palettes|Glossary".
A quick example, using the XSLT Glossary: create a new text file, and save it using the name "foo.xsl"
Now in this blank text file type:
sty
press ⌘⌥↩ (or whatever you decided to use for "Edit|Auto-Complete Glossary…"), and you will see this window:
This happens when the auto-complete features matches more than one possible items, like in this case.
Choose "stylesheet", and you will get further dialogs... choose:
• output: xml
• omit declaration: no
• encoding: utf-8
and finally the output:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" />
<xsl:template match="<#xpath#>">
<#code#>
</xsl:template>
</xsl:stylesheet>
The "<#something#>" strings are the placeholders, that we can easily select through the previousley defined shortcut. |