引言

一开始,我只是想找一个能够跳转,或者标记行的插件,让我在比较长的代码中找到想要的东西,,,在试过bookmark,todo hightlight ,等类似的东西后,发现这东西(todo-tree)是真的神奇,非常适合我啊.必须要推过一波.

介绍

**先来,介绍下它的基本功能把.
首先,是一个高亮的功能,初始的话,只支持TODO,和FIXME两个标记

image.png
其次是资源管理器侧边栏上的一个小栏目,通过点击对象,可以跳转到对应的位置.
image.png
但是,这款插件可以配置的地方非常关键,它可以配置需要高亮的标签名,可以配置标签的高亮方式,图标,还可以配置滚动条上显示的色块.标签排列方式等等.

先看下我配置出的效果.

  1. // todo: 123
  2. // fix: 123
  3. // tag: 123
  4. // done: 123
  5. // note: 2312
  6. /**
  7. * todo: 324324
  8. * fix: 234
  9. * tag:213
  10. * done: 213
  11. * note: 324
  12. */

image.png
使用感觉瞬间就提升了.其他的todo hightlight或者是bookmarks简直弱爆了啊…

这种好用的插件必须要支持起来.
文末附上插件链接,还有github项目地址
插件链接
GitHub todo-tree
顺便贴下我的配置,有兴趣可以根据其介绍页面自己配置下.

  1. //todo-tree settings
  2. // 在注释中搜索以 * // ,# ,; ,开头的标签! -- / *
  3. "todo-tree.regex.regex": "((\\*|//|#|<!--|;|/\\*|^)\\s*($TAGS):|^\\s*- \\[ \\])",
  4. "todo-tree.general.tags": [
  5. "todo",
  6. "tag",
  7. "done",
  8. "note",
  9. "fix"
  10. ],
  11. "todo-tree.regex.regexCaseSensitive": false,
  12. "todo-tree.tree.showInExplorer": true,
  13. "todo-tree.highlights.defaultHighlight": {
  14. /* "foreground": "white",
  15. "background": "yellow",
  16. "icon": "check",
  17. "rulerColour": "yellow", */
  18. "type": "tag",
  19. /* "iconColour": "yellow" */
  20. },
  21. "todo-tree.highlights.customHighlight": {
  22. "todo": {
  23. "foreground": "#f90",
  24. "rulerColour": "#f90",
  25. "iconColour": "#f90",
  26. },
  27. "done": {
  28. "icon": "issue-closed",
  29. "foreground": "#fdff03",
  30. "rulerColour": "#fdff03",
  31. "iconColour": "#fdff03"
  32. },
  33. "fix": {
  34. "icon": "beaker",
  35. "foreground": "#fb0200",
  36. "rulerColour": "#fb0200",
  37. "iconColour": "#fb0200",
  38. "rulerLane": "full"
  39. },
  40. "tag": {
  41. "icon": "tag",
  42. "foreground": "#67cdfe",
  43. "rulerColour": "#67cdfe",
  44. "iconColour": "#67cdfe",
  45. "rulerLane": "full"
  46. },
  47. "note": {
  48. "foreground": "#02dc00",
  49. "icon": "note",
  50. "rulerColour": "#02dc00",
  51. "iconColour ": "#02dc00"
  52. }
  53. },