Hermes Comments is a simple visual studio extension that I created to help structure C and C++ code (and other languages using // and /**/ comments). It's purpose is to automate the creation of more visually complex comments to structure and document code.
Using shortcuts you can now turn a selected text into one of three possible formats, centered, left justified or subsection.
Left justified section titles:
Centered section titles:
Subsection titles:
To create a complex comment all you need is to highlight the desired text and use one of the shortcuts.
Support for modifying pre-existing comments
Separator bar to help distinguish important breaks in the code
The separator bar, created with
alt+shift+;
(; is the actual ';' key)
The shortcuts are:
alt+shit+p
Creates a centered titlealt+shift+l
Creates a left justified titlealt+shift+o
Creates a subtitlealt+shift+;
Creates a separator line
You can decide which characters will be used to create the comments using the settings, just copy paste the following lines into your settings.json file:
"hermes-comments.maximum": 50,
"hermes-comments.fill": "-",
"hermes-comments.frame": "^",
"hermes-comments.title": "`",
"hermes-comments.separator": "$",
maximum
is the maximum level of alignment , i.e the horizontal width of a title.
fill
is the character used to fill the empty space in a frame.
When a comment contains the special characters @
or \
the frame is different.
title
defines the character used for Doxygen documented frames.
separator
defines the character used for the separator bar.
It won't handle comments whose length is bigger than the maximum length of characters (90 by default).
None more known, please report bugs, issues and feature requests to the github repository.
- Modified the way the special comments are generated to prevent them from messing the Doxygen documentation.
- Corrected a bug where spacing lines would get deleted
- Added support for pre-existing comments.
- Added the option to customize the characters used to make a frame.
- Added a special frame that is created for comments containing the word
author
Initial release of hermes comments
Enjoy!