[solved] Way to move statement blocks?


#1

1) Give a description of the problem
I have two if statements 1 and 2b. Now I have an idea that requires me to insert another statement 2a between 1 and 2b. Is it possible to insert/move statements or do I have to delete everything and add statement 2a and then 2b again?


#2

https://wiki.webcore.co/WCmore's_DragAndDrop


#3

I always wondered why that was there. :grin: Thank you !


#4

@WCmore’s insructions are spot on. I just want to clarify a little. I have not been able find a way to move more than one segment of code by dragging (as @WCmore’s wiki describes) . As far as I can tell, you cannot “hold the ctrl or shift key” and mark multiple sections to move. HOWEVER, if you highlight and copy each segment that you want to move or copy to the clipboard, it will add them in a list. Then you can paste each segment individually from the clipboard as you want.


#5

@Pantheon is correct. The selection has to be continuous for a one-click-drag… but you can change the size of the selection by making your first click in a different spot. The highlighted numbers in the left margin will always show exactly what is selected.

Depending on the circumstances, I may copy a large block, and then delete the sections or lines not needed.