Add/fix swap line command


I have noticed that the glitch editor uses codemirror and the sublime key commands plugin, unfortunately the “swap line” command (and a couple more I think) doesn’t actually work.

Based on the plugin, the command should be “Cmd-Ctrl-Up/Down” or “Shift-Ctrl-Up/Down”, but what this actually does is select to the start/end of a line, because Ctrl+Up/Down moves the cursor to the start/end of a line and Shift will select it. So I believe the issue is that the command is being overridden by the selection command.

A few months ago I implemented it myself by doing a script replacement on the glitch edit page with an edited version of the js file. I believe I just changed the swapline key combination with one that wasn’t used anywhere else, but I forget if that’s all i did. Unfortunately this caused other issues like disabling dark mode for some reason.

Regardless, this command is one I use very often and would love to see it working in glitch!