DEV Community

Muhammad Osama Arshad
Muhammad Osama Arshad

Posted on

How to install Xi Editor

Xi

I recently went though this blog post by Nikita Prokopov. That post was both an eye-opener and a relief that someone has finally pointed out the extreme flaw in the design of most modern applications.

Nikita referenced a few projects in his post that are performance focused and are under active development. One of these caught my eye.

And of course, it was a text editor. Xi Editor has been conceived by Raph Levien and is focused on all the right stuff.

  • High Performance
  • Reliability
  • and Customizability

It's built using Rust and is still in early stages of development so, it's not really usable at this point. There is currently no installer or package available. The only way to install it is to build directly from the source.

It took me some time to figure out how to install and run Xi, so I decided to write a post to ease the process for others.

Xi is based on a client-server model. There is a backend process known as the xi-core which basically runs in the background and is responsible for all the editing of the files.

Installing the backend

The Xi backend is just a process that is running in the background. To install and compile it make sure you have the latest version of Rust installed on your system.
First step is to simply clone the Xi repo to a folder on your machine.

$ git clone https://github.com/xi-editor/xi-editor.git
Enter fullscreen mode Exit fullscreen mode

Navigate to the rust folder inside the xi-editor repo,

$ cd xi-editor/rust/
Enter fullscreen mode Exit fullscreen mode

And run the build command to compile Xi,

$ cargo build
Enter fullscreen mode Exit fullscreen mode

Installing the frontend

The above commands will install the backend of Xi. To actually use the editor, you will need to install one of the multiple frontends given on the official Repo. For the purposes of this tutorial, I will install the gxi frontend. It does not have a lot of features but it does enable us to edit and save basic files.

To install the gxi frontend, clone its in a folder of your choice

$ git clone https://github.com/bvinc/gxi.git
Enter fullscreen mode Exit fullscreen mode

Install the dependencies,

$ sudo apt-get install libgtk-3-dev
Enter fullscreen mode Exit fullscreen mode

Now navigate to the gxi folder simply run the run command,

$ cd gxi
$ cargo run
Enter fullscreen mode Exit fullscreen mode

This will open a basic text editor sort of like Notepad on Windows, only with less features. As I said before, Xi is not really usable at this point but I'm hopeful for the future. I hope I can finally be able to get an editor that is faster then Sublime Text and is open-source.

Top comments (4)

Collapse
 
ajinkyax profile image
Ajinkya Borade

why an Text Editor !! They could have built an IDE !! we already have notepad, Sublime text..
Pardon me, but I dont get the use case of XI editor in real world !

Collapse
 
javidev8 profile image
javiDev8

I think on how the most of the editors get buggy when you install a lot of plugins, (that is why an editor instead an IDE, because is highly costumizable)

Collapse
 
jillejr profile image
Kalle Fagerberg

Wow that blog by Nikita was a good read indeed. Thank you for spreading love about Xi, that's a really cool project. Projects like those give me motivation for better craftsmanship