Are there any good collaborative code editors?
I'm sick of this antipattern of downloading files from git, sending pull requests, merge conflicts etc.
Why can't a group of us edit source code as easily as using Google Docs?
Are there any good collaborative code editors?
I'm sick of this antipattern of downloading files from git, sending pull requests, merge conflicts etc.
Why can't a group of us edit source code as easily as using Google Docs?
@Edent I'm using Zed the last couple of days, and they seem to have nice collab tooling. Although, I must say, that they only auth though github and they have received some (valid) criticism for that.
@Edent There’s https://codepen.io but not open source and limited free features.
@Edent vscode has a plugin for this which works really well, it’s called Live Share, and is basically what you describe, with some nice pairing specific stuff like being able to follow another user’s cursor or navigate around independently.
@Edent probably because it's very easy to leave code in a non-compilable state in the process of typing in your changes. The other coders in the team won't be able to compile or prepare for deployment until the code at least satisfies a syntax parser.
The discipline of manually committing changes, (and pushing / pulling / etc) means it's easier to hook in code quality checks before code is deemed 'ready' for production.
@Edent
Vim allow multiple, concurrent editors.
Step 1: Get everyone to agree to use vim.
Step 2: Get everyone to agree on the same vim config.
On the other hand, the editor may not be the best place to have everyone join. Maybe just let everyone access the files with ssh or whatever and then let them all use whatever editor they want?
@Edent
A Google Doc doesn't suddenly become unusable if someone else's addition is missing a semicolon. How do you maintain everyone's ability to compile or render the code independently when others are making additions and deletions?
@Edent https://subethaedit.net is still out there, as is https://www.jetbrains.com/code-with-me/
@Edent something like https://homepage.hackmd.io/ or the open source https://hedgedoc.org/ might work here?
@Edent There was a lot of talk about using a FOSS editor for shared document creation a few years ago but I think Google embedded the tech in their office products do it may have died. I haven't remembered its name yet.
@Edent I assume you don't mean like the shared Visual Studio Code thing? (And that you know about that?)
@Edent Because the most important part of programming is documenting when changes were made and why and having that factored into discrete changes that are each well motivated. Not producing code. And I don't see how the former happens with "everyone edits the file at the same time".
@Edent Zed is apparently good for this; I haven't used that bit but I like it as a solo editor
Half the replies to the above post are "No! It is impossible and doesn't fit any known workflow."
The other half are "Yes! I use it and it's incredible, let me show you how."
Fascinating.
(No need to reply to this message, I've muted the thread now.)
@Edent Dammit! You just reminded me a few years back I was working on a server/protocol for doing shared document editing specifically for code using a by line editing lock; unfortunately I think I got burned out by work and I never completed it, I think my end goal was for it to be generic so that way the server can be connected to via any client be it an extension for an IDE or a CLI program, I think I should revisit it
I've used Atom Teletype and found it quite nice. I prefer Sublime as my daily driver, but when pair programming I opened Atom just for this.
You open a directory, share a link, and they can read and type in the file that's in your active tab.
https://atom-editor.cc/teletype
Microsoft discontinued Atom and Teletype in 2022. It might still work, but they're pushing VS Code instead, which has a live share feature too, but haven't tried myself yet.
@Edent Not sure if anyone mentioned it yet, but there's some decent work going into Reflection:
https://github.com/p2panda/reflection
Not quite a code editor.. yet.
@goleztrol @dalias
Have you ever used GDocs?
Being able to see contributions from multiple people is the big one. Inline commenting, single click merges, are others.
It is such a superior text-editing experience.
@Edent @dalias Yes I use gdocs. But I mean they are conceptually equivalent. Someone makes suggestions on the side that can at some point be accepted or not.
Simultaneous editing is technically more challenging. Nevertheless, gdocs has it, and so do various code editing tools already mentioned by others. But then there's a cutoff point where you say: this is done, let's test and deploy it, like publishing a draft. That could go through a PR, or you might as well push straight to main.
@goleztrol Yes, but that's the same as editing non-code. Eventually you lock it off.
Anyway, if it isn't right for your workflow - no worries. I'm not trying to convince anyone.
@owenblacker I do not know about that and it may be what i mean 😄
@Edent @owenblacker I've been using tmate and Emacs or vi for that, but it may not fit your requirements
I thought I’d remembered something like that in VS Code, and sure enough, here it is!
https://learn.microsoft.com/en-us/visualstudio/liveshare/use/coedit-follow-focus-visual-studio-code
@Edent @owenblacker The VS Code shared editing is pretty good if you're happy with VS Code and its privacy concerns (I'm not!)
@zymurgic @Edent Yeah that's the obvious reason why "everyone edits all at once" wouldn't work, but I wonder what conditions could be created to allow it to work. I'm working on a very "broad" Ruby On Rails app, meaning we have many many views, controllers, and even many models, coding different parts of a big sprawling site. MVC style "separation of concerns". I think a few people *could* edit different files in parallel, but even then, make a syntax error in the User model it all tumbles down!
@harry_wood @zymurgic
And yet, judging by the replies, there are lots of editors which support this and have people using it.
@Edent @zymurgic Sure the shared editing tools exist. I had colleagues who tried using a plugin for Visual Studio code, but decided they preferred shared tmux sessions, however...
they were only using this for pair programming sessions, coding together on something related, while on a call, and then committing their changes to git as usual.