Skip to content

suterma/CopyForReview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CopyForReview

License GitHub All Releases Release Language

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.

How to use it

  1. Select code
  2. Press CTRL+R, CTRL+C
  3. Select the format (output goes to the clipboard)
  4. Paste

Install it directly from the Visual Studio Gallery.

Custom template format

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.

About

A Visual Studio extension for formatted copying of code snippets

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages