Commentify provides the following features
- Allows users to configure custom comment templates that can be added as snippets inside their files.
- Provides a tree view of all the user's comment templates. Users can easily list the files containing comments they have added by clicking on the templates in the tree view.
Features
Users can configure multiple snippets with placeholders and choices for those placeholders. Refer to Settings for instructions on configuring these snippets.
Snippets can be conveniently inserted into the editor window by using the keyboard shortcut ⌘+K / on macOS or Ctrl+K / on Windows/Linux. Users can customize this keyboard shortcut by changing the keybinding for the commentify.insertSnippet command.
Snippets can also be inserted using the command palette.
The extension provides a tree view of users' comment snippets, displaying all the choices they have added. Clicking on an item in the tree view triggers a search for that particular comment.
Settings
This extension contributes the following settings:
commentify.snippets
: Array of snippet configurations.
Each object in the array corresponds to a snippet you want to configure. The object consists of the following properties:
Property |
Type |
Description |
name |
string |
User-friendly name to identify the snippet. |
template |
string |
Comment template that gets inserted. May have placeholders inside ${} . Placeholders can only contains - alpha-numeric characters
- hyphen ( - )
- underscore ( _ )
|
choices |
Object |
Object that contains the array of choices for each placeholder. Any placeholders skipped will not be offered any choices. |
insertToTop |
boolean |
Inserts comment to the top of file instead of the line above. Default: false |
A sample configuration is shown below for reference:
{
"commentify.snippets": [
{
"name": "Insert to Top of file",
"template": "${prefix}: ${description}",
"choices": {
"prefix": ["FIXME", "TODO", "HACK", "NOTE", "DEBUG", "REVIEW"]
},
"insertToTop": true
},
{
"name": "Default Configuration",
"template": "${prefix}: ${description}",
"choices": {
"prefix": ["FIXME", "TODO", "HACK", "NOTE", "DEBUG", "REVIEW"]
}
}
]
}
Known Issues
- Lacks support for snippet insertion through vscode text completion.
- Lacks support for Non-English users.
Release Notes
Check CHANGELOG.md for details.
Special Thanks To The Co-Author
LICENSE
This extension is licensed under the MIT License