CopyForReview is a Visual Studio Extension that allows to copy code with a formatting. It removes unecessary whitespace, adds file, class, method and line info, suitable for sharing code or writing code reviews. Five output formats are currently supported: Text, Send via Email, Stack Overflow Markdown, Foswiki Markup and a customizable formatter.
- Select code
- Press CTRL+R, CTRL+C
- Select the format (output goes to the clipboard)
- Paste
Install it directly from the Visual Studio Gallery.
The templates use the liquid markup. The default custom formatter shows how you can use the various supported fields:
-
DeindentedSelectedText The selected text, with the indentation removed as much as possible.
-
FullFilename The the full filename, with path and extension.
-
Filename The filename, without path.
-
LineNumberTop The line number of the topmost line.
-
LineNumberBottom The line number of the bottommost line.
-
FullClassname The fully qualified class name where the snippet is in (if any).
-
Methodname The method name where the snippet is in (if any).
-
Lines The individual code lines of the snippet.
-
DeindentedLines The individual code lines of the snippet with the indentation removed as much as possible.
-
SelectedText The selected text.
-
FileExtension The file extension.
Feedback is highly welcome. Please email to mail@marcelsuter.ch. Contribute, review, comment on GitHub.