Created attachment 107146 [details] Sample C++ code showing explained behaviour KDevelop inserts whitespace that is incredibly annoying while trying to be "helpful". See attachment for undesired and desired behaviour. By entering the comment on line 6 or at the end of any other line with code, the comment was moved immediately to the 60th column. This behaviour only appears with C++ style comments and not with C style comments. There are no apparent options in Editor/Editing/Indentation, Source Formatter, or Language Support to disable or edit this behaviour. Other such instances of KDevelop automatically inserting characters or whitespace with no way to disable or edit it include namespace operator, stream operators, and comma operator. Instances of this behaviour being helpful include aligning new line continuations in macro definitions, but again there are no options to disable or edit it.
In Settings -> Configure -> Editor -> Editing -> Indentation, what is the Default Indent mode?
Default indentation mode: Normal Indent using: Spaces, tab and indentation width 4 characters. Indentation properties: Keep extra spaces and adjust indentation both unchecked. Indentation actions: Backspace key checked, increase indentation level if in leading blank space. The behaviour is still there even in other indentation modes, although I only tested None, Normal, ada, CMake, C++/boost Style, C Style, and XML Style.
Hmm, can you make sure you use the C indenter by pressing F7 and typing "set-indent-mode cstyle"? This sounds strange ...
Setting the indentation mode via that command changes to the preferred behaviour for a single file. Setting the indentation mode in Editor -> Open/Save for a Sources/C++ filetype with extension .hpp or .cpp to Use Default with default set to C Style, or C Style does not change the indentation mode of either a currently open file or a previously opened file, but does for a newly created file.
Hm, so, is your issue solved ...?
I wouldn't call it solved, just different to what I thought it was though deserving of a different issue.
Let me rephrase it, if you set the indenter to the cstyle indenter (which is the default) does it behave like you would expect it to?
Yeah, the indentation mode is what I expect in C Style.
Ok, I'll take this as a data point that the C++ indenter should just be removed / renamed ;)
FTR, a discussion was triggered on kwrite-devel: https://marc.info/?l=kwrite-devel&m=150227339428208&w=2