13

I'm a NeoVim user and would like to be able to collaborate in real time with users, preferably also across other editors. Are there any open source plugins that enable remote Neovim←→Neovim pair programming?

I am aware of Floobits which is a proprietary system that includes plugins for various editors including NeoVim, but the server component is closed source and not an option for my projects.

Additionally, if there was a way to join other editors into the mix that would be ideal. The closest Open Source alternative I've run across is the MIT licensed Firepad which uses a Firebase backend to synchronize edits between users. There is a plugin for Atom which seems to enable those guys to work on the same file in real time but I don't see any plugins for NeoVim users like myself to join the party.

Edit: Any vim plugin interfacing with the teletype-client so team up with Atom's Teletype system would be of particular interest!

6
  • See also my related question on Software Recomendations
    – Caleb
    Nov 28 '16 at 10:57
  • 6
    How about running NeoVim inside tmux? You can attach a pane more than once, so one person can ssh (or you can both ssh to some server). I think you can also do the same with screen if you prefer that. Nov 28 '16 at 11:47
  • 1
    @Carpetsmoker I was just considering tmux session sharing as a a stand-in, but besides not being in the same room the other things I'm trying to overcome is wildly different user preferences. For example I don't use QWERTY and my vimrc is heavily customized to the point where it would be a struggle to use beyond basics for somebody else. Likewise I'm only comfortable with all my plugins and such just-so. Cross-editor collaboration is what I need, the vim-vim sharing would be a hold-over. As such, not even being able to have different vim preferences is a step away from the ultimate goal.
    – Caleb
    Nov 28 '16 at 12:25
  • 1
    I know it might not be your preferred way to solve it but in my team we have key bound scripts to setup system configurations with different keyboard layouts. So we can quickly switch between peoples preferences.
    – jaan
    Feb 21 '18 at 20:46
  • 3
    tmate.io is a fork of tmux. It provides an instant pairing solution.
    – sergio
    Dec 31 '19 at 6:24
6

I would have used a comment instead of an answer, but alas, my reputation is insufficient. So this is not an answer, sorry.

I would really love to have a solution to this, too. Though in my mind restricting that to vim is hardly a solution. Indeed, a multi-editor solution is absolutely required. The tech I'm looking to to solve this is ... X. In principle X does solve this ... however, there is no nice out of the box solution that one could unpack and get going.

The core technology, that I hope will eventually solve this, is the multi pointer X input extension. But you need more to actually use that in the envisioned scenario. You need a VNC server, window manager and possibly editors, all supporting multiple pointers.

A few more links:

  • I have written more about the complete setup (and social vision behind it) here.
  • A window manager
  • Ancient attempt to crack it with VNC
2
  • fascinating concept of an X based solution. Does vim support multiple pointers? There's a plugin github.com/mg979/vim-visual-multi but I have no idea if that's utilizing this "multi pointer X extension" that you mention or not.
    – alec
    Sep 27 '20 at 14:39
  • 1
    If you use it in a terminal, then the terminal will have to support it first. And if it does then my guess is vim will work as long as you don't do things synchronously. You could probably insert in multiple places at once, but my guess is anything else is out of the question. You can't have vim in 2 modes at once. I guess if you want a google-docs like multi pointer experience you will need to work with 2 vim instances (as does google docs, obviously) and have a plug-in that takes care of patching the document in the background and indicating the other one's pointer. That would probably work. Sep 28 '20 at 8:02
1

I'd recommend instant.nvim with ngrok.

It has a very similar experience to VSCode's Team Share. Visible names, seeing edits as people do them, entering sessions with a single link, sharing one or more buffers, etc...

Although it lacks some polish (e.g. the name position only updates on insert mode), it works fairly well.

0

There are a couple plugins which take a stab at this

1
  • 2
    This answer is too sparse to be very useful. development on CoVim stopped 4 years ago and the repository is marked as archived with no explanation. My personal recollection of trying it is that it didn't go very well. Likewise vim-multiuser hasn't been touched in 7 years and there are virtually no docs. Some actual experiences with either of these and how they fare against the specs in my question would make this a more useful answer.
    – Caleb
    Apr 10 at 8:54
-1

Simplest solution is to just run a Dropbox or Syncthing sync client and configure your editors to auto save/load files changed in the background without any prompt.

If you're on different editors, there isn't really much more you can do. Different editors have very wildly different editing philosophy that it makes much sense to sync them up beyond syncing files.

If you want everyone to look at the same file, you can just drop a special marker comment, e.g. #JUMPHERE. Everyone can then configure their editors to :grepto jump to these marker comments to sync up their views. Or you can have one person do a screen share so everyone have a common view they can refer to.

2
  • 1
    And what about merging concurrent edits? Or does dropbox do that? It’s a challenging problem (there’s a reason git punts on merges that affect the same lines, although it can handle disparate edits)
    – D. Ben Knoble
    Sep 28 '20 at 12:38
  • This is not pair programming. I don't want everybody to look at the same file (or last saved/synced version) I want multiple people to edit in real time. This is just a recipe for clobbering each-others actions. Pair programming requires seeing the other person's cursor and edits in real time.
    – Caleb
    Oct 9 '20 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.