There is a nice tool called clang-format [0] that allows indenting and also formatting code. It provides plugins for vim and emacs so I wonder if it might be possible to support it in kate, too? [0] http://clang.llvm.org/docs/ClangFormat.html Reproducible: Always
you can use it already via Text Filter plugin
>houz@gmx.de 2013-10-09 11:47:34 UTC >.... As I somehow know, that you can program C++ yourself, might you want to submit some patch? ;=)
"Text Filter" does not work when only a part of the source code is selected because clang-format needs the whole file as context. Ideally, there would also be a keyboard shortcut to invoke this "Format Selection" action.
This is fixed with the "External Tools" plugin and should be closed. Selected text can be formatted using: Menu -> Tools -> External Tools -> Tools -> Clang Format Selected Text