Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support remote development mode #44

Open
nitingupta910 opened this issue May 2, 2019 · 10 comments
Open

Support remote development mode #44

nitingupta910 opened this issue May 2, 2019 · 10 comments

Comments

@nitingupta910
Copy link

VSCode recently added support for Remote Development. When this extension is installed remotely and I take screenshot locally, pasting of image to remote document does not work since the extension cannot access the local clipboard.

Would it be possible to access local clipboard when this extension is installed remotely?

@rhiswell
Copy link

rhiswell commented Aug 6, 2019

I also have this problem when installing the extension to remote side. Here is the potential solution:

https://code.visualstudio.com/api/advanced-topics/remote-extensions#using-the-clipboard

@GrayXu
Copy link

GrayXu commented Feb 11, 2020

same problem, TAT

@wdhongtw
Copy link

If my investigation is correct, the extension won't work on Visual Studio Code Remote Development mode. Because currently the extension use wrapper script to manage clipboard image on Remote OS, and the image we want to paste only exists in Local OS.

The potential solution metioned by @rhiswell will not help at this time. The Clipboard API Do sync the clipboard content from Local OS to Remote OS, but the API can only access text content.

There seems a clipboard API which will support arbitrary content type in the future, according to Expose Clipboard#read/write with data transfer · Issue #77790 · microsoft/vscode. Once the new API is ready and do support remote development mode, maybe we can change the implementation of this extension.

Disclaimer: I do not maintain this extension, just someone who also hope this feature come true. :D

@RyanPersson
Copy link

RyanPersson commented Aug 15, 2020

[This doesn't seem to work after further experimentation, it doesn't seem to actually save the created image]

I was able to get a fork of this extension, telesoho/vscode-markdown-paste-image, to work with the wsl remote development suite, by forcing the extension to run on the ui/windows side where it has access to the clipboard.

I did this by adding:

    "remote.extensionKind": {
        "telesoho.vscode-markdown-paste-image": ["ui"],
    }

to settings.json.

Using:

    "remote.extensionKind": {
        "mushan.vscode-paste-image": ["ui"],
    }

may fix your issue.

@sakamoto66
Copy link

fix your issue.

https://marketplace.visualstudio.com/items?itemName=sakamoto66.vscode-paste-image

this extention access local clipbord when use Remote Development mode.

@RyanPersson
Copy link

@sakamoto66 Works for me in WSL! Thank you!

Note: I had to disable other extensions which also use the Ctrl+Alt+v keybinding, in order for it to work. I thought it wasn't at first.

@sakamoto66
Copy link

@Ryanperson
feedback, thank you!

Note: I had to disable other extensions which also use the Ctrl+Alt+v keybinding, in order for it to work. I thought it wasn't at first.

That is the destiny of vscode.
You can find the measures here.

  1. Open Command Palet (Ctrl + Shift + P).
  2. Input "Open keyboard Shortcuts" on Command.
  3. Input "Ctrl Alt V" on filter.
  4. Disable keyboard shortcuts other than "Paste image of clipboard".

@pduchnovsky
Copy link

pduchnovsky commented Oct 29, 2020

fix your issue.

https://marketplace.visualstudio.com/items?itemName=sakamoto66.vscode-paste-image

this extention access local clipbord when use Remote Development mode.

Unfortunately, this seems to be kind of broken, since I cannot use variables like ${currentFileNameWithoutExt}
Therefore I cannot put the images in to folders that are created specifically with my current file name without extension by Hexo.

This is my current structure of source directory, I created the test file, then pasted an image
it just created directory named ${currentFileNameWithoutExt}

source/
├─ _posts
├── ${currentFileNameWithoutExt}
└── test.md

@allamand
Copy link

Still not working here, with the Error There is not an image in clipboard did you manage to paste images in remote vscode ?

@EDIflyer
Copy link

I'm using MkDocs-Material and have Paste Image nicely configured when working just on my local machine and pushing to Github, but would love to have it working when in VS Code remote development mode - I had the same issue as @pduchnovsky when it came to filenames though, has anyone found a good workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants