[TOC] #### 1. 插件介绍 --- [点击打开 Todo Tree 插件网站](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree) 官方介绍:这个扩展可以快速搜索工作区中的注释标签,并将它们显示在活动栏的树状图中 我们写代码的时候,难免会遇到一些情况需要标记或搁置,比如:前端开发者在编写页面的时候页面样式完成了,但是后端接口还没有开发完成,那么该页面和后端的交互就要暂时搁置,此时我们可以添加一个特殊的注释来表示,方便接口开发完成后再来开发时快速定位到这个页面,这个插件就是来完成这个功能的,是一个很实用的插件 | 类型 | 描述 | | ------------ | ------------ | | TODO | 功能未完成 | | BUG | 标记 BUG | | HACK | 未来可能会更改 | | FIXME | 标记一些需要修复的位置 | | XXX | 标记草率实现的地方 | #### 2. 插件配置 --- | 配置 | 描述 | | ------------ | ------------ | | todo-tree.general.tags | 自定义注释标签 | | todo-tree.general.revealBehaviour | 从侧边栏中选择待办事项时光标的位置 | | todo-tree.regex.regexCaseSensitive | 使用区分大小写的正则表达式 | | todo-tree.tree.showCountsInTree | 在树状图中显示待办事项的数目 | | todo-tree.highlights.enabled | 突出显示 | | todo-tree.filtering.excludeGlobs | 忽略某些文件夹不被监听 | 下面最常用的几个配置项的默认值: ```json { "todo-tree.general.tags": [ "BUG", "HACK", "FIXME", "TODO", "XXX", "[ ]", "[x]" ], "todo-tree.highlights.enabled": true, "todo-tree.tree.showCountsInTree": false, "todo-tree.regex.regexCaseSensitive": true, "todo-tree.general.revealBehaviour": "start of todo" } ``` 我的配置 ```json { // Todo Tree 待办事项 "todo-tree.highlights.customHighlight": { "bug": { "icon": "bug", "type": "line", "iconColour": "#e52021" }, "暂无接口": { "icon": "info", "type": "line", "iconColour": "#e4b21d" } }, "todo-tree.general.tags": [ "bug", "todo", "暂无接口" ], "todo-tree.highlights.enabled": false, "todo-tree.tree.showCountsInTree": true, "todo-tree.regex.regexCaseSensitive": false, "todo-tree.general.revealBehaviour": "end of todo", } ```