Oh Behave!
This bookmarklet uses Behave.js to take an existing textarea on a page and make it behave like a code editor.
If the page has only one textarea, it will target that one. If there are multiple textareas, you need to click on the one you want to behave after clicking the bookmarklet.
At the moment only tested on Chrome, but should work in most modern browsers.
Since there are different people who like different tabbing configurations, I'm going to provide a couple of options. Perhaps in the future you will be able to completely customize the bookmarklet.
Soft tabs, size 4
Oh Behave! (4) ← Drag this to your bookmarks
Soft tabs, size 2
Oh Behave! (2) ← Drag this to your bookmarks