I would like to request enabling the Tab key to insert 4 spaces
, just like Ctrl+K does, but for multiple levels of code. That would make it a lot easier to write small bits of code when needed, without having to press Space 4 times for each line of code for proper indentation.
I am aware there are also SO users who use the Tab key for navigation, to make it easier to submit the question by tabbing to the submit button, so I understand it is not added as a global feature. It would be nice to be able to enable it in the preferences though.
The features I'd like to request when this option is enabled would be:
- inserting
4 spaces
when pressing Tab - inserting the same amount of whitespace as the current line when pressing Enter
- unless the current line only contains whitespace
- removing
4 spaces
behind the caret when pressing Shift+Tab - the same functionality as Ctrl+K when pressing tab on highlighted areas, except indentation will only increase
- same as above, but for Shift+Tab where indentation will only decrease
- backspace will remove up to
4 spaces
when the caret is at the start of the line (same as Shift+Tab when at the start of the line) - and optionally:
- pressing Home moves the caret in front of the first non-whitespace character on that line
- pressing Home again will toggle between the actual start of the line, and the first non-whitespace character on the line
I hope I'm not the only one who would like to be able to press Tab to indent code, like I do in editors. Also, since this is an opt-in feature, it wouldn't change anything about the current interface, so I think there is no harm in adding this.
<textarea>
with that kind of features, especially if that means random selection and navigation issues (yes, I'm looking at you, jsFiddle).