img-paste-devs / img-paste.vim

paste image to markdown
383 stars 86 forks source link

Allow different paths to save and reference image #29

Closed FlorianWanders closed 4 years ago

FlorianWanders commented 4 years ago

Allow absolute paths to save image with let g:mdip_imgdir_absolute and allow relative in-text references let g:mdip_imgdir_intext.

Tested on linux.

FlorianWanders commented 4 years ago

Hi Maxim,

Love the plugin, thanks so much for creating and maintaining it!

I felt this addition gives a lot of flexibility without changing anything in its current use. I tested this on Linux, but probably good to double check I did not break something accidentally and also see if this works on other operating systems?

Use case: I store notes in one directory and store images in a folder in another (parent) directory. By specifying absolute links for storing images I can always insert the images, independent of my current location in subfolders. And by allowing relative in-text references, I can move/export my notes without breaking links. This also means I can preview my files with iamcco/markdown-preview.nvim (written for nvim, but works in vim, which I use).

ferrine commented 4 years ago

Nice. Is it ready to merge or any issues left?

FlorianWanders commented 4 years ago

I've been using it on my branch without issues.

ferrine commented 4 years ago

Good to go