DEV Community

Cover image for Exploring Zed, an open source code editor written in Rust
Megan Lee for LogRocket

Posted on • Originally published at blog.logrocket.com

Exploring Zed, an open source code editor written in Rust

Written by Nefe Emadamerho-Atori✏️

Code editors have become an indispensable tool for developers, enabling us to write, edit, and collaborate on code efficiently. A new contender has emerged and joined the code editor competition, and it promises to revolutionize the way developers work: Zed, a multiplayer code editor written entirely in Rust.

In this article, we will dive into what exactly the Zed code editor is, the features it offers, and its collaboration capabilities. Lastly, we will compare Zed with VS Code to see how both code editors stack up against each other. Let's dive in.

What is the Zed code editor?

Zed is a new, open source, multiplayer code editor written in Rust. It was developed by the creators of Atom and Tree-sitter — Nathan Sobo, Antonio Scandurra, and Max Brunsfeld. The team launched Zed in early 2023 and later open sourced it in 2024.

Zed sets itself apart with its lightning-fast performance and cutting-edge collaborative features. It positions itself as the fastest code editor in town and boasts higher performance than alternatives like VS Code, Sublime Text, and CLion.

At the heart of Zed's speed lies its innovative GPU-based User Interface (GPUI) framework. This GPUI framework harnesses the power of modern graphics processing units (GPUs) to rasterize the entire editor window, delivering high-level smoothness and responsiveness.

An important thing to note about the Zed code editor is that it doesn't just offer higher performance. It also provides a rich collaborative coding experience, which is highly needed in today's remote-first world: Screenshot Of The Zed Code Editor In Use

We'll explore more of Zed's collaborative capabilities later in this article.

Features of the Zed code editor

Let's explore some of the features that Zed provides.

AI integration

Here's a breakdown of Zed's AI capabilities:

  • GitHub Copilot support: Copilot can provide you with real-time AI-based suggestions. However, Zed doesn't support Copilot's chat feature, and that's where Open AI and GPT models come in
  • Open AI LLM support: Zed uses GPT models for its AI assistant. You can prompt the assistant to perform various tasks like generating code, converting code from one language to another, and documentation. Marshall Bowers, a member of the Zed team, wrote an article about the application of AI in Zed: Demo Usage Of Artificial Assistant In Zed

GPUI framework

As previously mentioned, the secret to the Zed editor's speed is its GPU-based User Interface (GPUI) framework. This framework leverages a new approach to building 2D user interfaces — like the code editor window — for applications.

User interfaces are traditionally rendered on the central processing unit (CPU). However, with GPUI, the entire window — including text, graphics, etc. — is rasterized or converted into pixels on the graphics processing unit (GPU), which is designed to handle graphics rendering tasks more efficiently than CPUs.

This approach results in faster and smoother delivery of pixels to the screen and allows the code editor's UI to be updated and redrawn faster.

Vim mode

Zed caters to developers who enjoy using Vim by providing a mode called "Vim mode." The aim of Vim mode is to make Zed familiar to Vim users. However, Vim mode will not be 100 percent Vim-compatible, and Zed will introduce its own functionality when and where needed.

Why did Zed create a Vim mode? Because it's written in Rust, and Vim is one of the top code editors for Rust developers. Hence, creating a Vim mode makes it easier for Vim users to switch to Zed.

Zed provides Vim bindings in Vim mode and uses Neovim for the bindings. Explore the docs to learn more about Vim mode.

Exploring Zed's collaboration and pair programming capabilities

A cool thing about Zed is that many of the features VS Code offers as extensions are built into Zed. The collaborative functionality is one example. While collaboration and code sharing are available on VS Code through Microsoft's Live Share extension, it's an out-of-the-box feature in Zed. Zed's collaborative capabilities allow you to:

  • Add contacts
  • Share projects with them
  • Track collaborator's activities on the editor
  • Converse with teammates via chats and channels
  • Share your screen

Let's explore these features in detail.

Adding contacts

The first step to collaborating with others is to add them as contacts. Before you can add someone as a contact, they must:

  1. Have a Zed editor
  2. Be logged into the editor with their GitHub account. This is necessary because you'll search for the contact with their GitHub username

While the process of adding contacts is straightforward, it limits the collaborative experience to only developers, as they are the only ones who commonly use these tools: Adding Contacts To The Zed Editor For Collaboration

Sharing projects

After adding a contact, you can call them by clicking on them. The contact will receive the call on their end, and once they accept it and join the call, the project has been shared. Ensure you only collaborate and share projects with those you trust, as sharing a project gives them access to your local file system: Sharing Zed Projects With Contacts In the screenshot below, you can see user icons at the top left, and the collab sidebar panel shows the different people on a call: Zed Editor Collaboration Environment Showing User Icons For Active Participants

Collaborator tracking

Zed's multi-cursor editing experience allows you to track collaborators via their cursors and avatars. This is particularly helpful when multiple developers are simultaneously working on a project, as it enables you to know who is working on what at a glance: Collaborator Tracking With Zed's Multi Cursor Editing Experience

Chats and channels

Another collaborative feature Zed provides is chat functionality. You can have discussions with contacts within the code editor. The chats also come with audio functionality, allowing you to have voice calls with others.

Then there are Zed's channels. These are similar to Slack channels and act as virtual offices for teams. You can set up channels for different topics, see who is present on each channel, chat with them, and even create shared notes for a channel. This helps keep your conversations organized: Zed Channel Like A Slack Channel With Shared Notes Note that the channels feature is currently free. However, the Zed team intends to make it a paid feature after its beta period.

Screen sharing

Zed also allows you to share your screen with others. Thanks to this feature, you no longer need to leave your editor and jump on a Google Meet, Zoom, or Teams call. Instead, you can collaborate with teammates right from the editor: Screen Sharing Feature Available Directly In The Zed Editor

Zed vs. VS Code: a comparison

Let's explore how Zed and VS Code stack up against each other.

Extensibility

Zed recently launched support for its extension registry. Before this launch, plugins and extensions were unavailable with Zed. However, with this launch, developers can now create their own extensions and share them with Zed users.

You can browse all available extensions by running zed: extensions in the command palette.

Adding extensions is crucial to Zed's success and will potentially help drive adoption. However, it has a long way to go before it can catch up to VS Code, which boasts tens of thousands of extensions. Regardless, Zed is on the right track, even though it has some catching up to do.

Themes

Zed and VS Code both provide light and dark themes. However, there are two major differences between these code editors in this regard:

  • Zed doesn't allow you to create your own themes. However, VS Code allows users to create themes and even share with others via the extension marketplace
  • Zed currently provides nine groups of themes, while there are hundreds of themes to choose from in VS Code's extension marketplace

Even though Zed offers fewer themes than VS Code, it does provide a solid variety of light and dark themes. So, this shouldn't be a dealbreaker, unless you're someone who changes themes often and would prefer having a wide variety to choose from.

User experience

There are some notable differences between Zed and VS Code regarding the user experience:

  • VS Code allows you to drag editor tabs from their current window into a new window, while Zed does not
  • In VS Code, when you zoom in, it zooms into the entire UI. However, Zed only zooms into the editor and leaves the rest of its interface (the sidebar and terminal) at its default zoom level
  • When using Zed, the system doesn't respond when you click on images in the file tree. However, when you click on an image in VS Code, it opens the image in a new tab, allowing you to see it

While these differences may not be dealbreakers, it's important to take note of them.

Performance

Data from Zed's team reveals that the Zed code editor offers greater performance than VS Code. In fact, Zed is eight times faster than other editors. Some would argue that this slight improvement in speed and response time is negligible to the human eye and the average user. Regardless, Zed is number one in terms of speed: Performance Comparison Between Zed, Sublime Text, Vs Code, And Clion Showing That Zed Comes First In Terms Of Speed Thankfully, we don't have to take the Zed's team's word for it. An experiment performed by tech educator and web developer Alex Ziskind revealed that Zed renders keystrokes faster than VS Code.

Ziskind's experiment showed that Zed rendered the keystrokes in 56ms, while VS Code rendered keystrokes in 72ms. Check out his YouTube video to see the experiments he ran.

Collaborative capabilities

Zed and VS Code both offer collaborative features that enable development teams to work together remotely. As far as collaboration goes, there are two major differences between Zed and VS Code:

As we've explored with Zed, you can:

  • Add contacts
  • Share your screen
  • Track a collaborator's activities
  • Chat with other developers

With VS Code's Live Share extension, you can:

  • Invite collaborators
  • Share and collaborate on projects
  • Track a collaborator's activities

So, while both code editors provide collaboration tools, Zed's are built in and more extensive.

Cross-platform support

As of this writing, one of Zed's biggest limitations is that it is only available on macOS. However, the Zed team plans to support Windows and Linux in the future. On the other hand, VS Code supports all platforms.

Data from Statista shows that as of 2022, Software developers use Windows more than any other operating system. This means that supporting other platforms will be key if Zed wants to enjoy high adoption and usage: Screenshot Showing Personal Computer Operation System Distribution For Software Development Worldwide Between 2018 And 2022 To Substantiate Claim That Zed Will Need To Begin Supporting Other Platforms Soon

Features

Here's a table showing the different features Zed and VS Code do — and don't — provide:

Feature Zed VS Code
Themes Yes, though limited 100s of themes available
Extensions
GitHub Copilot support
Syntax highlighting
Terminal
Collab panel and chat
Cross-platform support
Open-source
VIM mode
Supports multiple languages
Git integration
Debugger

Conclusion

Let's address the big elephant in the room: Zed vs VS Code — which should you use? As a wise senior developer once said, "It depends." But really, it does ultimately depend on different factors, including:

  • Whether or not you need plugins: A major selling point of VS Code is its vast plugin ecosystem. You can find plugins for several use cases, and they help streamline the development process. Zed currently offers very few plugins and doesn't allow developers to create their own plugins. If you don't mind that or don't need plugins, then using Zed wouldn't be a problem
  • Whether or not you use an Apple PC: Since Zed only supports Apple PCs, Linux and Windows users can't use it
  • Whether you work solo or collaborate with other developers: This may not be the most compelling reason to migrate to Zed, since VS Code's Live Share extension helps with collaborative coding. However, some developers might consider switching to Zed — or at least exploring it — because of its built-in collaborative experience

As far as adoption goes, I predict that Zed will face the following major challenges:

  • So many developers and teams are used to VS Code and may not switch to a new code editor unless it provides several benefits and features that VS Code doesn't offer
  • The lack of cross-platform support will definitely affect Zed's adoption

Zed is a great code editor for collaborative development. I like that it focuses on enhanced speed and performance while also offering a minimalistic coding interface. If it provides the features you need and you're interested in exploring its capabilities, it's worth a try.

Have you tried Zed yet? Feel free to comment below with your thoughts or questions.


LogRocket: Full visibility into web frontends for Rust apps

Debugging Rust applications can be difficult, especially when users experience issues that are hard to reproduce. If you’re interested in monitoring and tracking the performance of your Rust apps, automatically surfacing errors, and tracking slow network requests and load time, try LogRocket.

LogRocket Signup

LogRocket is like a DVR for web and mobile apps, recording literally everything that happens on your Rust application. Instead of guessing why problems happen, you can aggregate and report on what state your application was in when an issue occurred. LogRocket also monitors your app’s performance, reporting metrics like client CPU load, client memory usage, and more.

Modernize how you debug your Rust apps — start monitoring for free.

Top comments (5)

Collapse
 
atinypixel profile image
Aziz Kaukawala

The collaboration feature is easily available in VSCode by Microsoft's official Live Share extension.

Is zed fast?

Absolutely, after all its built on Rust while VSCode still uses electron.

Still waiting Zed to have Linux platform support and robust extensions support too.

Is Zed promising?

Yes, but so were Atom, Brackets & even Sublime Text (still my secondary editor).

Waiting to try it, eager & highly interested.

Happy Coding

Collapse
 
blazingbits profile image
BlazingBits

RIP Brackets

Collapse
 
atinypixel profile image
Aziz Kaukawala

It was indeed a lite weight editor, however the biggest issue with that was it was only able to keep 1 tab/file open at a time. This one issue was enough for me to outright uninstall it.

Collapse
 
schmoris profile image
Boris

For anyone curious, Zed is now available for compiling on Windows and Linux. Tried Windows yesterday night, took quite a while but it works and sometimes crashes. The build steps are very well described, the links are on the Zed download page. Happy compiling :-)

Gotta have rust (rustup and cargo) and visual studio (not vs code) with some extra component.

Collapse
 
megatux profile image
Cristian Molina

Used the OSX version and it is nice. Waiting the Linux version.