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

It has stopped working! #24

Closed
dpecos opened this issue Feb 4, 2013 · 23 comments
Closed

It has stopped working! #24

dpecos opened this issue Feb 4, 2013 · 23 comments

Comments

@dpecos
Copy link

dpecos commented Feb 4, 2013

I have been using this plugin for a while, and I just installed in a new machine.

When I open a markdown file, a new browser window pops up and renders the file correctly, but it never gets updated anymore. If I close the vim session, it leaves node process a new intents to edit a markdown file doesn't even render the first time they're opened.

These are the software I'm using:

  • Ubuntu 12.10
  • Node: 0.8.18
  • Ruby: 1.9.3

Thanks a lot!

@suan
Copy link
Collaborator

suan commented Feb 19, 2013

@dpecos Did you get this error when installing? socketio/socket.io#1126

@suan
Copy link
Collaborator

suan commented Feb 19, 2013

I've tried out a fresh installation on Debian 6, Ruby 1.9.3, Node 0.8.20 and it seems to work alright. Are you sure you installed the latest version of the vim plugin into ~/.vim/after/ftplugin/markdown/?

@kgust
Copy link

kgust commented Mar 1, 2013

I have almost the same environment, with almost the same problem. I open a markdown file and nothing happens. I can confirm it's actually markdown because set ft? shows markdown.

Linux Mint 14
Node: v0.6.19
Ruby: 1.9.3p327
vim-instant-markdown: latest version

Typing echo lala | instant-markdown-d works just fine... It opens a tab in my browser and I can see "lala".

I do have the "socketio/socket.io#1126" problem and can't seem resolve it. However, everything else works.

I also see...

Error detected while processing function <SNR>91_popMarkdown..<SNR>91_popBuffer:
line    2:
E716: Key not present in Dictionary: 1 

...but I think that's a symptom and not the root cause.

@suan
Copy link
Collaborator

suan commented Mar 2, 2013

Guys I've just pushed a fix to the backend which might solve your issues. Do [sudo] npm -g update instant-markdown-d to get it.

@kgust
Copy link

kgust commented Mar 2, 2013

Thanks for looking into this. I've updated instant-markdown-d to the latest version but it doesn't seem to make a difference. I believe the problem is not with the backend; after I load a markdown file in vim, I don't see a node or instant-markdown-d process running.

If I manually start instant-markdown-d and reload my buffer with :e then everything starts working (until I quit that buffer). It just won't seem to launch the backend for some reason.

@dpecos
Copy link
Author

dpecos commented Mar 3, 2013

Hi suan

Sorry for not answering before. I just updated instant-markdown-d and tried echo lala | instant-markdown-d but I just got an empty browser window, no content at all :(

When editing a markdown file I'm still getting the same behaviour. But I do actually see an instant-markdown-d process, but reloading the buffer does not show anything in the browser.

If you want me to do some tests, no problem, just tell.

Thanks!

@suan
Copy link
Collaborator

suan commented Mar 4, 2013

@dpecos, @ffjia, could you guys please try this?

With a non-empty markdown file open, execute the following in the vim commandline:

:call system("curl -X PUT -T - http://localhost:8090/ &>/dev/null &", join(getbufline("%", 1, "$"), "\n"))

and tell me what happens. This will show us whether you can update the backend from the plugin in the first place. If this is successful, then I think the appropriate autocmds are not firing for some reason (maybe due to conflicting plugins)

@suan
Copy link
Collaborator

suan commented Mar 4, 2013

@kgust Could you try this from a non-empty markdown file and see what happens? The process should start up and show the current content in a new browser window.

:call system("instant-markdown-d &>/dev/null &", join(getbufline("%", 1, "$"), "\n"))

@ffjia
Copy link

ffjia commented Mar 4, 2013

@suan - I tried like you said, nothing happened, I only saw a blank webpage just like before.

@suan
Copy link
Collaborator

suan commented Mar 4, 2013

@ffjia: Completely blank? You don't even see the github-style border? How bout if you do:

:call system("curl -X PUT -T - http://localhost:8090/ &>/dev/null &", "lala")

@ffjia
Copy link

ffjia commented Mar 4, 2013

@suan - nothing showed up. I should see lala, but no.

@suan
Copy link
Collaborator

suan commented Mar 4, 2013

@ffjia Do you have Google Talk/Skype/Facebook/some form of instant messaging? Might be easier than going back and forth here. You can email me your username info so I can add you...

@kgust
Copy link

kgust commented Mar 4, 2013

@suan I tried the system call. It worked great. After several seconds, the browser tab opened and the content was loaded. As expected instant-markdown-d is listed in the process list.

@suan
Copy link
Collaborator

suan commented Mar 4, 2013

@kgust what vim version are you running? could you provide the output of vim --version? Also could you try disabling all other plugins and seeing if it works then?

@kgust
Copy link

kgust commented Mar 4, 2013

@suan This plugin was working for me earlier.

VIM - Vi IMproved
version 7.3.547

Here are additional steps I've taken.

$ vim -u /dev/null
:so ~/.vim/bundle/vim-instant-markdown/after/ftplugin/markdown/instant-markdown.vim
:e README.md

But nothing happened. instant-markdown-d wasn't launched.

BTW, when attempting this, manually launching instant-markdown-d no longer works. I get a new blank tab and :e doesn't load anything in the browser. Your plugin isn't dependent on other plugins, right?

@dpecos
Copy link
Author

dpecos commented Mar 4, 2013

I just tried both system calls: the first one opens an empty window (well, If I display the source, I see an HTML content with some scripts in its head) and the second one ('lala' one) doesn't show anything.

I just purged all my bundles and use just yours in order to see if some of them was causing the problem, but I didn't work either, same behaviour.

If you want to check my vim settings and plugins, I have the .vim directory in a github repo. Just do a git clone https://github.com/dpecos/vim_settings.git .vim in your home directory (backup your .vim directory first!) and then add your plugin in .vim/bundle. I'm using pathogen so it should work as is.

@randallagordon
Copy link

I'm having similar problems under Ubuntu 12.04. The instant-markdown-d server is rocking away, I can load it up, but the <body> remains empty via the echo lala pipe and when using the system call to curl within Vim. It does not appear that the issue lies in Vim land, but rather with instant-markdown-d.

@kgust
Copy link

kgust commented Mar 14, 2013

This seems like two problems to me.

Mine is with the server not starting (it is in vim). @randallagordon @ffjia and @dpecos seem to have a problem AFTER the server starts (with the server).

@randallagordon
Copy link

Stepped through the code with node-inspector and tracked down the source of the problem on my end. Being in the habit of using sudo npm to install global packages I just went right ahead and used sudo gem... No go. Installed the gems without sudo and all is well!

Thanks much for the great work @suan!

@suan
Copy link
Collaborator

suan commented Mar 23, 2013

Fine catch @randallagordon! I've added this scenario to the FAQ.

@dpecos
Copy link
Author

dpecos commented Mar 24, 2013

Just to confirm, doing as @randallagordon said, gem install redcarpet pygments.rb without sudo make get everything working smoothly!

Thanks a lot!

@ffjia
Copy link

ffjia commented Mar 25, 2013

Thanks all you guys, set set shell=bash\ -i in vimrc can also solve this problem, please refer to http://stackoverflow.com/questions/10553875/alter-path-in-vim-macvim-so-as-to-find-the-right-ruby-binary

@stale
Copy link

stale bot commented Jan 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Would not fix label Jan 9, 2021
@stale stale bot closed this as completed Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants