Automatic Brace Wrap for Editor Selections

komodo ide blog hero

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

Recent Posts

Tech Debt Best Practices: Minimizing Opportunity Cost & Security Risk

Tech debt is an unavoidable consequence of modern application development, leading to security and performance concerns as older open-source codebases become more vulnerable and outdated. Unfortunately, the opportunity cost of an upgrade often means organizations are left to manage growing risk the best they can. But it doesn’t have to be this way.

Read More
Scroll to Top