Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: DFO on July 23, 2014, 03:36:32 am
-
I enjoy using Code::Blocks but what it lacks is a full-scale structural highlight plugin, as on the picture below:
(http://i.stack.imgur.com/CYfh1.gif)
I wonder if there's any solution or any development in this field?
I believe it would be beneficial for the project, because so many popular IDE (Visual Studio, Intellij Idea etc) have this feature either with help of plug-ins or even out of the box. Naturally, having such a feature in Code::Blocks would draw more attention to the project from those who are used to such a highlighting.
-
We're using Scintilla for our code-editor component and I don't think Scintilla supports this at the moment.
BTW: Are you talking about the purple brackets around if/esle clauses. Keep in mind that we've might not seen this feature in action, so we need clearer explanation how it works.
-
Yes, that and orange brackets enclosing "else" blocks.
-
The orange lines are called indent guides and I think they are available...
-
Hi oBFusCATed, you said it's available but you clarify more how to enable it? I have check the editor for indent guides and did not see an option for it. Thanks.
-
Isn't that STYLE_INDENTGUIDE ?
Yves
-
See attachment on how these indent guides look like. I hacked this temporarily in a plugin to see how it would look like: I only added 2 lines of code: set the color and activate
I searched the codeblocks source code but could not find code that activates this feature.
It's not so hard to add I think.
Yves
-
Hi oBFusCATed, you said it's available but you clarify more how to enable it? I have check the editor for indent guides and did not see an option for it. Thanks.
Settings ->Editor -> General settings -> Editor settings -> Show indentation guides
-
Hi oBFusCATed, you said it's available but you clarify more how to enable it? I have check the editor for indent guides and did not see an option for it. Thanks.
Settings ->Editor -> General settings -> Editor settings -> Show indentation guides
Can we also configure its colour trough the GUI ?
Yves
-
Don't know. If it is possible in scintilla then it can be made configurable in the UI.
Edit:
SCI_SETINDENTATIONGUIDES(int indentView)
SCI_GETINDENTATIONGUIDES → int
Indentation guides are dotted vertical lines that appear within indentation white space every indent size columns. They make it easy to see which constructs line up especially when they extend over multiple pages. Style STYLE_INDENTGUIDE (37) is used to specify the foreground and background colour of the indentation guides.
Patches welcome. Make sure to use the cbColourManager.