News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

structural highlighting

Started by DFO, July 23, 2014, 03:36:32 AM

Previous topic - Next topic

DFO

I enjoy using Code::Blocks but what it lacks is a full-scale structural highlight plugin, as on the picture below:

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.

oBFusCATed

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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

DFO

Yes, that and orange brackets enclosing "else" blocks.

oBFusCATed

The orange lines are called indent guides and I think they are available...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

extremefishandchip

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.

yvesdm3000

Isn't that STYLE_INDENTGUIDE ?

Yves
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

yvesdm3000

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
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

oBFusCATed

Quote from: extremefishandchip on December 16, 2016, 07:01:19 AM
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
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

yvesdm3000

Quote from: oBFusCATed on December 16, 2016, 09:14:13 AM
Quote from: extremefishandchip on December 16, 2016, 07:01:19 AM
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
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

oBFusCATed

#9
Don't know. If it is possible in scintilla then it can be made configurable in the UI.

Edit:
Quote
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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]