img-paste-devs / img-paste.vim

paste image to markdown
383 stars 86 forks source link

How to change the directory which name is the same to the markdown file? #31

Open elli999 opened 4 years ago

elli999 commented 4 years ago

For example, I am editing a file names "test.md". I want to save the image in the "./test/" folder when I paste.

Is it change the let g:mdip_imdir = 'image' in vimrc file? I don't know how to fill in. How to get the filename...

Please tell me , I am sincerely want to know, thank you very much!

ferrine commented 4 years ago

Not sure dynamic path setting is easy. It is set as a constant in vimrc file

cbxgss commented 1 year ago

let g:mdip_imgdir = "assets/" . expand('%:t:r')