Menu

#773 Highlight todo comments that start with a space

None
closed
nobody
1
2015-05-20
2014-09-26
Danio
No

Currently, in order to have a comment recognized as a todo note you need to type TODO immediately after the % sign, as such:

%TODO: Fix this.

I like to have a space after starting a comment, so too I would like it if todo notes were highlighted if they were preceded by a space, like this:

% TODO: Fix me.

If you can point me in the right direction I might be able to do this myself and submit a patch if that's easier for you.

Discussion

  • Benito van der Zander

    If you can point me in the right direction I might be able to do this myself and submit a patch if that's easier for you.

    There is a file tex.qnfa in the source, which defines all syntax highlighting. Now there is a normal comment environment starting with % and a special environment starting with %TODO. Guess you need to add a new environment starting with TODO as sub environment of the comment environment.

    (that only affects highlighting of the todo comments, not their listing in the structure overview)

    Not sure if we want to allow the version with a space.

     
  • Tim Hoffmann

    Tim Hoffmann - 2015-05-20

    implemented: hg 5150 (5906006d023f)

    Even more: you can now use arbitrary capitalized words, e.g. % FIXME, % ASK. And if that's not enough, the pattern can be adjusted using a user-defined language definition file (.qnfa). This does now also affect the listing in the structure view.

     
  • Tim Hoffmann

    Tim Hoffmann - 2015-05-20
    • status: open --> closed
    • Group: -->
     

Anonymous
Anonymous

Add attachments
Cancel