iamcco / markdown-preview.nvim

markdown preview plugin for (neo)vim
MIT License
6.76k stars 280 forks source link

Error when trying to preview markdown file on Mac #6

Closed jdhao closed 5 years ago

jdhao commented 5 years ago

I have installed this nice plugin both on Windows 10 and Mac. On Windows, I can preview Markdown files with MarkdownPreview command without any problem. But on Mac, upon using this command, I get the following error:

Error detected while processing function mkdp#util#open_preview_page:
line    9:
E121: Undefined variable: s:try_open_preview_page
E116: Invalid arguments for function timer_start
E15: Invalid expression: timer_start(1000, s:try_open_preview_page)

I install this plugin via the pre-built file.

Neovim version: 0.3.3 (installed via Homebrew).

iamcco commented 5 years ago

fix the error. but it seams that the plugin install is not complete.

try remove and reinstall or check if markdown-preview.nvim/app/bin/markdown-preview-macos exists in plugin directory and download from release page if it's not exists.

jdhao commented 5 years ago

Maybe it is because the incomplete download. I have noticed that this plugin opens a neovim terminal to download some tarballs from github. The download speed is really slow. It took several minutes to download 12M files.

sandersantema commented 5 years ago

I have this problem, also on mac os:

Error detected while processing function <SNR>101_try_open_preview_page[4]..mkdp#rpc#stop_server:
line    2:
E121: Undefined variable: g:mkdp_node_channel_id
Press ENTER or type command to continue
Error detected while processing function <SNR>101_try_open_preview_page[4]..mkdp#rpc#stop_server:
line    2:
E116: Invalid arguments for function rpcrequest

It seems to be related. I have markdown-preview.nvim/app/bin/markdown-preview-macos installed.

sandersantema commented 5 years ago

I also don't have the :MarkdownPreviewStop command.

iamcco commented 5 years ago

@sandersantema update and have a try