Feature Request: Plain Text Comments

@peternlewis - I remember when people asked for rich text comments, you gave them to us, then people asked how they could get plain text from them. Your response made me laugh:

My request isn't quite the same thing.

I've been trying to prune my macros (all 2,080 of them), to help speed up the KM editor. I've discovered that rich text comments are a MAJOR contributor to the size of my macros. (I realize I'm not a typical user, but it's still true.)

For shorter comments, rich text comments are roughly double the size of a "set variable to text" action (give or take). For more complex comments with lots of formatting and stuff, it can be 4-5 times the size.

I took one of my more detailed "documentation"-type comments and put it in a new macro. Then I made another new macro, and pasted the comments into a "set variable to text" action. The results:

rich text macro size: 14,122
plain text macro size: 3,944

This adds up. Currently, I'm moving a lot of those types of comments to external files, but it's not the best solution.

So, that's the reason for the request. I imagine it'll go on the bottom of your list, but at list it would be on your list. ;p

3 Likes

Funny, I've had this same thought in my head for a while, but never thought it worth sharing as I figured I was the only one :). It'd be great if there were just a checkbox on the Comments box for either rich or plain text. Or even simpler, if plain text were all that was in the comment, then it would be stored as plain text.

I wondered if forcing text through TextEdit in Plain Text Mode then pasting that into a comment would help. It does, but not by much, and still much larger than when saved as a variable:

-rob.

1 Like

It's still Rich Text, with all the overhead that involves.

I even tried exporting a comment action, changing the XML from StyledText and data to Text and string, then reimporting it -- but it converted to Rich Text again...

1 Like

I was just thinking that maybe Peter did some behind-the-scenes magic that would check the format of the incoming text for richness :).

-rob.

1 Like

My "comments" are always "rich." :slight_smile:

Now that I know about the space requirements, it's a good thing I never place comment actions in my macros to document them. :slight_smile:

1 Like

You could always use a disabled action as a comment (eg Set Variable to Text perhaps).

1 Like

That's certainly a workaround, although I dislike trying to read disabled text. Old eyes problem. :slight_smile:

Perhaps, in practice, the overhead of enabled "COMMENTS" (like those below) is really not too high ?

( better to tax machines than eyes)

Keyboard Maestro Export


Or perhaps even (where flow is a bit more nested and conditional) comments which accumulate as a diagnostically useful log ?

Keyboard Maestro Export

1 Like

Here's the overhead I'm talking about:

Check out the "Documentation" section of this macro:

I took the text in the "Documentation" section, (if you read this after I upload my latest version, then I'm talking about the documentation for the "Get Screen Rectangle" macro, not the other ones), and pasted it plain text into a "Set Variable to Text" action. I pasted a slightly older RTF version into a Comment action, and finally, I made a Comment action with just a little information and a link back to its thread. Here's the size differences:

image

Is that an excessively large comment? Yes. But that's how I document macros I share. And that size (overhead) adds up.

Which is why I'm starting to use the "linked" version of the documentation instead.

By the way, I got the "size" values from KM's macro object's "size" property.

I hope this all makes sense - I'm in the middle of something else and sometimes that causes me to miss something obvious.

1 Like

An action doesn't have to be disabled to be ignored. For example, I often put some code in the ELSE block of an "IF false" statement, like this:

My method above solves that problem for me. It also lets me select and run the code in the ELSE block manually. Code that is disabled is much harder to run in the cases where you want to run it.

1 Like

This seems accurate - just don't disable the action. A Set Variable to Text action is going to take no appreciable time (probably the same time whether it is enabled or disabled!).

1 Like