Sublime Forum

Convert selected code to image

#1

While I frequently screenshot my code in sublime editor for sharing and blogging, I’d be glad to see such a tool which could:

  1. When executed, convert my selected code to an image
  2. With code highlighting work as expected
  3. Auto strip leading spaces, therefore, if all my selected code have at lease 4 leading spaces, then remove the first 4 spaces from each line
  4. Either preserving my sublime theme or not is OK, it’s not something we must care about

So is there any plugin could do this?

Thanks

0 Likes

#2

If you really want to get images of your code, I think screen shots is the way to go. Maybe some screen shot utility can make it easier. That depends on what platform you are using, of course. If you don’t necessarily need images, ExportHTML (github.com/facelessuser/ExportHtml) can probably help you. Give it a try.

0 Likes

#3

Mostly I want the image for a part of my code, so the screenshot utility always encounter some problems:

  1. If it do not auto-scroll my document, then if my code exceeds one screen, screenshot is not enough
  2. If it does auto-scroll, then it always snapshot all my code, I have to crop it myself - a waste of energy and time :frowning:
0 Likes

#4

I came to this page while searching for a package like Polacode for VS Code.

For people coming to this page in the future, Carbon Sublime package is a good candidate.

0 Likes