Giter VIP home page Giter VIP logo

codesnap's People

Contributors

davidbriglio avatar dependabot[bot] avatar fuzetsu avatar kufii avatar lxstr avatar mutsuntsai avatar thibautmarechal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

codesnap's Issues

macos

CodeSnap: /bin/sh: ./scripts/osx-copy-image: Permission denied

Saved screenshot is too tall in some cases

Hi there,

I mentioned in #25 that I need to make huge screenshots for video production. It is entirely possible that this problem only occurs when going really large.

I have one example where I am creating a screenshot of a 328 line file. It works fine except for the width issue mentioned in #25, and in addition CodeSnap seems to calculate way too much vertical space for the screenshot.

When I select the whole file and save the PNG, it comes in at 2778 x 27684. Yeah, I know, way too big for most normal people. However, there is a lot of "dead" space at the bottom of the file. If I crop it right after line 328, I have a file of 2778 x 16342. So that means the "pixel height" of each line is approximately 50 pixels - it seems like CodeSnap makes room for some 226 lines more than are actually in there.

If it matters, my line height in Visual Studio Code is set to 0, meaning it should be computed from the font size.

Let me know if this can't be reproduced, or if anything else is needed from my side.

Does not preserve indentation

Version

VScode version: 1.48.0 (Stable)
CodeSnap Version: 1.0.27

CodeSnap is not preserving indentation in my python code.

Original Code

image

CodeSnap Output

image

The default file name is code.png, something else would be better.

A better file name would be {file_name_from_where_code_is_taken}_{selected_line_range}.png

A better default save location would be the current directory.

Obviously, I know that I can manually write a name while saving, or later rename it. But some default setting would be great.

Right click in code giving a big shutter icon with no code

I'm trying to use the extension and it seems working well, but when selecting code and right clicking and selecting CodeSnap, I get this:

snap

It also happens when I bind a keyboard shortcut and use it. If the keyboard shortcut persist, the error arises even when using the Ctrl+Shift+P method and selecting code. I have to delete the keyboard shortcut to get it back to work.

I think it's a useful feature, but I couldn't get it to work, hope that this could help, thank you for the extension anyway!

Screenshot is of whatever was previously on the clipboard

Issue is simple. Happening on Windows 10.

  1. Copy something to the clipboard
  2. Take a snap of something else in the same file
  3. The resulting snap will be of what you copied to your clipboard previously
  4. Switch away from the CodeSnap tab and back again. The image will refresh to the correct one.

I've noticed this in other cases too where the image just doesn't load until I switch away and back to the tab.

Screenshot File difference formatting

It would be great to be able to screenshot the difference between HEAD and modified file, like what you see when examining a file with changes from Source Control panel

git_diff

Image only contains half of selected code

Selected 600 lines of code and image only contains 300 lines of that with the rest empty. Image looks like it would contain the 600 lines but only half shows, the other half is empty.

Failing with project under WSL

I'm working with code run in WSL, and when I did a CodeSnap, I told it to save on my desktop. After selecting the desktop, hitting save, nothing is actually saved. I closed the opened panel, re-opened and selected $wsl in the file ui, tried to save it under wsl and still no go.

Add Extension to Open VSX Marketplace

VS Codium and other VS Code Fork (Code OSS and Eclipse Theia) now use Open VSX Registry instead VS Code Marketplace.
https://open-vsx.org/ .
https://github.com/VSCodium/vscodium/blob/master/DOCS.md

Open VSX is open source marketplace for VS Code fork that made by Eclipse Foundation.
https://www.gitpod.io/blog/open-vsx/

And i checking your Codesnap extension is still not available in this open marketplace extension. You can read this easy guide, how to publish your extension to Open VSX Marketplace.
https://github.com/eclipse/openvsx/wiki/Publishing-Extensions

Subfolders in window title

When snapping a screenshot of code, the window title (if codesnap.showWindowTitle is turned on) is: {folder} - {file}

But if the parent folder has subfolders, they're not shown in the window title.
For example, this is my folder path: timesheet/logs/create.php
If I take a screenshot in create.php, I would like the window title to be: timesheet/logs/create.php. (or somethings similar)
An even better solution would be to grab the window.title variable from VSCode settings.

No syntax highlighting in VS Code Insiders v1.50.0

First off, really appreciate your work and effort on this extension. Perfect for snagging decent-looking screenshots of code snippets in a pinch.

Issue
I'm running VS Code Insiders v1.50.0-insider (full system info below) and there does not appear to be any syntax highlighting being applied in CodeSnap, as per the screenshot below.

image
Top: Actual code snippet. Bottom: CodeSnap image.

Configuration

{
  "codesnap.boxShadow": "none",
  "codesnap.containerPadding": "0",
  "codesnap.showWindowControls": false,
  "codesnap.transparentBackground": true
}

System

Version: 1.50.0-insider (user setup)
Commit: 403a6895f401c397933ec5c4f7d89432a33509b6
Date: 2020-09-18T05:31:09.978Z
Electron: 9.3.0
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

Images are getting cut off on 1.3.0

Hello!

Since updating to 1.3.0 it looks as though images are getting cut off. Downgrading to 1.2.1 seems to resolve the issue.

1.2.1

121

1.3.0

130

Troubleshooting

So far I've tried:

  • Restarting VS Code
  • Re-installing the extension
  • Two different machines (Intel Mac, Apple Silicon Mac)

"CodeSnap" doesn't work on Windows

版本: 1.49.0 (user setup)
提交: e790b931385d72cf5669fcefc51cdf65990efa5d
日期: 2020-09-10T13:22:08.892Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

word breaking

First, I Should thank you for this great extension.
The problem here is, As You can see, words are broken into letters in each line, It would be very great if this will change to based on the word,s not letters.
image

Weird formatting after taking shot

Hi, im tried to take shots with codesnap because polacode did me a bad formating while I took a shot, but occurs the same error.

This is before I took the shot

Screenshot at 2019-12-04 19-30-16

This is the result of the shot
code

This is the info of my vscode

Version: 1.40.2
Commit: f359dd69833dd8800b54d458f6d37ab7c78df520
Date: 2019-11-25T14:54:40.719Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 5.3.12-200.fc30.x86_64

My SO is fedora 30

Screenshot at 2019-12-04 19-39-22

I think this is a better extension than polacode, luck in solving this bug.

tweaks and improvements

  • add demo screenshots to readme
  • find alternative icon for taking snap
  • add support for taking screenshot without having to interact with web UI, single command to take screenshot and either save to disk or copy to clipboard
  • add controls for configurable options to web view

Unescaping code

I tried to make a screenshot of a code, and the resulting image is slight different.

The minimum example is this: Take a CodeSnap of this: '%40'. The result is:
image

Is there an option where I can disable this replace?

Instructions on usage?

Just installed this plugin. Looks awesome, but there's no instructions on how to use it.

Open VSX Listing: Signing the Publisher Agreement

Thank you for being part of the Open VSX community by adding your extensions to the Open VSX Registry. Please note that the service was recently transferred to the Eclipse Foundation and urgent action on your part is needed so we can continue to list your extensions. To ensure uninterrupted service, please sign the Eclipse Publisher Agreement on or before January 8, 2021. If not signed by that date, your extensions will be delisted and will no longer appear on the site nor be available via the API. If you sign at a later date, your extensions will then be re-activated. The signing process is explained in the Wiki (steps 1 and 2).

Please also note that all extensions MUST have a license in order to be listed.

More details are in these recent blog posts:
https://blogs.eclipse.org/post/brian-king/open-vsx-registry-under-new-management
https://blogs.eclipse.org/post/brian-king/new-era-open-vsx-registry

Today, there’s growing momentum around open source tools and technologies that support Visual Studio (VS) Code extensions. Leading global organizations are adopting these tools and technologies. This momentum has spurred demand for a marketplace without restrictions and limitations. Thanks for joining us on this journey as we continue to build the Open VSX community. We look forward to continued innovation from you in 2021!

[REQUEST] Edit title on the go

If window title is shown, make it easily renamable by (single/double) clicking it. Current version will automatically take workspace name + full file name as window title with no option to modify it.

Copy screenshot to clipboard

When I hit the aperture, it prompts me to save the screenshot to disk. That's a tedious way to move a screenshot over to a program that supports pasting in an image from the clipboard.

Can you please copy the screenshot itself to the clipboard when the aperture button is pressed? And make it an option whether or not to prompt to save to disk? I for one, never save something to disk, because all programs I use to share any screenshot, support pasting an image from the clipboard.

In short, I want to:

  1. Activate CodeSnap
  2. Select code
  3. Press the aperture button
  4. Paste into, for example, a Slack message

That would be litterally all there is to it, ideally.

Retain font ligatures configuration?

image

Hi,

First off, this is an incredibly handy extension and quite simply ticks all the boxes that Polacode does not! Really grateful for you having shared this.

Looking at the screenshot above, compare the number 0 within the 0_0s between the editor and CodeSnap tabs. Notice it's slashed in the editor but dotted in CodeSnap.

By default, JetBrains Mono has dotted zeros, which appears to be rendered in CodeSnap despite "editor.fontLigatures": "'zero'" having being set. I'd have assumed this would be preemptively resolved by #12 but that doesn't seem to be the case here.

Please feel free to let me know if you need any more information to help troubleshooting. Thanks once again for your time, much appreciated!

Does not work

Code is selected but Codesnap shows empty window

Capture du 2020-09-08 15-20-58

Version: 1.49.0-insider
Commit: 8c9b4015feb0297d99c8051c35e85d208ffe83e3
Date: 2020-09-03T07:13:55.843Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Linux x64 4.15.0-112-generic

Doesnt work on vs Code for windows

Version: 1.47.2 (user setup)
Commit: 17299e413d5590b14ab0340ea477cdd86ff13daf
Date: 2020-07-15T18:22:06.216Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.19041

CTRL + C not working on Windows

Doing CTRL + C does not copy the image to the clipboard, neither does clicking on the shutter button.

System Specs:

  • Windows 10 Pro 20H2 (19042.928)
  • Visual Studio Code: v1.55.2

Wondering if this can be made to copy from integrated terminal...

Loving your extension - it's come in very useful for me with presentations & documentation.

I was wondering whether it would be possible to use Codesnap on text selected in the integrated terminal, as I presume that has a similar structure to an editor window - that would let me get the same level of fidelity with command-lines & their related output as I can get for my code...

No color rendered

environment: MacOS 10.14.6

图片

I tried to disable all extensions except CodeSnap but no luck.

Automatically Copy Photo to Clipboard

Just like screenshot system on other applications, I think it would be good to copy the screenshot of code to clipboard, and ask user whether to save it or not. Is this possible?

CodeSnap Don't run

Select a piece of code, and I run codesnap and it gives me an error like this
The command "CodeSnap 📸" resulted in an error (command 'codesnap.start' not found)
and it doesn't run at all, remove, reinstall, erase settings completely in vscode and nothing worked, I always get the same error

Option to split to bottom instead of side

This is a great tool, thank you!

Unfortunately, every time I use it, I have to move the split pane to the bottom instead of the right. I have a small screen laptop, and it results in my code having to fit in 40 line length characters. It seems like it would make more sense to split to the bottom so the screenshot actually looks like the code rather than being squished, and/or adding an option to do this.

What do you think?

Current behavior:

code

Ideal behavior:

image

Copy to clipboard on Windows

Hi! I'm running your extension on Windows 7 and the "copy to clipboard" feature doesn't seem to be working. It just opens a "Save" dialog but nothing gets copied into the clipboard.

code snap draws content from the system clip board instead of vscode

Issue Type: Bug

As title, code snap takes content from the system clip board instead of vscode. The snapped image is not from selected text in vscode edit window.

Extension version: 1.2.0
VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z)
OS version: Windows_NT x64 10.0.19041

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz (8 x 1896)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.85GB (5.61GB free)
Process Argv --crash-reporter-id ffd39a9b-3af7-4188-ba19-d2e6963bbef3
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
openlogontheside:30221877
python763:30178808
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
python504:30227505
vswsl492cf:30211402
wsl2prompt:30224612
unusedprompt:30224610
folderexplorer:30224614
openfilemenucf:30224648
pythonvsded773:30236629
vsjup459cf:30237188

Does not work under OSX

When running on Mac, the command seems to do nothing. No error notification and there's no error in the dev tools too.

Worth noting that I'm using the Settings Sync extension to sync my settings/extensions across my Mac/Linux environments. The CodeSnap extension has been installed under Linux first (and everything worked well) then it has been synced to my Mac environment.

VSCode version: 1.47.3
OSX version: Catalina 10.15.4

Capture d’écran 2020-07-31 à 14 49 08

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.