Glitch Userscripts

I wrote a few userscripts for the Glitch editor, you're free to use them!


Installation

First, you need to install Tampermonkey extension or something similar. Then, click the "download" button. Tampermonkey should ask you whether you want to install the script. Install it (if you want, of course).

Then, you need to go to Tampermonkey settings, click the script name and open the "Settings" tab. There you'll see a "Settings" section and a "Run at" option. Choose "document-start" there, it should save automatically. That's it, now the extension should activate itself when you open the Glitch editor!

Don't forget the last step, it is important! Because Glitch editor uses inline Content-Security-Policy, Tampermonkey cannot execute any external scripts on its pages. Tampermonkey for now has no code to override CSP in meta tags, only in HTTP headers. So we have to run the code before your browser loads that Content-Security-Policy! Hence "document-start".


Scripts

Vimify download

Vi mode for Glitch! (Based on this forum post by wolfascu.)

Disable tag autoclose download

It's annoying, right? The editor thinks that it's smarter than you >_> (Based on this forum post by kinduff.)

Disable brackets autoclose download

Same, but for brackets!

Color column / ruler download

Highlights the 80th column with the same color the active line is highlighted. Most editors have this, it's handy and helps you keep your lines shorter than 80 character. (Although the "Format this file" button reformats your code to keep it all before this column.)

This script supports both dark and light themes, but it doesn't support switching on the fly. If you changed your Glitch editor theme, reload the page, and the ruler will use a more suitable color.

POWER MODE!! download

Add POWER! (Original repo.)


By the way, did you know that you can find the (somewhat inaccurate) list of default hotkeys for the Glitch editor here?