vim-markdown-composer icon indicating copy to clipboard operation
vim-markdown-composer copied to clipboard

vim-markdown-composer not working for linux subsystem in windows

Open floraliu1011 opened this issue 7 years ago • 3 comments

Hi,

I'm currently using a ubuntu subsystem in windows. I tried to install vim-markdown-composer and everything seems to work fine. I first installed Rust following their instruction on the website and here's the command line output for rustup

$ rustup --version
rustup 1.13.0 (ea9259c1b 2018-07-16)

I also copied paste the vim-plug installation script into my vimrc, ran PlugInstall and everything seems to work well. (no errors or any) But I can't open any browser preview either by opening a new md file or by :ComposerStart

Could you help me a bit and tell me where am I missing?

Thanks!

floraliu1011 avatar Sep 15 '18 03:09 floraliu1011

I'm also having the same problem. From my understanding of this plugin, it can be run as a server where the composing is being done on WSL and previewed in a browser on the Windows side, but I'm not sure how to get that information from the 'Channel' variable.

cbcoutinho avatar Jan 29 '19 11:01 cbcoutinho

Server use command xdg-open to open browser on linux, but wsl dosen't have desktop envronment. So, I tried to open brower with windows explorer by adding this

# add this line before `case "$DE" in`
cmd.exe /c explorer "$url"

# original script
case "$DE" in
    KDE)
    open_kde "$url"
   ;;
...

to file /usr/bin/xdg-open and this worked for me.

Git0Shuai avatar May 16 '22 03:05 Git0Shuai

In Ubuntu 22.04 installed from the Windows store using wslview as browser works well. wslview is provided by wslu, which in turn can be installed with apt. At least with neovim these steps work:

  1. sudo apt install wslu
  2. add to let g:markdown_composer_browser = 'wslview' to your (n)vim config

michaelfsp avatar Aug 30 '22 12:08 michaelfsp