preservim / vim-markdown

Markdown Vim Mode
4.69k stars 524 forks source link

supporting relative path for EditUrlUnderCursor #533

Open rzjfr opened 3 years ago

rzjfr commented 3 years ago

Hi, I'm not sure this would be useful for anyone else but it helped me a lot. I keep a rather complex structure for some of markdown projects so if you want to refer to a file or an anchor in a file in a sibling or a child directory, this patch makes it possible.

Supports patterns like ../sibling_dir/file#anchor and ./child_dir/file#anchor relative to the current buffer.

it's particularly useful g:vim_markdown_no_extensions_in_markdown and g:vim_markdown_follow_anchor are set.