With the release of 2023r1, a feature I’ve been
harassing urging the Xojo team to add is finally here: the ability to move or duplicate lines in the editor via the keyboard.
With your cursor anywhere in a line, try
option-up/down to move the line.(
alt-up/down on other platforms.) Add
shift into the mix to duplicate that line in the direction of the arrow.
This will change your life.
@Alyssa_Foley beat me to it.
Originally published at:
Code Editor New Features: Swap and Duplicate Lines – Xojo Programming Blog
Xojo’s Code Editor now lets you move a line or a selection up or down or duplicate entire lines (or a selection). To swap lines, put the cursor on a line and press Option+Up Arrow (Mac) or Alt+Up Arrow (Win/Linux) to move the line up in the code. Press Down arrow to move down.
only because I had head start
I confess: I just read a tweet about it, and wondered how ‘copy and paste’ was a feature deserving of an exclamation mark in 2023.
Looking forward to having my life changed…
March 28, 2023, 3:50pm
Sadly agreed. Not only I don’t need these new features, but I’ve seen times where I just wanted to change the current selection/insert point using the keyboard and ended up duplicating a line by mistake. By typing fast, I was almost not noticing this.
An option to turn this off would please me.