Add a shortcut for duplicating the current line in the script editor

As a Roblox developer, it is currently annoying to have to write code that’s essentially the same thing with minor variations. A shortcut to clone lines would make this less annoying since it would remove a lot of typing/mouse movement.

The primary use case for this is just reducing the time spent selecting and copy/pasting code, since it obviously removes the need to select the entire line and keeps the clipboard free. I use this all the time in off-site projects, and I would love to be able to use it in Studio too, since it reduces the amount of time I spend writing long sequences that are the same thing with minor variation.

Given this is a feature in commonly used editors like Notepad++, VSCode, and Sublime, it seems a no-brainer to have it in the Script Editor as well. The default keybinding for each of these editors is different, but I would prefer Ctrl+Shift+D as it is in Sublime.

14 Likes

More specifically, the shortcut should duplicate highlighted text. It should duplicate the current line if no text is highlighted.

7 Likes

This is something that would be very useful when setting up a data structure. Would definitely find this QOL update very useful.