Registered Member
|
Hi
I started using KDevelop for C/C++, but it does some weird autocompletion things that I can't find in the settings menus or documentation. 1. When I type // for an inline comment, it puts a bunch of spaces before the comment, presumably to make the comments line up, but I don't want to do this / want to do it manually where possible. It's really annoying actually because even if I delete the spacing, as soon as I type a comment containing spaces, the spacing comes back, sometimes wrapping onto a new line, so I have basically no way to type or edit an inline comment. 2. When I type //, it adds a space after the comment marker. 3. When I type << at the start of a line (continuing the previous line) it deletes all the indentation before the << for some reason. It does this for a couple other markers. 4. When I start a new line, sometimes the editor will put a space or two after the indentation for no apparent reason, and I have to backspace it. For example, it puts one space if I start a new line after typing a {. I can't find these settings in autocomplete settings, indentation settings, or source formatting settings. How do I disable these features? I'm sure they must be useful for some, but they are getting in my way. |
Registered Member
|
Ok, I figured out that it's due to the "indentation mode" being C++/boost style. But I still want to know if there's any way to customize the indentation behaviour beyond just changing the mode, or are the modes fixed?
|
Registered Member
|
KDevelop use KatePart as editor component. I don't know in which file the indetation is defined, but you may try to change the indentation behavior with document variables. Go into settings for editor, select Open/Save and then select tab Modes & Filetypes. Here you can select the indentation you like or/and add document variables.
|
Registered Member
|
I came to this forum because I cannot change the indent from 4 spaces - I want 2 spaces.
I have used the following paths to no effect Settings -> Configure KDevelop -> Language C, Source Formatter Artistic, ANSI Settings -> Configure KDevelop -> Editing , Indentation Normal, spaces 2 I have also tried Settings -> Configure KDevelop -> Editing, Open/Save Sources/C++, Indentation normal (I notice on that form it has variables kate:) What else can I do to get a two space tab/indent in the ANSI style? Edit I am using 5.5.2 in an appimage |
Global Moderator
|
Go to "Settings -> Configure KDevelop -> Editing -> Indentation", set "Indent using: Spaces, Indent Width: 2". That certainly works. Try it in a new file.
If not, please post an example source code file -- maybe it has a kate modeline saying something else already?
I'm working on the KDevelop IDE.
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]