Helix Text Editor: A Review

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
This is Helix, a relatively new modal text editor  that could be the definitive successor to Vim and   Neovim. So, today I will tell you my impressions  using Helix from the point of view of a basic,   non-expert user, and I will show you the main  differences that it has when compared to Neovim.   And, finally, I will tell you if I think that  it can dethrone Vim and Neovim. Helix comes   with great features out of the box, and the first  one I want to show you are the color schemes. By   simply typing ":theme ", Helix will show me all  the available themes and I can use the Tab Key to   browse through them. You don't need to install  any extension to get these themes. They come   built in with the editor. So, this is already  a big plus of Helix, because in Vim and Neovim,   you would need to download and install these  themes yourself, and the process is not   precisely trivial. As of this recording, Helix  comes with a total of 110 themes. What you are   seeing is only the first page of themes but, as  you can see now, there are three pages in total. Another important feature that Helix comes  with is multiple cursors. When editing a   file in normal mode you simply press shift  C, and an additional cursor is added below   the original cursor. And then, you can edit the  file: you can go into insert mode for example,   remove these characters, change something, go  back into normal mode and press comma to remove   the extra cursors. In vim and Neovim, you would  need to install a plugin to get multiple cursors,   so this is another win for Helix. I also really  like this menu that shows up on some actions,   for example, here I pressed G which is the  key to go to a certain point in the file,   and Helix is showing me different places I may  want to go to, including go to the top of the   screen, go to bottom, and go to center. And I use  these movements a lot for quick navigation in the   file. There is also tree-sitter, which creates a  syntax tree of your source code and allows you to   do things such as moving to the next function,  moving to the previous function, or moving to   different constructs in the programming language  that you are using. This is another functionality   that in vim and neovim would need to be installed  with a plugin. And the final feature I want to   mention is LSP, or Language Server Protocol,  which will allow you to have auto-complete,   as you can see on the screen, among other things.  The setup is relatively easy. If you execute the   Helix binary with the `--health` flag, it will  show you all the languages that it supports,   and it will also tell you what you need to install  in order to use the LSP for that language. In my   case, I want to have LSP for the C language so  here, as you can see, Helix is telling me that   I need to install clangd. So I will install  it using my distributions package manager. So, now when I run Helix with the "--health"  flag, it will show me that the LSP is okay. Now, I will open a C file using Helix and let's,  for example, start typing a line here. As you   can see, it's going to start suggesting me some  options to autocomplete. And now if I delete an   important line from this file, for example, this  one, as you can see down here Helix is telling me   that there are two errors. If I press space and  D it will show me the errors that it has found,   and as you can see, all we needed to do was  installing clangd. So, installing an LSP in   Helix is much easier than in other editors.  In summary, Helix tries to create a good user   experience out of the box, as opposed to other  modal text editors that are very barebones and   require the user to install plugins in order  to get basic functionality. And, in my opinion,   the Helix approach is much better. One reason is  time, because with the Helix approach, you don't   need to spend time learning how to use a plug-in  manager, then looking for plugins on the web,   selecting them, and then installing them. But,  another important reason is the fact that all   of these features are implemented by the same  Helix developers, which means that the whole   experience will feel cohesive and consistent. In  Vim and Neovim, if you start installing plugins,   it sometimes may feel like you're just sticking  things together with duct tape, instead of   creating a full consistent editor experience.  So, that's why I prefer the Helix approach. But now, I want to talk about other  important differences that Helix has with   vim and neovim, and here is where I have some  reservations, and you may have them as well. The most fundamental difference is that Helix  has a different text editing model. In Helix,   you first select the text that you want  to edit, and then you specify the action   that you want to apply to that selection. For  example, if I want to delete the current word,   I first type W, which selects the current  word, and then I type D to delete it. In Vim,   you would do the opposite: you first  say that you want to delete something,   so you type D, and then you specify what you  want to delete, in this case, W, for word. These models are known as selection-action and  action-selection or object-verb and verb-object.   The advantage of the Helix model is that you can  see what you are deleting before you delete it,   because selections are always visible, and this  advantage is valid for all the different actions:   replacing text, 'yanking' it, etc. However, it  also means that every time you use a word motion,   you also select the word that  you moved through. For example,   let's say that I want to move my cursor  to the end of this word, so I press W,   and now my cursor is at the end of the  word, but I have also selected the word,   and if I go into insert mode now, by pressing  I, my cursor will go all the way back to   the beginning of the selection, not to the  character that was just before the cursor. So, if I execute a word motion, and  then I want to go into insert mode   just before the current character, I have  to first deselect the word by pressing   semicolon (;), and now I can type I, and  I go into insert mode before the cursor. So, is the Helix model better than the Vim model?  I am not entirely convinced by the Helix model,   because I think it imposes a slightly higher  mental load on the user. When using Helix,   I feel like I have to be more aware, and keep  track of the selections that I make while   editing text, for the reasons I mentioned  before. The difference is not really big,   but it's noticeable. It could be just because  I haven't used Helix for long enough to get   used to it at an intuitive level, and maybe  if I keep using it the Helix, the selection   model will become second nature to me, but even  then, from the point of view of a Neovim user,   I don't know if being able to see the selections  before the action is worth such an effort. So,   I don't really know if the Helix model  is better than than the Vim model. And now, let's talk about configuration because,  in general, I like how Helix works in this aspect,   but there is just one important thing that  I really don't like about it. Helix looks   for configuration files in ".config/helix",  in our home directory and, as you can see,   Helix uses the TOML language for configuration.  The main configuration file is called config.toml.   This is my config.toml, it's very simple. Here, I  enable automatic insertion of pairs to parentheses   and brackets, and I also configure the mode  indicator to change color when I change mode,   for example, if I go into insert mode, it  changes the color, if I go into select mode,   it also changes color, etc. And there's a couple  more basic configurations here. And, in general,   I like how this config file works. I like the fact  that it's organized in sections, and the fact that   Helix configurations files are much shorter and  more readable than Vim files written in Vimscript. However, the thing that I really don't  like is that configuring indentation   width is more cumbersome than in vim and  neovim. For example, here I am editing a   C file that has tabs as indentation, and  these tabs appear as two characters wide,   as you can see. I want to increase these  tabs to look four characters wide. So,   if you search in the web you will find that  there's currently no way to globally change   the indentation with in Helix in a persistent  way. You can only change the indentation for   specific languages. For that, you need to  create a file called languages.toml and   define the configurations for your languages  there, but even then, the Helix documentation   doesn't explain which of these attributes  need to be included in order for it to work. After some trial and error, I arrived at this  configuration, which works for my purposes. So,   even though this was not that hard, I still felt  that the Helix experience is bad in this aspect.   You have to guess what attributes are needed and  which ones are not. There is definitely some level   of trial and error involved in order to configure  even one language. Maybe I am missing something   and I made a dumb mistake here, but even if that's  the case, Helix didn't make it easy for me to   do the right thing on the first try. So that's  something I dislike about Helix configuration,   and it's something that could be improved,  on both the functionality front and the   documentation front. However, the good thing  is that the rough edges of Helix like this one   will probably be improved as Helix gains  more adoption and continues progressing. And a final thing to mention, which  may be a deal breaker for some of you,   is that Helix doesn't support plugins yet.  I personally don't care too much about it,   because the features that come out of the box  are sufficient for me, but some of you may have   more advanced or specific needs when it comes  to text editing, so this is a thing to note. However, the Helix team has plans to  implement a plug-in system. You can   check the discussions section on their  GitHub repo to get more information. And now, let's recap and see all of the pros  and cons of Helix. Some of the the pros are:   first, the fact that Helix comes with  a lot of functionality out of the box,   like multiple cursors, tree-sitter, color schemes,   and the contextual menus that are of great help  to remind you of the available key bindings and   commands. The fact that Helix comes with  all of these out of the box also makes it   be more cohesive and consistent than other  editors. The ease of installation of LSPs   in Helix is also something notable when  compared to vim and neovim. And, finally,   the config files in Helix are much better, because  they are usually much shorter and readable. In the cons, we can mention lack of plugin  support, which is something that will get solved   eventually, and some pain points like how hard  it is to configure the indentation width, which   I hope will also get solved at some point. There  are also some important differences that I can't   classify directly under the pros or the cons. So,  the editing model in Helix is different from the   editing model in vim and neovim. Some people may  prefer the Helix model, but for Vim users, it's   going to take some time before they get fully used  to it, and I should also mention the fact that not   all keybindings from Helix are the same as Vim,  so that will also take some time to get used to. And the final question: can Helix dethrone  vim and neovim? I think that two conditions   need to be met in order for Helix to dethrone  them. The first one is that Vim users have to   be convinced that the selection action model is  better, or at least as good as the vim model.   Unfortunately the only way for a vim user to  decide this is to use Helix for a relatively   long time and get used to it, and I don't think  most users are willing to do that. And the second   condition is that Helix fixes some aspects of  the editor that degrade the user experience,   like the process for changing indentation  width. I think Helix has a lot of potential   and could eventually dethrone vim and  neovim if these conditions are met,   but the first condition will take some  considerable time. What is your opinion?   leave a comment below and if you liked the  video, please like and subscribe. Goodbye.
Info
Channel: Diego Sandoval
Views: 16,643
Rating: undefined out of 5
Keywords: helix, neovim, vim, rust, text editor, programming, linux
Id: tJHjCGHGQhw
Channel Id: undefined
Length: 13min 42sec (822 seconds)
Published: Tue Feb 20 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.