Is it possible to use multi-line todo in IntelliJ IDEA 13?

If so, how?

If not, is there a way around these features?

EDIT:

What I mean is something like this:

// TODO line1 // line2 // line3 

and line1, line2, line 3 refer to the same TODO and , highlighted in blue.

+47
intellij-idea todo
Feb 27 '14 at 11:17
source share
4 answers

No, not yet.

This feature has been discussed , but not yet implemented.

+26
Aug 04 '14 at 11:49 on
source share

In my settings, I use this regular expression for multi-line TODO:

 \/(\/|\*)[ ]*\btodo\b(.|\n)*(\*\/|) 

The only problem is that it does not highlight the last * / characters of the multi-line comment. If anyone can solve this, it will be great!

+19
May 7 '15 at 11:54
source share

Based on NonGrate answer:

Go to settings, find the TODO settings and replace the existing todo entry " \ btodo \ b. * " With:

 (\btodo\b.*)|(\/\*(\*(?!\/)|[^*])*\btodo\b(\*(?!\/)|[^*])*\*\/) 

Result:

enter image description here

You must use * / to close the selection.

It uses 2 patterns:

  • (\ btodo \ b.) commits any string with the word todo
  • (/ \ * (\ * (/) | ?! [^ *]) * \ Btodo \ b (\ * (/) | ?! [^ *] * \ * /) captures multi-line comments starting with / * and ending in * /

Any other combinations may not work.

Note. You must replace the existing regular expression to avoid multiple instances of the same todo in the task list.

+4
May 30 '17 at 12:03 a.m.
source share

Do you mean this? using-todo-lists

 /** * todo multi-line * */ 
+3
May 30 '14 at 14:03
source share



All Articles