Source Insight //TODO comment

2019-05-20 09:16发布

问题:

a bit silly, but it is driving me crazy, i recently started working with Source Insight, and in order to get a proper looking //TODO - comment you need to write // TODO (with an extra space).

i tried looking around the config for a way to remove this extra space, couldn't find it, and cant get used to writing it with the extra space (i tried).

any way to solve this? or should i embrace this, and then slowly, learn to cherish it.

Thank you.

回答1:

  • Go to Options->Style Properties
  • Add a new Style for your "todo" comments, set its properties to be whatever you like
  • Go to Options->Document Options
  • Click on "Language" button in Parsing section
  • Select appropriate language (C? C++?)
  • Click "Properties"
  • Change to "Comments and Ranges" tab
  • Click "Add new definition"
  • Set formatting style to match the new one you created above
  • For "range begins with" put "//todo" (perhaps one for each type of capitalisation)
  • Click ok x 3
  • Yes to "Reparse project"
  • Click close

It should now be showing up properly!