seek-oss / playroom

Design with JSX, powered by your own component library.
MIT License
4.45k stars 183 forks source link

Add line editing keyboard shortcuts #274

Closed benjervis closed 1 year ago

benjervis commented 1 year ago

The number of times I've tried to move a block of code up or down using Alt-Up in Playroom must be almost equal to the numbers of lines I've written in Playroom. It feels like checking my empty wrist when I've forgotten my watch.

These oversights have been corrected, and I have ascended to heights of programming efficiency hitherto undreamt of. And now you can too.

They work just like VSCode's versions.

Screen Shot 2023-03-01 at 11 30 25 am

These implementations were mostly lifted from the codemirror5 sublime text keymap, with a bit of editing to make them work how I think they should work.

Preview site for testing it out, or I've snapshotted it into Braid if that's your preference.

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 8c353b723c3927ae6240dfa0b9f6d74f599889e9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------- | ----- | | playroom | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR