dokato / todor

TODOr - RStudio add-in for finding TODO, FIXME, CHANGED etc. comments in your code.
Other
246 stars 12 forks source link

TODOr with Rmd files #10

Closed Syntanx closed 6 years ago

Syntanx commented 6 years ago

Hi dokato - I saw reference to this package as an addin in Rstudio and think this is a great idea!

It appears this currently does not support R markdown files inside of a project. I can use it successfully with .R files in my project but not .Rmd (I haven't tested with other text-based files).

Is this functionality you intend to add in the future? I am using Rmd for writing my thesis and foresee many opportunities for likely leaving myself "todo" notes throughout the writing process and so think your tool would make a valuable addition to such a workflow.

dokato commented 6 years ago

Yeah, that's definitely something worth to add. Thanks for the idea!

dokato commented 6 years ago

@Syntanx please check the new version. Now if you set the option todor_rmd to TRUE it should search through Rmd files as well.

dokato commented 6 years ago

Hmm, on the second thought todor requires to start a line with tag from hash # which in Rmd might be interpreted as header.

Well, let's leave it like this for now. That's very specific usecase anyway.

mzakariaCERN commented 6 years ago

Great idea. I am facing the same issue with rmd. I am not sure I understand your response: How can we set todor_rmd to be TRUE? and where

dokato commented 6 years ago

Hi @mzakariaCERN. As simple as this:

> options(todor_rmd=TRUE)

But agree that I should add it to documentation.

Syntanx commented 6 years ago

Thank you for adding the functionality! Sorry for the radio silence - just swamped with the thesis really. Spent some time thinking if I could make any suggestions to the regex to allow TODO searching inside "<!--"/"-->" comments R markdown allows for in-text commenting but my regex was letting me down. If I figure something good out I'll drop it here as a suggestion.

Thanks again!

dokato commented 6 years ago

@Syntanx good idea! Following suggestion from #11 now it should work exactly this way. Let me know if you get any troubles with that.

Syntanx commented 6 years ago

@dokato Fantastic! Works without a problem. Thank you :)