Live data from Hacker News

Floobits-Vim: Real-time collaboration plugin for Vim

github.com

1–10 of 13 posts

Re: Floobits-Vim: Real-time collaboration plugin for Vim

#2
Writing this plugin has been quite the learning experience. Vim strives to be a text editor foremost, and its plugin API discourages terminals or REPLs. Unfortunately, similar API functionality is needed if one wants to create a collaboration plugin.

Matt (kansface) and I have figured out two ways to get this working:

1. Set updatetime to a low value and call feedkeys with a key combo that is effectively a no-op. Then you can have an autocmd for CursorHold that calls select(). Unfortunately, since K_IGNORE was removed from Vim a few years ago, there is no key combo that is truly a no-op. This method breaks some keyboard shortcuts.

2. Start Vim as a server and spawn a subprocess that sleeps for 200ms, then runs another Vim as a client. This client Vim calls a tick function in the server Vim, which select()s and repeats the spawn-a-subprocess trick. This has fewer side-effects but is crazy inefficient.

This would have been so much easier if Vim's plugin API had a setTimeout().

Re: Floobits-Vim: Real-time collaboration plugin for Vim

#5
When someone else posted their vim collaborative plugin, the Floobits people were all over the thread promoting their commercial product over it.

I will also note that the Floobits people seem incapable of posting about their vim plugin without downing vim, as if doing this were equally or more important than their product.

Re: Floobits-Vim: Real-time collaboration plugin for Vim

#6
Screen and tmux both have shared sessions, and even though screen isn't really under active development anymore it is solid.

Does this offer anything that other more widely used pieces of software don't already provide (and provide well)?

Edit: Ahhh, I didn't realize from the git page that it would let you use different editors on different ends of the shared session.

Re: Floobits-Vim: Real-time collaboration plugin for Vim

#7
post #5

When someone else posted their vim collaborative plugin, the Floobits people were all over the thread promoting their commercial product over it. I will also note that the Floobits people seem incapable of posting about their vim plugin without downing vim, as if doing this were equally or more important than their product.

I will note that neither ggreer nor myself commented in the other thread (ie, the Floobits team). For that matter, we don't have any ill will towards CoVim or the Etherpad Vim plugin; I personally hope they succeed and the number of people who pair program on a daily basis increases.

Floobits is also currently free and the plugins at least are open sourced. It takes a significant amount of time to develop this software- hopefully users will find the value we add commensurate with the investment on our part and we can make a business out of it.

Finally, we are left in a strange position with users on why the Vim plugin behaves so strangely. Ideally, users wouldn't have to change their behavior at all; everything would just magically work. Unfortunately, Vim is purposefully designed to make things like collaborative editing impossible (it has no event loop and async actions are impossible). Vim is by design a text editor and not an IDE. We should probably communicate the limitations of the platform better to end users.

Re: Floobits-Vim: Real-time collaboration plugin for Vim

#8

Screen and tmux both have shared sessions, and even though screen isn't really under active development anymore it is solid. Does this offer anything that other more widely used pieces of software don't already provide (and provide well)? Edit: Ahhh, I didn't realize from the git page that it would let you use different editors on different ends of the shared session.

Screen and tmux are great for sharing terminals, but they're not the best for editor collaboration. For one, all users sharing the terminal have to have the same buffer open, scrolled to the same position. Also, they have to use the same editor with the same configuration. If two people prefer different editors or different sets of Vim plugins, they have to compromise.

Re: Floobits-Vim: Real-time collaboration plugin for Vim

#9

Screen and tmux both have shared sessions, and even though screen isn't really under active development anymore it is solid. Does this offer anything that other more widely used pieces of software don't already provide (and provide well)? Edit: Ahhh, I didn't realize from the git page that it would let you use different editors on different ends of the shared session.

We also have a shared shell which uses Floobits permissions called flootty: https://github.com/Floobits/flootty.

Flootty is also accessible from our web based editor which has an embedded pty. Its actually possible to run a vim inside flootty that itself is running floobits.

Re: Floobits-Vim: Real-time collaboration plugin for Vim

#10
post #5

When someone else posted their vim collaborative plugin, the Floobits people were all over the thread promoting their commercial product over it. I will also note that the Floobits people seem incapable of posting about their vim plugin without downing vim, as if doing this were equally or more important than their product.

It was I who posted in the HN CoVim comments about Floobits, and I am not affiliated with Floobits. I just like it. It's better than CoVim for a number of reasons whether or not it's commercial.
Post reply on HN