##Inheriting indention when pressing enter
What I'd like to suggest is that if you press enter, the indentation is copied from the line you're coming from, and then automatically put before the next line. This would make it a bit easier to type out code on SO. Of course this would create the problem that people who would want to end their code would be required to press shift+tab or backspace, so to fix that, you could make it that it stops inheriting previous indentation when pressing enter with only whitespace on that line. For example, with the things between [] being inserted by the script; ⇆ Tab, ↵ Enter and ← Backspace:
[⇆ ]lorem Ipsum(dolor) { [↵ ] sit amet; [↵←]} [↵ ]| and after pressing enter again, it inserts a newline, but removes the previously added indentation, so pressing enter again would change that to the following:
[⇆ ]lorem Ipsum(dolor) { [↵ ] sit amet; [↵←]} | So in summary, it would do this when pressing enter:
- ...insert the exact same amount of indentation as the previous line had
- ...and only whitespace exists on the line, remove that whitespace and insert an enter
##Other keys triggering default behaviour I'd like to suggest using either alt+shift or ctrl+alt the esc key instead of ctrl. It would happen a lot less that people would use esc without actually meaning to do this. The ctrl key is used a lot in other situations, such as copy/pasting, backspacing full words, etc. In those situations where you use ctrl it might happen (and does regularly happen) that you press the ctrl key without actually intending to trigger the white-out.