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

WSL image saving issue #66

Open
qhadron opened this issue Jan 17, 2022 · 2 comments
Open

WSL image saving issue #66

qhadron opened this issue Jan 17, 2022 · 2 comments

Comments

@qhadron
Copy link

qhadron commented Jan 17, 2022

I was having similar issues as #58, and I think I've found out why.

https://github.com/ferrine/md-img-paste.vim/blob/e81bec83ae68cec99857826ddee63f43e529ec4c/plugin/mdip.vim#L34

This only works for the C: drive. Replacing it with the code below worked for other drives:

let tmpfile = substitute(tmpfile, "\\\\\\\\mnt\\\\\\\\\\(.\\)", "\\1:", "g")
" I found this to be more readable:
let tmpfile = substitute(tmpfile, '\\\\mnt\\\\\(.\)', '\1:', "g")

PS: I have xclip properly set up in Ubuntu 20.04 1 , so the Linux saving functions are working properly.

Footnotes

  1. Using x410.

@Mingzefei
Copy link

Mingzefei commented Jul 19, 2022

Could you specify how to set up xclip in wsl with x410? @qhadron
I have similar issuses as #58, no image/png in xclip -selection clipboard -t TARGETS -o.

My version:
Ubuntu 20.04 of WSL1
xclip version 0.13
x410 version 3.2.0(have set export DISPLAY=127.0.0.1:0.0)

@loblab
Copy link

loblab commented Jan 20, 2024

I forked the project, and made it work for latest WSL with auto file naming.
https://github.com/loblab/img-paste.vim

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

3 participants