Like many programmers, I use the following markers to document my code: # XXX # TODO # DEBUG (whereas the leading comment character depends on the respective language)
Can these markers be highlighted to make them more salient?
On Sat, 13 Sep 2008 14:07:01 +0000 (UTC), AC gmane.0vd@gishpuppy.com wrote:
Like many programmers, I use the following markers to document my code: # XXX # TODO # DEBUG (whereas the leading comment character depends on the respective language)
Can these markers be highlighted to make them more salient?
Not really. For C/C++/Java you can add/modify the keywords in the 'docComment' setting in filetypes.[c|cpp|java|...].
These keywords are highlighted in such filetypes in documetation comments, e.g. /** @todo something we should do */ the prefixed '@' sign is necessary.
But currently there is no generic solution for this.
There could be a plugin to do something like this, e.g. by setting an indicator on such words, like a green or yellow underline or something else.
Regards, Enrico
currently there is no generic solution for this. There could be a plugin to do something like this, e.g. by setting an indicator on such words, like a green or yellow underline or something else.
Is there any chance of there being such a setting in the foreseeable future? If not, how complicated would it be to create such a plugin (I hardly know any C/C++)?
On Thu, 18 Sep 2008 18:28:39 +0000 (UTC), AC gmane.0vd@gishpuppy.com wrote:
currently there is no generic solution for this. There could be a plugin to do something like this, e.g. by setting an indicator on such words, like a green or yellow underline or something else.
Is there any chance of there being such a setting in the foreseeable
I'm not sure. I won't work on it but maybe someone else likes to do.
future? If not, how complicated would it be to create such a plugin (I hardly know any C/C++)?
It depends. Obviously, it would be much easier if you know C and if you are familiar with the GTK API. But if you are encouraged enough, it probably can be done also without deep knowledge of APIs.
You could have look at the spellcheck plugin, which does a similar job: reading all the text from a document and pass every word to the spellcheck engine. Your plugin simply would check every word if it is 'TODO', 'DEBUG', 'XXX' or anything else from a configurable list and then trigger an action (e.g. setting an indicator). It's not that hard after all, just need to be done.
IIRC the plugin wishlist on the website already contains such a wish, so if it would be realised, you would make other people happy as well :).
Regards, Enrico
You could have look at the spellcheck plugin, which does a similar job
The code* looks pretty arcane to me - I'm afraid can't really make sense of it. I'll take another look later, but I'm not very hopeful...
* http://tinyurl.com/4dtw7s (https://geany-plugins.svn.sourceforge.net/svnroot/geany-plugins/trunk/spellc... src/spellcheck.c)