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

The Macro

This is an on-demand Python macro (most useful with a keybinding) that will
allow you to toggle comments on/off over the selected editor lines (or the
current editor line when there is no selection).
I use the Ctrl+3 keybinding, overriding the default “Comment” command, as this
way I never have to use the Ctrl+2 “UnComment” command, I just have the one
keybinding to turn comments on or off.

Screenshot

Here’s the macro in action:

Installation

To install the macro simply hit the “View Resource” and “Install Instructions”
links below.
Once installed – open the Macro properties and set the keybinding to Ctrl+3 (or whatever custom keybinding you like).

View Resource


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