ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Code​Shot

by Yasin Jagral ST4 Win New

No description provided

Details

Installs

  • Total 2
  • Win 2
  • Mac 0
  • Linux 0
May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6
Windows 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

CodeShot

CodeShot is a Sublime Text plugin for creating clean CodeSnap-style screenshots of selected code.

Developer: Yasin Jagral

Features

  • Copy selected code as an image to clipboard
  • Save code screenshot to Desktop
  • Clean rounded card-style screenshot layout
  • Programming language shown in the screenshot header
  • Default footer branding: CodeShot by Yasin Jagral (configurable via footer_text)
  • Theme switching from the Tools menu
  • Long-line wrapping for large lines of code
  • Auto-dedent selected code so it starts from the first column
  • Works offline
  • Designed for Windows

Requirements

CodeShot currently supports Windows only.

Required:

  • Sublime Text
  • Google Chrome or Microsoft Edge installed locally
  • Windows PowerShell

CodeShot uses local Chrome or Microsoft Edge in headless mode to render the screenshot. It does not use any online API.

Installation via Package Control

After CodeShot is accepted into Package Control:

  1. Open Sublime Text.
  2. Open the Command Palette:
Error: language “txt” is not supported
Ctrl + Shift + P
  1. Run:
Error: language “txt” is not supported
Package Control: Install Package
  1. Search for:
Error: language “txt” is not supported
CodeShot
  1. Install it.

Manual Installation

  1. Download or clone this repository.
  2. Open Sublime Text.
  3. Go to:
Error: language “txt” is not supported
Preferences > Browse Packages
  1. Copy the CodeShot package files into the Packages folder.

For manual folder installation, the structure should be:

Error: language “txt” is not supported
Packages
  CodeShot
    .python_version
    CodeShot.py
    CodeShot.sublime-settings
    Default.sublime-commands
    Main.sublime-menu
    README.md
    LICENSE

Note: CodeShot does not include a default keymap file because Package Control packages should avoid forcing keyboard shortcuts.

  1. Restart Sublime Text.

Usage

Select code in Sublime Text, then use:

Error: language “txt” is not supported
Tools > CodeShot > Copy Image to Clipboard

or:

Error: language “txt” is not supported
Tools > CodeShot > Save Image to Desktop

or:

Error: language “txt” is not supported
Tools > CodeShot > Open Preview Only

Optional Key Binding

CodeShot does not force a default keyboard shortcut in the Package Control-ready version. This avoids overriding user shortcuts.

To add your own shortcut, open:

Error: language “txt” is not supported
Preferences > Key Bindings

Add this to your user key bindings:

{
    "keys": ["ctrl+alt+s"],
    "command": "code_shot",
    "args": {
        "mode": "copy"
    }
}

Settings

Edit:

Error: language “txt” is not supported
CodeShot.sublime-settings

Important settings:

{
    "theme": "vscode-dark",
    "page_background": "#ffffff",
    "wrap_long_lines": true,
    "dedent_selection": true,
    "chrome_path": ""
}

If Chrome or Edge is not detected automatically, set the path manually.

Chrome example:

"chrome_path": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"

Microsoft Edge example:

"chrome_path": "C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe"

Themes

CodeShot includes these themes:

  • VS Code Dark
  • Dracula
  • GitHub Light
  • Midnight

Change the theme from:

Error: language “txt” is not supported
Tools > CodeShot > Themes

The selected theme is shown with a checkmark.

Offline Support

CodeShot works offline. It creates a local HTML file, renders it locally using Chrome or Edge in headless mode, then copies or saves the generated PNG.

No internet connection is required.

Compatibility

CodeShot currently supports Windows only.

Mac and Linux are not currently supported because clipboard handling and browser paths are OS-specific.

Notes for Package Control Submission

This repository is prepared for Package Control submission:

  • Package files are at repository root
  • MIT License included
  • messages.json included
  • No __pycache__ or .pyc files
  • No forced default keybinding
  • .python_version included to opt into the Python 3.8 plugin host
  • Windows-only support is declared honestly

License

MIT License. See LICENSE.

Package Settings

Preferences > Package Settings > CodeShot > Settings