Vim script

You can find a vim script in kdesdk/scripts/kde-devel-vim.vim that helps you to keep the coding style correct. In addition to defaulting to the kdelibs coding style it will automatically use the correct style for Solid and kdepim code. If you want to add rules for other projects feel free to add them in the SetCodingStyle function.

To use the script, include it in your ~/.vimrc like this:
source /path/to/kde/sources/kdesdk/scripts/kde-devel-vim.vim

Document started by Urs Wolfer. Some parts of this document have been adopted from the Qt Coding Style document posted by Zack Rusin on kde-core-devel.