Macro Monday – a new macro to dig into every Monday!

The Macro

This is a startup macro (set to trigger when Komodo starts up) that will enable brace wrapping on an editor selection. Once you make a selection, pressing any of the brace or quote keys ( { [ ” ‘ will automatically add a matching brace or quote to the start and end points of the selection.

Screenshot

Here’s the macro in action, as I press the double-quote ” key:

Installation

To install the macro simply hit the “View Resource” and “Install Instructions” links below.
Once installed – open the Macro properties and set the macro to trigger on the Komodo startup event.

Install Instructions

Related Materials

  • Komodo Developer Extension – play around with JavaScript or Python code in the context of the Komodo window
  • Komodo Macro API – to programatically interact with the Komodo editor – available to both Python and Javascript
  • Editor API – the Komodo editor provides a wrapper around the Scintilla API