mushanshitiancai / vscode-paste-image

paste image from clipboard to markdown/asciidoc directly!
MIT License
423 stars 128 forks source link

How to change the filname including currentFileNameWithoutExt #20

Closed tatoosh closed 6 years ago

tatoosh commented 6 years ago

First i want to thank you for your plugin!

My config is this: "pasteImage.path":"${currentFileDir}/assets/${currentFileNameWithoutExt}"

so my result imagename is: ![](assets/Bestellprozesse/2018-01-23-13-46-54.png)

How to change the Filename to this ? ![](assets/Bestellprozesse_2018-01-23-13-46-54.png)

tatoosh commented 6 years ago

Is this project closed ?

stvhwrd commented 6 years ago

Paging @mushanshitiancai

mushanshitiancai commented 6 years ago

Hi, I'm come back😄

You can update vscode-paste-image to v1.0.1.

New configuration pasteImage.namePrefix can meet your need. Like this:

"pasteImage.path":"${currentFileDir}/assets"
"pasteImage.namePrefix": "${currentFileNameWithoutExt}_",
tatoosh commented 6 years ago

It's not working for me on Windows 10 - after pasting the name is ![](assets/CSV-SChnittstellen_INTERN/2018-06-04-13-01-29.png)

my config is:

   "pasteImage.path": "${currentFileDir}/assets/${currentFileNameWithoutExt}",
   "pasteImage.namePrefix": "${currentFileNameWithoutExt}_",
mushanshitiancai commented 6 years ago

@tatoosh Sorry, It's a bug. I fixed in version 1.0.2.

tatoosh commented 6 years ago

thx @mushanshitiancai, it's working now. now the image got the base filename and a timestamp. Any change to open a popup who is asking for the image filename?

mushanshitiancai commented 6 years ago

@tatoosh You can select text as the file name (see the gif on home page).