SQL mode has some cool stuff set up for indenting with aligned keywords and such. Normally, I'd think it was cool. The problem is that at my new job, the people who wrote our mountains of sql did not have this set up, and just indented sql 4 spaces.
I could bully them all into switching to emacs, but that's more of a long term project. In the short term, I want to make emacs indent sql in the stupid way lesser editors do it: 4 spaces, more or less ignorant of context. How would I do this?
A so-so solution is to create a mode hook with
(setq indent-line-function 'tab-to-tab-stop). Unfortunately, this interacts badly with
indent-tabs-mode nil and the lack of a customized backspace function. What i'd really like is something straightforward that would allow bounce-indent within a few levels.
I no longer actually need this. I've just started indenting my own SQL correctly, and everyone else seems to appreciate it.