Collapsing Actions within the Editor

I looked around to see if I could find anything on this within the forum, but did not so I will put it here.

Specifically, I am wondering if there is any way to collapse actions within the Editor. For example, maybe under a comment section, you can set the comment so anything under it can be hidden or revealed. Maybe this could somehow be applied to any action, where items under a given action could be indented (and then easily hidden and revealed). I am thinking along the lines of how Smartsheet handles indenting of rows.

Hey There,

You mean more than you can already (e.g. individual actions and collections)?

Currently you can't, but I believe Peter is looking in to implementing an action grouping system to allow users to group and collapse actions as desired.

-Chris

1 Like

Yes, that is exactly what I am talking about. That would certainly get my vote.

Also, while I am thinking about it, two more to throw into the mix:

  1. Colorization of the background of given actions.
  2. The ability to change the “heading” of an action. For example, changing “If All Conditions Met Execute Actions” to “Position 1 Confirmation”. In this way, it could be more descriptive without using an additional comment action or having to open the action to see how the action is defined.

The current best solution for a Group action is to use a Repeat 1 Time action as a stand in.

A Group action, and being able to color/label actions is on the todo list (its a surprisingly long list though!).

Haha, I thought I was the only one clever enough to think of using the “Repeat 1 Time” trick for grouping actions.

Here’s a barely helpful tip – When leaving comments inside my macros to document what each section of a macro does, I used to put a comment inside these collapsed groups. But I resolved that it is more helpful to put the Comment before the collapsible group, so that you don’t have to open each group to know what is does. Then of course, if you want to add more detailed comments deeper inside these groups, go for it.

It does look nice to be able to collapse all of the “grouped actions” and still be able to have an overview of what each section of the macro does from a bird’s eye view

I also use the “Execute Macro” action quite a bit whenever I have a group of actions that I may reuse throughout multiple macros. (This is another approach to nesting / grouping your macros) This way, if I find a better way to do something or need to correct a “bug”, I just have to do it inside that one macro. It also keeps complicated macros looking as tidy as possible. The worst is making a macro then not being able to edit it a week later without staring at it for 15m first.

For these sub-macros, I will usually put a z_ prefix at the beginning of its name so it shoots to the bottom of my alphabetically-sorted list inside the macro folder. That way it stays out of the way when I’m browsing through my other macros, and since I usually won’t execute these “reusable macros” on their own, there’s no need for them to me to see them mixed in with the other macros.

I even put some of them in a “Reusable Macros” folder so they stay out of the way completely. I especially do this when a macro can be useful for multiple projects I’m working on (which may reside across multiple macro folders)

Not sure if that stuff is helpful or super obvious (or somewhere in between)… hopefully someone will find value there :smile:

2 Likes

Yes, I also get sorting, in my case by using numbers as prefixes to the macros. I would have used the Repeat command for collapsing had I used that command before. I personally think that collapsing is really great organizationally as the macros can get unwieldy very fast.

And I am using the Execute Macro to run multiple sub-Macros, and that seems to work well. It would be great to pass arguments to the macros rather than having the variables globally defined.

One other thing about using comments is that I wish the word “Comment” was not in the comment. There is already a unique “comment” icon.

I made an “Advanced” Comment action that doesn’t have “Comment” in the header (and incidentally a whole tutorial showing how to create such Plugin Actions) here: http://flipmartin.net/software/keyboard-maestro-6-plugin-actions-tutorial

1 Like

Well thats interesting… I will need to check that out.

@Philippe, I finally set up the Plugin for the Loud Comment. Very nice. I have not messed around yet with the debugging portion but will do that in the very near future.

Many thanks for this. A big help. I just wish there was a way to modify a repeat command such that this type of comment title was at the top (thus allowing you to collapse a procedure and simply see something like your Loud Comment.

I wonder if it would be possible to modify the repeat command in a similar manner, or somehow call the repeat command to sit inside the Loud Comment as a separate active action (at least functionally).

As of now, I put the comment above the repeat command, but it would be very nice to have them integrated.

@radiator, are you not able to put the comment and the repeat command into another macro and use that?

In other words, you create an macro ‘X’ which is made of ingredients ‘Y’ and ‘Z’, where ‘Y’ is the comment and ‘Z’ is the repeat command.

After that, you just insert a line to Execute Macro ‘X’

Hey Rather, thanks for the comment.

I could do that, and in fact do do that where it makes sense. Its very useful. However, what I also want is to be able to create routines that are:

  • clearly labeled, and
  • immediately accessible to review the macro’s contents.

For instance, If I am reading through a macro that calls other macros, I can see the name of the macro, but I cannot simply click on the macro name to reveal the contents of the macro.

Right now there is no easy way to do that.

@radiator

Got it. What you’d like to see is almost like an alias, which would roll down to reveal the entirety of that routine or ‘ingredient’ - and presumably which you could tweak and edit in place?

If that’s right, then I’d like some of that too!

1 Like

Sorry about reviving this, but I had computer issues that had set my KM setup back a bit. Just wanted to know if any new functionality had been added along these lines since the last posting. Specifically was looking for ways to hide routines other than the “repeat once” scenario.

Not yet. 7.0 will have a Group Action.

1 Like

I agree, done that way too many times! Thanks for the tips.