Skip to content

Latest commit

 

History

History
104 lines (66 loc) · 5.2 KB

ModeUpdateNotes.md

File metadata and controls

104 lines (66 loc) · 5.2 KB

Documentation:

Update from SEE3 .mode to SEE4 .seemode: Notes

  1. General Changes
  2. Changes in SyntaxDefinition.xml
  3. Changes in RegexSymbols.xml
  4. Changes in Info.plist
  5. Changes in Mode Scripts
  6. Minimalist Update

General Changes

Be sure to check out the Mode Documentation for all the changes and additional features that are part of the SEE4 mode:

ℹ️ SubEthaEdit 4 Mode Documentation

▶️ Rename your mode bundle from name.bundle to name.seebundle.

On the inside modes have changed quite a bit, so we changed the file-extension from .mode to .seemode so they don't get confused, and don't mess up with modes made for Panic's excellent Coda.

The basic file layout inside the .seemode bundles however has stayed the same, so you can just rename the .mode bundles and then go on to update the contained files from there.


ℹ️ Style Sheet Scopes Documentation

▶️ Update <default>, <state>, <keywords> tags for mode independent style sheets:

  • ▶️ Add a scope attribute
  • ▶️ Remove background-color, color, font-style, font-weight, inverted-background-color, inverted-color attributes.

▶️ Move all your states into the <default> state.

▶️ Add indent attribute to your states for indentation support.

▶️ Add <autoend> to your states to support programmatically closing the current state.


Changes in RegexSymbols.xml

▶️ Check your symbol images and replace with generated symbols or custom images if needed.

If the image is a custom image and part of the mode bundle nothing has to change. It is however possible to add resoulution specific image assets or replace the custom image with a generated image specified in the symbol attribute.

Of the built in images only SymbolWarnis still supported. With the others it is easiest to replace the image attribute with its symbol counterpart which generates an image for you. The <symbol> documentation describes how to further customize the result. You could also add custom images instead.

	old: <symbol id="Foo" image="SymbolM">
	new: <symbol id="Foo" symbol="M">

Changes in Info.plist

▶️ Update SEEMinimumEngineVersion to at least 4.0.
▶️ Remove TCMModeExtensions and TCMModeNewFileTemplate and add a ModeSettings.xml instead.
▶️ Replace CFBundleGetInfoString with NSHumanReadableCopyright.


Changes in Mode Scripts

ℹ️ Updated Scripting Suite Reference (TODO)

▶️ Check if custom scripts are still necessary - some scripts are now built in or funtionality directly supported by SubEthaEdit or the mode format itself.

  • Insert Hex Color is now a built in script available for all modes
  • Close tag/block scripts can now be replaced by <autoend> information in SyntaxDefinition.xml - support for closing a state is now built into the mode states

▶️ Check mode scripts with the AppleScript Editor and the current SubEthaEdit.

Most of the AppleScripts need to be ajusted. Some of the Properties on the document now work slightly different, and sandboxing might prevent you from doing something that worked before.

▶️ Remove keys shortdisplayname, toolbartooltip, toolbaricon, indefaulttoolbar from seescriptsettings() of your scripts.
▶️ Remove custom toolbaricon files.


Minimalist Update

Updating a mode partially can be a quick solution in times of need but is not recommended.
This is the bare minimum:

▶️ Rename your mode bundle from name.bundle to name.seebundle.
▶️ Update <default>, <state>, <keywords> tags for mode independent style sheets by adding a scope attribute
▶️ Update SEEMinimumEngineVersion to 4.0.