Macro for Toggling Editor Comments

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

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