JamshedVesuna / vim-markdown-preview

A light Vim plugin for previewing markdown files in a browser - without leaving Vim.
577 stars 91 forks source link

Doesn't work with remote files #106

Open JeffFaer opened 2 years ago

JeffFaer commented 2 years ago

Observed behavior:

$ vim scp://me@computer//path/to/README.md
<ctrl>p
Please install the necessary requirements: https://github.com/JamshedVesuna/vim-markdown-preview#requirements
$ scp me@computer:path/to/README.md .
$ vim README.md
<ctrl>p
<works without problem>

Expected behavior:

I expected vim-markdown-preview to work with remote files. I've installed the necessary requirements, so I'm not entirely sure what's going wrong with the plugin

JeffFaer commented 2 years ago

Ah, I'm guessing the problem is something around

https://github.com/JamshedVesuna/vim-markdown-preview/blob/master/plugin/vim-markdown-preview.vim#L62,L65

:echo expand('%:p')
scp://me@computer//path/to/README.md

I'm guessing grip doesn't know how to read scp URIs. There's a b:netrw_tmpfile variable that seems like it should be pointing to the tmp file that's being used locally, but that file doesn't actually seem to exist on my filesystem :/

BiliBraker commented 1 year ago

Same issue.