Giter Site home page Giter Site logo

risadams / illuminated-comments Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mariusbancila/memefulcomments

16.0 2.0 4.0 1.23 MB

Enables displaying images, including animated GIFs, throughout source code from an <image> tag.

License: GNU General Public License v3.0

C# 100.00%
comments images visual-studio visualstudio2022 tools documentation

illuminated-comments's Introduction

Illuminated Comments

Forked from: https://github.com/mariusbancila/memefulcomments

Updated to support VS2022 64bit (no longer supports earlier versions)

Enables displaying images, including animated GIFs, throughout source code from an <image> tag.

This Visual Studio extension enables displaying images, including animated GIFs, alongside your code to enhance explanations with visuals or simply to express your reaction to the code. You can easily show your co-workers, with only a comment line, how you facepalmed yourself when you saw what they checked in recently.

The supported languages are C#, C, C++, F#, VB.NET, JavaScript, TypeScript, and Python.

All versions and editions of Visual Studio 2017 and 2019 are supported.

To display an image, either from the web or your local disk, include a tag in the source code comments. Use the url or src attribute to specify its location and optionally scale to indicate a scaling factor.

Example

class Sorting
{
   /// <summary>
   /// Implements the radix sort algorithm.
   /// </summary>
   /// <image url="https://ds055uzetaobb.cloudfront.net/image_optimizer/22630368cbc032ea43967b2610e73ded399e22a4.png" scale="0.5" />
   static void Radix(int[] arr)
   {
   }
}

Result result

Installation

Download the latest release from GitHub

Alternatively, you can install it from the Visual Studio Marketplace.

How to use it

To display images, including animated ones, in your source code in any of the supported languages, you have to add an <image> tag. The following attributes are supported:

Attribute Required Description
url or src Yes Represents the source of the image. It can be either from a local disk or from web. If the file is from the local disk it can be either absolute or relative to the document path.
scale No Indicates a scaling factor for the image. Notice that a very large scale might make the image impossible to display. Invariant culture is used for parsing the value, therefore always use dot for the decimal point.

Environment variables

Visual Studio environment variables $(SolutionDir) and $(ProjectDir) can be used in URLs.

Example

class Sorting
{
   // <image url="$(ProjectDir)Images\radix.png" scale="0.5" />
   static void Radix(int[] arr)
   {
   }
}

Credits

This extension is based on the image-comments extensions by Luke McQuade.

illuminated-comments's People

Contributors

mariusbancila avatar shmuelie avatar risadams avatar

Stargazers

 avatar  avatar  avatar  avatar Martha avatar Dean White avatar  avatar tianheVisual avatar stanac avatar  avatar 边宇琨 avatar Brad Edwards avatar  avatar Kyle Kolander avatar Galli Davide Francesco Maria avatar Vicente Penades avatar

Watchers

James Cloos avatar Maximilian Giesen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.