You have probably noticed that the available vim plugins do not provide
robust support for automatic indentation of Swift code. The most complete
vim plugin appears to be the one here:
I found that its indentation script would frequently get confused, though.
Therefore, it seemed necessary for me to create a new indentation script.
Mine is configurable and (appears to be) extremely robust. My script is
Unfortunately, I cannot distribute my script as a standalone plugin because
it depends upon syntax highlighting support, which I have not
re-implemented (nor do I plan to re-implement it at this point in time).
If any of you have advice on how to distribute my script so that it can be
easily installed, please let me know. For now, you will have to copy my
file into the location `.../indent/swift.vim` within the plugin I mentioned
above. (I suspect it will also work with the vim plugin supplied in the
Swift source tree, although you will have to add the `indent` directory