Giter Site home page Giter Site logo

Comments (23)

suan avatar suan commented on June 26, 2024

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

from vim-instant-markdown.

suan avatar suan commented on June 26, 2024

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/?

from vim-instant-markdown.

kgust avatar kgust commented on June 26, 2024

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.

from vim-instant-markdown.

suan avatar suan commented on June 26, 2024

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.

from vim-instant-markdown.

kgust avatar kgust commented on June 26, 2024

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.

from vim-instant-markdown.

dpecos avatar dpecos commented on June 26, 2024

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!

from vim-instant-markdown.

suan avatar suan commented on June 26, 2024

@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)

from vim-instant-markdown.

suan avatar suan commented on June 26, 2024

@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"))

from vim-instant-markdown.

ffjia avatar ffjia commented on June 26, 2024

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

from vim-instant-markdown.

suan avatar suan commented on June 26, 2024

@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")

from vim-instant-markdown.

ffjia avatar ffjia commented on June 26, 2024

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

from vim-instant-markdown.

suan avatar suan commented on June 26, 2024

@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...

from vim-instant-markdown.

kgust avatar kgust commented on June 26, 2024

@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.

from vim-instant-markdown.

suan avatar suan commented on June 26, 2024

@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?

from vim-instant-markdown.

kgust avatar kgust commented on June 26, 2024

@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?

from vim-instant-markdown.

dpecos avatar dpecos commented on June 26, 2024

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.

from vim-instant-markdown.

randallagordon avatar randallagordon commented on June 26, 2024

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.

from vim-instant-markdown.

kgust avatar kgust commented on June 26, 2024

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).

from vim-instant-markdown.

randallagordon avatar randallagordon commented on June 26, 2024

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!

from vim-instant-markdown.

suan avatar suan commented on June 26, 2024

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

from vim-instant-markdown.

dpecos avatar dpecos commented on June 26, 2024

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

Thanks a lot!

from vim-instant-markdown.

ffjia avatar ffjia commented on June 26, 2024

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

from vim-instant-markdown.

stale avatar stale commented on June 26, 2024

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.

from vim-instant-markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.