rStudio中的TODO注释 [英] TODO comments in rStudio

查看:190
本文介绍了rStudio中的TODO注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在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:

  1. 转到编辑"->在文件中查找"
  2. 勾选正则表达式"复选框
  3. 输入以下正则表达式:^\s*# TODO
  4. 点击查找
  1. Go to Edit -> Find in Files
  2. Tick the checkbox "Regular Expression"
  3. Enter the following regular expression: ^\s*# TODO
  4. Click Find

该正则表达式将匹配以# TODO开头的任何行.

That regular expression will match any line that starts with # TODO.

这篇关于rStudio中的TODO注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆