Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatically removing rendering file.html causes "Your file was not found" #56

Open
AdrienHorgnies opened this issue Mar 29, 2017 · 1 comment

Comments

@AdrienHorgnies
Copy link

AdrienHorgnies commented Mar 29, 2017

So using the option let vim_markdown_preview_temp_file=1 causes a "Your file was not found" in the browser.
Obviously the file was deleted a bit too soon. This may be due to my configuration. Here is what I am using atm :

" vim-markdown-preview
let vim_markdown_preview_toggle=0 " <C-p> to open preview
let vim_markdown_preview_temp_file=1 " Automatically removes rendering file.html after usage
let vim_markdown_preview_github=1 " Use github API

But if I remove the third line (Use github API), I don't get this error. I get a blank page as expected (I only have grip installed) and after refreshing I get the "File not found" error which is a normal behavior.

Vim flavour : neovim
browser : Google Chrome
OS : (X)ubuntu 16.04.2x64

Also I had some trouble installing grip. As I missed the option relative to github the first time, I tried reinstalling grip which resulted in some error I had to circumvent using pip install --user grip. I don't think this is causing the problem but I may be wrong.

I'm disabling the auto remove until then.

@azonirunner
Copy link

I think this is related to the comment about a slow browser might error. Using grip and calling github could be an issue also. To make this work on a mac with safari I just changed the sleep time from 200m to 1000m in the vim-markdown-preview.vim file:

if g:vim_markdown_preview_temp_file == 1
sleep 1000m
call system('rm vim-markdown-preview.html')
endif

It is slower... but an extra 800m is not throwing off my output too much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants