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.
Here’s the macro in action:
To install the macro simply hit the “View Resource” and “Install Instructions”
Once installed – open the Macro properties and set the keybinding to Ctrl+3 (or
whatever custom keybinding you like).
## Related Materials
the context of the Komodo window
* [Komodo Macro API] – to programatically interact with the Komodo editor –
* [Editor API] – the Komodo editor provides a wrapper around the Scintilla API
[Komodo Developer Extension]: /framed/?https://community.activestate.com/node/1824
[Komodo Macro API]: /framed/?https://docs.activestate.com/komodo/latest/macroapi.html
[Editor API]: http://www.scintilla.org/ScintillaDoc.html