Add ability to re-order variables


Would love to have the ability to re-order a list of variables. You’re able to order just about any part of the code, but you can’t re-order a list of variables.


Yeah, I would add a silly request to reorder global variables as well :wink:
They’re stacking up as I make pistons more generic but related variables are all over the list. First world problem.


+1 vote from me :slight_smile:


hahaha, it’s an OCD thing for me. One of my pistons has like 13 variables. And it drives me crazy that they aren’t in any particular order.


This is particularly useful when making a piston to share with others… move configurable variables to the top and make everything else look reasonable. @ady624 has mentioned that it is both possible to do and frequently requested.


Just adding my +1. :slight_smile:


Definitely a +1 for me as well…

My “final” piston is NEVER what it started out to be, so they are looking haphazard, to say the least… I often end up deleting one, then re-adding it, just to bring it to the bottom, but to be thorough, 90% of the variables have to be done like this to keep like-minded variables near each other.

A simple drag and drop would make me VERY happy!



In the complex templates I use, I’d like the variables to be grouped by type.


As long as no major side effects pop up in testing, this will be included in the next release :star2: Local variables only, I think globals would have to be handled differently.


Rats, it’s my long list of globals that are a mess.


Unfortunately globals are stored as a mapping by variable name rather than as an ordered list, so a solution would not only have to provide the UI to rearrange globals but also a mechanism to sort them consistently.

It may not be an improvement for most people but if you happen to be bothered enough to set up a custom stylesheet with CSS (e.g. via Stylish) to reorder the list of globals I could add class names to let you identify the variables in CSS. This is similar to what was done for fuel streams in the upcoming release.

For example, the container element for the variable @dewPoint would have a CSS class global-var-dew-point. With that change you could do some reordering with CSS to move that variable to the top of the list. This is not great, but it’s something if you are very bothered by the globals and able to manage custom CSS.

.global-vars {
    display: flex;
    flex-direction: column;
.global-vars .global-var-dew-point {
    order: -1;


Reordering of local variables has been released in v0.3.105.20180628