When writing code for Kile, it should be formatted as illustrated through the following code snippets: unsigned int Manager::findFreeID(const QMap& takenIDMap, unsigned int maxID) { if(takenIDMap.size() == 0) { return 0; } // maxID should have a real meaning now for(unsigned int i = 0; i < maxID; ++i) { if(takenIDMap.find(i) == takenIDMap.end()) { return i; } } return (maxID + 1); } void Manager::writeIDs() { KConfigGroup configGroup = m_config->group("Scripts"); //delete old entries QList idList = configGroup.readEntry("IDs", QList()); for(QList::iterator i = idList.begin(); i != idList.end(); ++i) { configGroup.deleteEntry("Script" + QString::number(*i)); } //write new ones idList.clear(); for(QMap::iterator i = m_idScriptMap.begin(); i != m_idScriptMap.end(); ++i) { unsigned int id = i.key(); idList.push_back(id); configGroup.writePathEntry("Script" + QString::number(id), (*i)->getFileName()); } configGroup.writeEntry("IDs", idList); } QPair pair = m_kileInfo->editorKeySequenceManager()->checkSequence(value, oldSequence); if(pair.first == 0) { m_kileInfo->scriptManager()->setEditorKeySequence(script, value); } KileEditorKeySequence::Action *action = m_kileInfo->editorKeySequenceManager()->getAction(pair.second); QString description = (!action) ? QString() : action->getDescription(); switch(pair.first) { case 1: <...> return; case 2: <...> return; case 3: <...> return; } The key points are that tabs are used for indentation, opening curly brackets follow on the same line (except for function declarations), and function arguments are separated by spaces. Please feel free to ask on the kile-devel mailing list for further explanations!