如何在Resharper 8中获得多行TODO

DRo*_*rtE 15 resharper

我试图弄清楚如何将选项中的正则表达式 - >重新合并中的待办事项更改为颜色代码,并允许在待办事项中使用多行.

有任何想法吗?

DRo*_*rtE 26

我想出了答案,比我想象的要容易

在resharper中的待办事项的原始正则表达式(?<=\W | ^)(?TODO)(\ W | $)(.*)

使用正则表达式可以做到这一点......

进入Resharper - >选项 - >待办事项并将现有的正则表达式更改为

(?s)(?<=\W|^)(?<TAG>TODO)(\W|$)(.*)
Run Code Online (Sandbox Code Playgroud)

(?s)选项允许mutliline TODO

待办事项的格式是

        /* TODO: a Multiline
         * to do list must use the block comment style
         * though it will appear spaced out in the To-do explorer
         * it will color code it all correctly
         */
Run Code Online (Sandbox Code Playgroud)