increpare / PuzzleScript

Open Source HTML5 Puzzle Game Engine
MIT License
903 stars 159 forks source link

suggestion: shortcut for moving lines up/down #615

Closed minotalen closed 3 years ago

minotalen commented 3 years ago

A feature that I am missing from the PS editor is the ability to move lines with a keyboard shortcut. Glitch.com for example uses ctrl-shift-up/down to move a single line or a whole selection. Sometimes I need multiple cursors to change several rules at once. To do this I currently copy the code to Atom, do the task there and then copy it back. Not idea how they achieve those on Glitch, but their web editor has these features working pretty smoothly (even in combination). So yeah no clue if the benefits outweigh the cost for these features, up for you to decide I suppose.

increpare commented 3 years ago

Hello! Thank you for the two suggestions!

Moving lines, huh, maybe I can add it? Reordering lines quickly could be useful I can see (OTOH copy/paste is pretty easy...). Very low priority, and I'm not committing to it, but I'll leave the task open in case I want to feel productive some day.

Puzzlescript used to have multicursor support, but I disabled the feature. The possibility of accidentally having cursors offscreen and editing several parts of the document at once without realising it...well it wasn't just a possibility, I did it several times and it was very annoying. So no multicursors. (I do use multicursors sometimes in sublime text, but yeah generally no).

Your post is two suggestions rather than one. I'm going to edit the title to only mention the moving line shortcut because the second one isn't something I want to implement right now.

minotalen commented 3 years ago

Sweet! I'd love to be able to press CTRL-shift-L for marking the whole line it that makes sense.

increpare commented 3 years ago

@minotalen I don't know what you mean - to select a whole line?

minotalen commented 3 years ago

yes, same as ctrl+l in atom

On Sat, 24 Apr 2021, 20:07 Stephen Lavelle @.***> wrote:

@minotalen https://github.com/minotalen I don't know what you mean - to select a whole line?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/increpare/PuzzleScript/issues/615#issuecomment-826131445, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6C64X66AYKXRNTUYFDIOTTKMCGDANCNFSM43BVGDFQ .