There is an option to have the tab key indent code. I can't recall which version of BBEdit this feature was added in, but it can be enabled in the Keyboard preferences ("Allow Tab key to indent text blocks").
Sorry, this is not at all what I want. When I'm editing code in a language with curly braces, there is exactly one correct place for a line of code to be indented. In emacs, pressing tab puts my line of code in the right place. In BBEdit, it just inserts a tab.
I see what you're saying. That would indeed be a useful feature; I don't believe I've used an editor with such functionality (unless there's a shortcut in vim that does it?).