Is there a easy way to insert new code in piston other than at the bottom?


#1

I have been struggling with this for months. I have pistons that have over 200 lines of code. And when I want to add new code or copy and past code it always goes to the bottom of the piston and then it can take minutes to drag it all the way to the top.

Is there something I am missing on being able to insert new code where you want it to be in the piston editor?


#2

You don’t believe have to scroll all the way to the bottom to find a location to insert new code. You can insert a brand new section of conditionals/case/actions/etc at the closest place “add new statement” to the section you desire and then move it. At least that is what I do.

I agree that duplication of a section is strange behavior, and generally this results in the new duplicated section being placed at the bottom. Then, it is work to get it back to the top!


#3

If you are copying code using the Ctrl-Arrows in the left column, you can place the new code right where you want it easily. (method described here).

As far as adding new code on the long pistons, I may even copy nearby code and then edit it to change it entirely. It sure beats the drag from the bottom technique…

Another technique is as @kurtsanders mentioned. Look nearby for “add new statement”. (often found in the nearest IF block) Just remember to drag it to the correct location afterwards


#4

Thanks for the hints. Insert “here” is a missing in the current development environment.


#5

I feel your pain… Although, can you imagine the clutter if each line of code was followed by another line saying “add new statement”…??

Sometimes I wish we could edit in straight text… Then we could just do a carriage return.