Shift+Alt+Arrow to Duplicate Line of Code

As a Roblox developer, it is currently too hard to write multiple similar lines of code (e.g. requiring modules).

It would be great if I could press an arrow key while holding Shift and Alt to duplicate a line upwards or downwards, much like VSCode. This would intuitively combine with Alt+Arrow to shift a line up or down, and is much faster than manually selecting the entire line with your mouse and copy-pasting it. I switched from VSCode to the built-in script editor for my current project and this is the biggest feature I’m missing.

If Roblox is able to address this issue, it would improve my development experience because I’d be able to code noticeably faster.

4 Likes

There is a feature that make it easier and faster to write similar lines of code at a time.

Multi-Cursor Editing
8c63589f2383392c735bb5394e3ff607

3 Likes

Unfortunately this doesn’t solve the problem of having to use my mouse to manually select the entire line to then copy paste it. One keystroke would be far more efficient.

1 Like

You can use Cmd/Ctrl+Shift+Arrow to select an entire line
I use it all the time

I would like to see this feature though.

Ctrl+Shift+Arrow only selects one word at a time afaik.

For me that’s what alt does.
Maybe it’s a windows thing?
I’m sure there is still a keybind for it though but I’m not sure what it would be.

To clarify by windows thing I mean windows not having it.

Yeah, must be an OS difference of some kind. I just checked and it does indeed select one word at a time on windows.

I do this as a workaround:

Home key & then Shift + End, copy, paste
or
End key & then Shift + Home, copy, paste

In VS Code you can do Ctrl + D to dublicate the line of code

1 Like

i haven’t seen this mentioned anywhere but you can press Ctrl + Shift + D on windows to duplicate lines

1 Like

Does this work in Roblox Studio as well?

yeah you can duplicate lines in roblox studio by pressing ctrl + shift + d on windows

alternate feature request : add a dropdown to select from roblox or vscode shortcuts : D
edit : (script editing shortcuts only)