Skip to content

Configuration Examples

Nigel Scott edited this page Oct 29, 2019 · 4 revisions

Regexs for various languages

If you are modifying the settings directly in settings.json you'll need to escape the backslashes, as shown in these examples. If you are using the setting GUI, you only need one backslash.


"todo-tree.regex.regex": "(//|#|<!--|/\\*|^\\s*\\*)\\s*($TAGS)"

It will match

  • //
  • #
  • <!--
  • /*,
  • * (for JSDoc)

Also works with JS, BASH, PHP, HTML, CSS, MD, JSON, XML.

Ocaml (and other ML languages using (* comment *) style comments)

"todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|\\(\\*)\\s*($TAGS)"


"todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|\\(\\*|--)\\s*($TAGS)"


To match standard @todo tags:

"todo-tree.regex.regex": "(//|#|<!--|;|/?\\*|^)\\s*($TAGS)",
"todo-tree.general.tags": [


A useful exclude globs list:

"todo-tree.filtering.excludeGlobs": [
Clone this wiki locally
You can’t perform that action at this time.