[Github-comments] [geany/geany] Syntax highlighting for block segments "turned off" by preprocessing directives (#1047)

gszpetkowski notifications at xxxxx
Sun May 29 12:29:41 UTC 2016


This is feature enhacement issue to differentiate code segments written in C/C++, when they are turned off by preprocessing directive such as `#if`, `#ifdef`, `#ifndef`, etc. An example may look like:

```
#if 0 /* code temporally turned off */
	int Values[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
	size_t Counter = std::end(Values) - std::begin(Values);
	int n = 5; /* number of items per column to display */

	for (int k = 0; k < Counter; k++)
		cout << Values[k] << " " << (((k+1) % n) ? ' ' : '\n');
#endif
```

This feature is already supported by Vim, Visual C++, Clion and Gedit, Pluma, among others. thus I think it is worth to implement. I particularly like the VC++ 2015's behavior, which is to use the same colors as normal, but with lower contrast (i.e. they are faded).

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1047
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160529/c2e72a9a/attachment.html>


More information about the Github-comments mailing list