This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Currly braces always go to beginning of line

Tags: None
(comma "," separated)
pmalinowski
Registered Member
Posts
3
Karma
0
Hi,

I am running Kdevelop 5.2.0 on Linux Mint 18.1 64 bit. When editing c++, whenever I go to a new blank line and type in one curly brace '{' (the other brace is auto-completed) for something like the body of a function or the code after an if-statement, the pair of braces immediately goes to the beginning of a line regardless of my indentation level before. I have tried to change some settings in the code formatter and the settings in the indentation options, but none of these have helped. How can I resolve this issue so that I don't have to keep repeatedly manually indenting my code to the correct place?

--Update--:

Whenever I have 'Enable automatic brackets' enabled, this does not happen (the curly brace does not go to the beginning of the current line).
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Which indenter do you use?


I'm working on the KDevelop IDE.
pmalinowski
Registered Member
Posts
3
Karma
0
I don't know what you mean. However, if you mean which indenting character I use, I have tried will all the three options: Tabulators, Spaces and both Tabulators and spaces. Neither of these options solve my problem.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
It's in the settings, under Editor -> Editing -> Indentation. Try F7 -> type "set-indent-mode cstyle" -> press enter, is the issue gone then?


I'm working on the KDevelop IDE.
pmalinowski
Registered Member
Posts
3
Karma
0
This time, the curly braces go back an indentation level instead of the beginning of the line. But it's still less annoying than before.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Hm well, that is what the cstyle indenter is supposed to do. If you do not like this behaviour, you can use either the Normal indenter (always keeps the previous indent) or the None indenter (no auto-indent behaviour at all, i.e. new lines always start at column 0). Probably you used the strange "cpp / boost style" indenter before, can you look that up?


I'm working on the KDevelop IDE.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]