Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CodeSnap-K.ONew to Visual Studio Code? Get it now.
CodeSnap-K.O

CodeSnap-K.O

Kareem Osama

|
3,738 installs
| (0) | Free
A fork of the original CodeSnap extension made by Kareem Osama
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeSnap fork

NOTE: THIS IS A FORK OF CODESNAP Here is a link for the original extension: https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap

For the devs of CodeSnap: if you dislike the idea of your extension being published as a fork, I will delete it at the spot

The difference between this and the original one:

  • Removed the workspace name when you enable codesnap-ko.showWindowTitle in the settings

  • The screenshot now uses the name of the file when saving

Features

  • Quickly save screenshots of your code
  • Copy screenshots to your clipboard
  • Show line numbers
  • Many other configuration options

Usage Instructions

  1. Open the command palette (Ctrl+Shift+P on Windows and Linux, Cmd+Shift+P on OS X) and search for CodeSnap-K.O.
  2. Select the code you'd like to screenshot.
  3. Adjust the width of the screenshot if desired.
  4. Click the shutter button to save the screenshot to your disk.

Tips:

  • You can also start CodeSnap by selecting code, right clicking, and clicking CodeSnap
  • If you'd like to bind CodeSnap to a hotkey, open up your keyboard shortcut settings and bind codesnap-ko.start to a custom keybinding.
  • If you'd like to copy to clipboard instead of saving, click the image and press the copy keyboard shortcut (defaults are Ctrl+C on Windows and Linux, Cmd+C on OS X), or bind codesnap-ko.shutterAction to copy in your settings
  • The extension will not function properly if editor.copyWithSyntaxHighlighting is set to false. Please ensure that it's set to true.

Examples

Material Theme + Operator Mono

Example 1

Nord + Cascadia Code

Example 2

Monokai + Fira Code

Example 3

Configuration

CodeSnap is highly configurable. Here's a list of settings you can change to tune the way your screenshots look:

codesnap-ko.backgroundColor: The background color of the snippet's container. Can be any valid CSS color.

codesnap-ko.boxShadow: The CSS box-shadow for the snippet. Can be any valid CSS box shadow.

codesnap-ko.containerPadding: The padding for the snippet's container. Can be any valid CSS padding.

codesnap-ko.roundedCorners: Boolean value to use rounded corners or square corners for the window.

codesnap-ko.showWindowControls: Boolean value to show or hide OS X style window buttons.

codesnap-ko.showWindowTitle: Boolean value to show or hide window title file_name.

codesnap-ko.showLineNumbers: Boolean value to show or hide line numbers.

codesnap-ko.realLineNumbers: Boolean value to start from the real line number of the file instead of 1.

codesnap-ko.transparentBackground: Boolean value to use a transparent background when taking the screenshot.

codesnap-ko.target: Either container to take the screenshot with the container, or window to only take the window.

codesnap-ko.shutterAction: Either save to save the screenshot into a file, or copy to copy the screenshot into the clipboard.

Copy to Clipboard support in Linux

In order for this feature to work in Linux you must install xclip.

Usually you can simply install it using your distribution's package manager:

# ubuntu / debian
sudo apt install xclip

# arch / manjaro
pacman -S xclip

If you're using Wayland (rather than X) as your compositing window manager install wl-clipboard instead.

Acknowledgements

The great Polacode, for the initial concept.

Carbon for some design inspiration.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft