Indent PHP Switch Statements Properly With Vim
Mike GriffinI use vim as my main editor and it works great, except for one thing. Indenting switch
statements in vim. For some reason, vim seems to think that this is the right way:
But everyone knows that’s wrong. There is a simple solution though, just add
to your .vimrc
and work away without any issues. This is what happens after adding
that line:
I’ve been fighting this for so long so to finally find the solution is a huge relief. It’s amazing what you find when you break down and actually look through the documentation!