Automatic Comments

Never forget where a snippet came from

In the past, you would search for some code on the web or your personal snippet collection, copy and paste it into your application and forget about it. Months later, when you needed to change something, it was difficult to figure out where it came from. And if your working on a shared code base, trying to figure out who inserted it.


Now Snip-It Pro can automatically comment your snippets when you use them in the language they are coded for. The following types of comments can be toggled on and off in the options menu:


  • Comment Snippet ID (Guid) - All new snippets are now tagged with a Guid that can be used for search purposes. When this is checked, a comment with the current snippet ID will automatically be inserted above your code snippet when you drag drag drop or copy paste from the snippet toolbar.
  • Comment Reference Url - If the snippet has a reference url and this option is enabled, a comment with that reference url will be automatically inserted.
  • Comment User - If this option is checked, the current windows user ID will be automatically inserted as a comment.
  • Comment Date - If this option is checked, the current date will automatically be inserted as a date time.

Here is a screenshot of the Options menu:


Toggle the Automatic Commenting features to add tracability to your code snippets when they are inserted into your code base.

click to enlarge


Notice the "Disable Auto Comments" checkbox in the detail tab of the snippet. If you don't want a specific snippet to be auto commented, you can check this checkbox and that snippet will never get automatic comments. Here you can see a snippet dragged into Text pad with all four auto comment options enabled.



When Automatic Commenting is turned on, Snip-It Pro can automatically insert four different types of comments above your snippet.

click to enlarge


In order for auto commenting to work, you must classify your snippet with one of the many languages we support. If you enable auto commenting for Reference Urls, a snippet must have a reference url specified. Another feature in Snip-It Pro that compliments this functionality, is that when you drag text from any web browser to create a snippet, Snip-It Pro automatically populates the reference url feature with the url of the page from which the text was copied.