rStudio中的TODO注释 [英] TODO comments in rStudio
问题描述
是否可以在rstudio中列出待办事项?
在我使用eclipse之前,我真的很喜欢在源代码中添加一些# TODO I definitely need more unit tests here!
注释.
is there a way to list ToDo comments in rstudio?
Before I used eclipse and really loved to put some # TODO I definitely need more unit tests here!
comments in my source code.
到目前为止,我在rStudio中找不到此功能,我想知道是否有类似插件之类的东西,或者是搜索此类注释的简便方法.
I could not find this feature in rStudio so far and I was wondering, if there is something like a plugin or maybe an easy way of searching such comments.
推荐答案
RStudio中没有这样的系统,但是有一种简单的搜索注释的方法.这样做:
There is no such system in RStudio, but there is an easy way of searching for the comments. Do this:
- 转到编辑"->在文件中查找"
- 勾选正则表达式"复选框
- 输入以下正则表达式:
^\s*# TODO
- 点击查找
- Go to Edit -> Find in Files
- Tick the checkbox "Regular Expression"
- Enter the following regular expression:
^\s*# TODO
- Click Find
该正则表达式将匹配以# TODO
开头的任何行.
That regular expression will match any line that starts with # TODO
.
这篇关于rStudio中的TODO注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!