Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highlight // TODO in XCode

XCode 4 recognizes comments like // TODO: comment or // FIXME: comment and displays it in the Class overview drop-down.

Is there the possibility to highlight // TODO with a bright color in the source code, so one can quickly find open TODOs?

like image 286
hgbnerd Avatar asked May 18 '11 20:05

hgbnerd


People also ask

How do I mark a todo in Xcode?

Adding a TODO You could use a simple comment, but it's very easy to forget about tat comment. A much better solution is adding a TODO comment. Xcode has built-in support for this. You add a comment and start it with the keyword TODO.

How do you add a TODO comment in Swift?

Add a heading: Insert a comment with the prefix MARK:. For example: // MARK: [your section heading]. Add a separator line: To add a separator above an annotation, add a hyphen (-) before the comment portion of the annotation.


2 Answers

You may be able to edit the syntax highlighting definitions to do this, I am not sure though.

But here is a solution that will make your TODOs and FIXMEs show up as warnings when you build.

like image 96
Chris Wagner Avatar answered Oct 21 '22 11:10

Chris Wagner


Use #warning keyword in your code.

like image 20
boweidmann Avatar answered Oct 21 '22 11:10

boweidmann