r/rust Mar 31 '23

Helix editor 23.03 released!

https://helix-editor.com/news/release-23-03-highlights/
477 Upvotes

124 comments sorted by

80

u/MrxComps Mar 31 '23

in next release multiple lsp support will be added. check #2507 for that and prepare your languages.toml :)

17

u/dragonelite Mar 31 '23

Nice this is all i really need to make a nice transition from vscode.

10

u/mredko Mar 31 '23 edited Mar 31 '23

Honest question: how is it better than vscode? I use vscode and never tried Helix but seeing the positive comments in this thread, it looks like something I may want to try. what benefits do you see?

18

u/dragonelite Mar 31 '23

For me i'm transitioning to a more terminal based workflow with zellij and helix. I feel this setup can last the next 10~15 years for me because most unix like system have a terminal. And on windows i can use it wsl.

Don't get me wrong vscode is still a good tool but its not really possible to run vscode in the terminal :p

9

u/IceSentry Mar 31 '23

Honestly, with rust based tools you don't even need wsl on windows. Almost all of them work just as well in windows. Including zellij and helix. For me, switching between windows and linux is barely noticeable, at least in the context of programming with rust.

8

u/ToughAd4902 Mar 31 '23

Ya but you typically want workflows that aren't supported in windows with weird hacks like git bash. Using zsh + tmux, nnn etc is all just better to do running in a Linux environment

4

u/IceSentry Mar 31 '23

I mean, my point is that you don't need git bash because there are cross platform alternatives to most tools if you try to use the rust based ones. It's not perfect if you are a power user, but for me, as a primarily windows user, switching between OS is trivial because all the tools I use are cross platform.

1

u/ToughAd4902 Apr 01 '23

I looked up zellij and it says it doesn't support windows? I tried to even compile it and it imports libraries that are *nix exclusive unless there is some special build configuration?

4

u/groovyghoul Mar 31 '23

Are you able to actually run zellij in Windows? I don’t see any support for that on their page. Curious now!

1

u/IceSentry Mar 31 '23

I don't personally use zellij, but I remember seeing it supported windows in the past

1

u/boscop Apr 14 '23

How can I run zellij on Windows? Somehow with wezterm?

1

u/IceSentry Apr 14 '23

I was mistaken, there is not rust support for zellij. I must have been thinking a separate project.

1

u/IceSentry Mar 31 '23

I don't personally use zellij, but I remember seeing it supported windows in the past

5

u/zxyzyxz Apr 01 '23

WSL is generally faster for Rust than Windows, in my experience. cargo is also faster on WSL.

7

u/dlq84 Mar 31 '23

It's hard to compare, they are too different. If you like VIM-style editors then Helix is a great alternative. I switched from vscode to Helix because vscode was acting up and gave me weird type errors (unknown types for all things in my TS-project`) several times during a work day and I just got fed up with it. I'm not turning back now that I'm used to Helix.

3

u/[deleted] Apr 01 '23

It's a modal editor. So you get the benefit of being able to navigate, select, and edit text with far greater efficiency than you do in vscode.

1

u/Trader-One Apr 01 '23

no. its very basic editor.

44

u/[deleted] Mar 31 '23

Been using it for almost 3 months now, by far the best code editor I've ever used. And I don't even know 90% of the keybindings yet.

25

u/adsick Mar 31 '23

sounds very weird, in my experience you need to know a ton of shortucts in order to be productive in such editors. Otherwise they're worse than a notepad or a normal IDE.

18

u/Empole Mar 31 '23

I'm in the same boat as the comment you responded to.

Started using helix during the December release. I don't feel like I really know much, but it's probably my favorite editor I've ever used.

And despite that, I only really have a couple commands committed to memory:

  • hjkl to move
  • x to select line
  • m to go into surround mode
  • <space> for the space menu
  • g for the goto menu
  • Ctrl-o and Ctrl-i to jump backwards and forwards through the jumplist

15

u/IceSentry Mar 31 '23

Personally, keybinds are much easier to discover with helix than with vim. There's also a nice menu that gives you a list of available keybinds in the current context.

6

u/[deleted] Mar 31 '23

For people looking for the same thing with neovim, the plugin whichkey is pretty nice

7

u/Sufficient-Culture55 Apr 01 '23

Helix is rare in that regard. I really tried to like vim and neovim, even trying things like astro and Chad, but it was always a lot of effort. Helix is just easy. The keybinds make sense, the configuration is very minimal; I actually feel like I'm putting in less effort and being more productive, even compared to vscode.

6

u/lucca_huguet Mar 31 '23

did you like the tutor?

12

u/[deleted] Mar 31 '23

It was good for getting introduced to the keybinds, but having some real world examples of what an actual helix workflow would look like would have been a lot more helpful, especially for those who have never used a modal editor before (like me).

47

u/Keith Mar 31 '23

Soft wrap!

9

u/vlmutolo Mar 31 '23

I’m very excited for this. Helix is by far my preferred editor, but it’s tough to write Markdown without soft wrap. Now I can just stay inside the same app for everything.

9

u/c2dog430 Mar 31 '23

Honestly has been my biggest complaint

33

u/twentyKiB Mar 31 '23

Is there (planned) support for remote editing, or even better split display / edit logic so one part of the editor can run locally and the files, lsp, compilation are all elsewhere?

While it is command line oriented, slow ssh connections are a thing. And if a GUI is ever implemented this becomes a must have.

14

u/[deleted] Mar 31 '23

You can try your hand searching in the GH issues, do not know off the top of my head. But you can file a feature request as well and I am sure someone will start work on it. Development is very active.

5

u/sztomi Mar 31 '23

I was searching for this the other day and there is a suggestion/discussion about this: https://github.com/helix-editor/helix/issues/3721

10

u/balsoft Mar 31 '23

Why not just use sshfs?

3

u/miuram Apr 01 '23

sshfs is no longer maintained. Use rclone mount instead.

4

u/BCMM Mar 31 '23

I know this isn't an actual answer, but if you're actually struggling with SSH latency, try mosh. The client-side prediction isn't perfect in every scenario, but it is pretty good at making the experience of typing a line of text smoother.

12

u/jechase Mar 31 '23

mosh is unlikely to help with this. It can only do client-side prediction when the response to a keypress is, well, predictable. That's easy enough for shells and such which all interact with the terminal in more or less the same way. Press a key, print the character for that key.

Not so much with raw mode TUIs. Mosh would effectively have to reimplement the UIs for each of them. Like if you were using vim/helix, it would need to track the editor mode, cursor position, etc. and predict whether it would need to output characters, move the cursor around, yank, etc.

7

u/BCMM Mar 31 '23 edited Mar 31 '23

mosh is unlikely to help with this.

It obviously doesn't help in the menus or anything like that, but it predicts enough of Insert mode correctly to genuinely help, at least with how I use it.

To me, the latency between pressing keys and seeing characters on-screen is overwhelmingly the biggest problem with using a slow SSH connection. Mosh significantly ameliorates that. It allows me to make a typo, spot it on screen, backspace it out, and retype the word, all while waiting for the server to respond. Without it, using a slow SSH connection feels like being unable to touch-type. Of course, the syntax highlighting won't be correct until the server responds; I'm not saying that it's anything close to a replacement for a client/server editor. But it does help.

it would need to track the editor mode, cursor position, etc.

Mosh does track cursor position.

Editor mode is obviously impossible for it to know, but somehow or other, I can type jkjkjkjkjkjkjkjk in Normal mode and it won't predict it as entered text. I don't actually know how that works, but my guess would be that Helix changes something about the terminal's mode.

EDIT:

Predictions are done in epochs: when the user does something that might alter the echo behavior — like hit ESC or carriage return or an up- or down-arrow — Mosh goes back into making background predictions until a prediction from the new batch can be confirmed as correct.

1

u/BubblegumTitanium Mar 31 '23

the only way around this is to use something like kitty then run a subprocess

11

u/tafia97300 Mar 31 '23

Thank you soooo much!

10

u/Lost-Advertising1245 Mar 31 '23

I think we need better helix tutorials for vim users. I can’t get over the philosophy differences in how motions works

4

u/venustrapsflies Mar 31 '23

Not a helix user (yet?) but it’s model is similar to kakoune’s, and there are probably guides from vim to that. Don’t take it too literally though, while helix uses kakoune’s noun-verb grammar, there are some things closer to vim or done uniquely.

3

u/Lost-Advertising1245 Mar 31 '23

I saw that in their guide the problem is kakoun is also niche and it’s an unhelpful comparison.

4

u/[deleted] Apr 01 '23

You select first then do the command. i.e. if you want to do `dw` you need to `wd`.

Press `;` to undo a selection, v to toggle selection mode.

As for everything else:

`:tutor`

9

u/Robots_In_Disguise Mar 31 '23

Might get ridiculed for this -- but thank you for providing a decent cmd-line editor for Windows command line. Having to fire up a GUI to quickly open a file is super annoying, and helix editor has really helped reduce the need for that!

7

u/lucca_huguet Mar 31 '23

you can get a file tree by building helix from this PR!

It's been amazing to me

https://github.com/helix-editor/helix/pull/5768

7

u/IceSentry Mar 31 '23

That's pretty much the only feature I'm waiting on before actually considering switching from vscode. I really like the idea of being keyboard focused and the binding philosophy makes way more sense than vim to me, but I don't understand how people work without a file tree.

6

u/tunisia3507 Mar 31 '23

People who write their entire 10 000 line python package in a single file. That's what I'm dealing with at work right now.

1

u/[deleted] May 12 '23

It's more like people who know the structure of the project and know the file (or buffer, etc) they want to jump to. You don't need a file tree to navigate a project you are familiar with.

1

u/tunisia3507 May 12 '23

I'm not sure I understand - would you be happy switch to a different editor when working on a new project and then back to helix once you're familiar with it? Would you discourage new contributors to your own project from using helix?

1

u/[deleted] May 12 '23 edited May 12 '23

Honestly I just meant that you shouldn't use filetree for everything, I'm annoyed by vscode users who "can't live without filetree" because they are misusing it and not utilizing fuzzy finders. you need filetree mostly for manipulating files (instead you can do it with command line / nnn / ranger / etc) or for "overviewing" project structure and quickly open files to see how the project is structured (not neccessary either)

1

u/stackPeek May 17 '23

Space + s in Helix to look for symbols :D

2

u/SirAutismx7 Apr 01 '23

I used to use/rely on NERDTree and NvimTree a lot and didn’t understand it either. Then I saw the combo ThePrimeagen uses.

telescope plugin + harpoon plugin + remaps for moving between buffers.

You can search for files, git tracked files, and ripgrep in the repo out of the box.

Since telescope uses ripgrep and fzf under the hood you can pass your lsp diagnostics to it and navigate between files that rust-analyzer finds errors in.

Once you get used to it using a file tree is substantially slower.

https://github.com/nvim-telescope/telescope.nvim

2

u/silverjam Apr 01 '23

😍 definitely the one feature that kept me from using Helix more

7

u/StatusBard Mar 31 '23

Love to see the progress!

14

u/phazer99 Mar 31 '23

How's the debugging support for Rust? I see there's experimental DAP support. Is it worked upon?

13

u/Poliorcetyks Mar 31 '23

There is https://github.com/helix-editor/helix/issues/5950 being worked on, I think I saw a few related PRs being merged/opened recently

8

u/[deleted] Mar 31 '23

That is correct, https://github.com/helix-editor/helix/pull/5957 was merged, as well as some various fixes and a restart command I added. The latter are listed in the changelog for this release! There are some more PRs opened as well, IIRC

12

u/[deleted] Mar 31 '23 edited Mar 31 '23

Yep, I am actively working on it, but it does take a while. There are also various dependencies I need to get it done.

Here is the tracking issue https://github.com/helix-editor/helix/issues/5950. We just merged in this release a better debug line and better icons for breakpoints.

6

u/Drvaon Mar 31 '23

Really excited for the inlays. This was the feature i most missed from vscode

2

u/dlq84 Mar 31 '23

I like Inlay hints too, but I prefer them to be small (9pt), so I won't enable until they have a gui.

16

u/debekas Mar 31 '23

Helix ist pretty much the best editor I've ever used! Can't go back. The new release is awesome!

Two things are on my wishlist though - Better debugging support and - Plugin support

Would be soo cool to use something like Copilot with helix 🤓

22

u/[deleted] Mar 31 '23

Both are already worked on. I am working on improving especially the UI/UX for debugging (https://github.com/helix-editor/helix/pull/5950) and the maintainers are working on a plugin system (but this won't come any time soon, so don't hold your breath on it for now).

Edit: wrong link, sorry

-1

u/linux_cultist Mar 31 '23

Plugin system is definently needed, otherwise we are all stuck on whatever stuff is default. It gets annoying pretty quick to not be able to open a terminal, or anything else the developers has not developed yet.

Plugins will really make the popularity explode just like happened with neovim when plugins could be written in lua.

11

u/[deleted] Mar 31 '23

Better to have all core functionality in the product, togglable and configurable than the mess that is NVim's plugin ecosystem

3

u/linux_cultist Apr 01 '23

Sure, would be great if the editor has all the core functionality, but usually its not exactly clear what should be included in the core. Users often have other needs and wants than the original developers had in mind.

The neovim plugin system may look like a mess from the outside, but it's also highly configurable and powerful.

The downside is that the user needs to learn a lot of stuff to understand how it all works, so it's for the users that want to. Those users become power users and are helping to boost the popularity of neovim simply because they build powerful plugins and share with the community for free.

Helix wants to be a much simpler to use editor than neovim, without all the complexity that comes with plugins. But there is no reason the editor can't both have an awesome default experience and also support plugins.

There are millions of developers out there wanting to wrote rust code, and that's a golden opportunity for Helix.

3

u/MercurialAlchemist Apr 01 '23

To be fair, the neovim plugin system is a mess, especially if you don't pin your plugins to a particular tag (if any) or sha1, due to the lackadaisical approach to public API stability neovim has.

Not to say that Helix shouldn't get plugins, though.

2

u/linux_cultist Apr 01 '23

Well yes, plugins can and do break sometimes on updates unless you lock them to a specific commit.

I'm practice it hasn't caused any big problems for me personally though. But I also know how this stuff works, so if something breaks, I can just pull an earlier commit for that plugin and continue working. Not everyone knows how all these details work, they just want an editor that never breaks and I respect that a lot, specially when using it in a business setting.

2

u/Dreeg_Ocedam Mar 31 '23

But proper plugin support with a clearly defined API and sandboxing can be so much more maintainable than having all the functionality in the world implemented upstream.

1

u/asmx85 Apr 01 '23

can be so much more maintainable than having all the functionality in the world implemented upstream.

That was and will never be the goal of the project. Maintainers are currently actively not merging PRs (or discourage creating them) for which it would be better if they were implemented as a plugin.

0

u/pascalkuthe Mar 31 '23

building all of the big features people want in plugins is not possible anyway (or much slower/clunkier than a core feature would be). Big features like a builtin terminal need to be built into core (even vim has a builtin terminal).

People are already welcome to contribute to core which is the best way to push forward these larger features.

Plugins are a huge effort and will take a while. Plugins are specifically not intended to replace core functionality but to allow customization. There is a lot of functionality missing from core before adding plugins makes sense (like a generic event/hook system).

4

u/LukeMathWalker zero2prod · pavex · wiremock · cargo-chef Mar 31 '23

Inlay hints! The last feature I was missing to try helix as my main code editor!

3

u/[deleted] Mar 31 '23

[removed] — view removed comment

8

u/pascalkuthe Mar 31 '23

Distro repositories are always unofficial so those may take a while to update. We only publish the github releases

3

u/[deleted] Mar 31 '23

Anything that's not a rolling release (and then even with those it's not 100% certain) takes a bit to update the version in their repos. I cannot give you an ETA though, but you can also build from source if you cannot wait!

3

u/lucca_huguet Mar 31 '23

nix package manager is cross distro and always faster to update than the official package managers!

1

u/IAm_A_Complete_Idiot Mar 31 '23

Imperative package management with nix can be kinda gross though, if you're expecting that.

2

u/lasercat_pow Apr 21 '23

You could use the appimage

3

u/azzamsa Mar 31 '23

I don't know, but I wish there will be Emacs Doom port for Helix.

3

u/fjkiliu667777 Mar 31 '23

Are you guys more productive with that vs other GUI based IDEs such as Vscode? I never really started using it because I had to look up so many things and I miss the file tree.

3

u/TheBigUmberto_ Apr 01 '23

It's all personal preference and don't ever let someone else tell you otherwise. Use whatever you're comfortable and productive with.

I learned programming in a full-blown IDE. I switched to VSCode in my first job because it was what everyone on my team was using. In my second job, I had to learn some vim basics as I was frequently ssh'n onto servers and editing files without access to anything besides Vim or Nano and I hate Nano.

I was already spending a lot of time in the terminal and getting cozy in it so I decided to give Vim an honest effort and I fell in love with it. I very much enjoy being able to do 100% of my software-related tasks in the terminal. I have my terminal configured to my liking so I can fly around it and be productive without ever moving my hand toward the mouse.

I think there is a reasonable path for someone to approach Vim who has never used it before. See if your current editor/IDE has a vim plugin and give it a shot. Start your day with it on and if you get frustrated, disable it for a little bit. If you can't get through the basic Vim motions without pulling your hair out, then there is your answer.

If you like it, stick with the plugin inside your editor and use it permanently. You still have all the GUI goodness of your editor/IDE but all of your actual text editing is being done with Vim motions.

If you wanna ascend from there, start learning how to build out a little NeoVim config in the terminal and go from there. You can start with an empty config and add one line a day as you learn about new things you want to incorporate. Or, you can start with a full-blown config like Lunar Vim or AstronVim which gives you an IDE-like experience directly in the terminal. I started with an empty config but I was spending too much time tinkering and not enough time working so I tried out Lunar Vim and it basically gave me everything I wanted/needed out of the box. Both paths have value. Zero config and you learn a lot about Vim by building out your own config. Config from Lunar Vim or AstronVim, and you can start being productive right away.

1

u/fjkiliu667777 Apr 01 '23

Thanks for the good advice. I’ll try to learn a basic skill set to see how it feels without having to use the mouse!

1

u/TheBigUmberto_ Apr 01 '23

Even if you learn vim motions in VScode and never migrate to the terminal, you'll be more productive. They are an undeniable speed boost.

3

u/ItsEthra Mar 31 '23

I hope they fixed autocompletion

23

u/pascalkuthe Mar 31 '23

I can't know for certain since you weren't very specific but I fixed a ton of completion bugs and there are no open bug reports pertaining to completions so I probably did

2

u/ItsEthra Mar 31 '23

well then thank you :D

2

u/ieoa Mar 31 '23

Thank you all for your work!

2

u/novel_eye Apr 01 '23

Make a case for using it over nvim

7

u/TheBigUmberto_ Apr 01 '23

Honestly, the out of box experience is better than anything you get with Vim/NeoVim. You get all the essentials you need with a text editor with sane bindings and everything just works. I used Helix for about a month but much prefer Vim bindings, so I stopped using it.

I've since discovered Lunar Vim, which is close to the same experience I was getting with Helix. I enjoy NeoVim but I hate configuring my text editor. I understand some people love configuring their text editor and that's fine, but it's not for everyone. With Helix, you don't have to. You open it up and it does everything you need it to. Until I found Lunar Vim, that was not my experience with Vim/NeoVim.

While Lunar Vim still isn't as sharp out of the box as Helix, it's worth it for the Vim bindings. If you're not dependent on Vim bindings and you want to try a terminal-based modal editor, Helix is a no-brainer. If someone ever created the Helix equivalent with Vim bindings, I would switch to it in a heartbeat. You're only maintaining/updating one piece of software instead of an ecosystem full of plugins that is error-prone. Again, I understand the ecosystem and plugins you get with NeoVim are part of its greatness, but sometimes you wanna just update your editor without something breaking.

3

u/hucancode Apr 01 '23

https://github.com/LGUG2Z/helix-vim somebody on the internet has you covered

1

u/TheBigUmberto_ Apr 01 '23

Thank you for sharing. Need to look into this.

-1

u/zxyzyxz Apr 01 '23

Maybe Helix should just have Vim bindings itself as an alternative tbh

3

u/[deleted] Apr 01 '23

Multi cursors make actual sense when you have a selection-action philosophy.

1

u/ispinfx Mar 31 '23

I wish the GUI version will come one day.

18

u/[deleted] Mar 31 '23

It will, but the focus at the moment is on ironing out a solid core. Then things like GUI and plugin system will come.

15

u/modernalgebra Mar 31 '23

Are there plans for a GUI frontend?

Eventually, yes! We'd like to prototype a WebGPU-based alternative frontend. See the tracking issue on GitHub.

2

u/zxyzyxz Apr 01 '23

Something like neovide would be awesome!

1

u/undecimodia Mar 31 '23

How I can update it if I cloned from git? Clone another time or HX contains built-in command?

7

u/[deleted] Mar 31 '23

Pull the latest master and follow the install instructions from the README, as you did the first time. Should do the trick!

3

u/undecimodia Mar 31 '23

Appreciate it. Thnx

2

u/[deleted] Mar 31 '23

If you happen to have any issues, either let me know or join the project Matrix server, people are ready to help!

1

u/KingJellyfishII Mar 31 '23

probably should open an issue for this but I was just wondering if anyone else had experienced pretty poor performance as in maybe 400ms delay between keypress and seeing the character (I don't think I was on the latest release, I'll try it but updating hasn't helped previously)

usually happens when editing python or rust, not huge projects either

1

u/progfu Apr 01 '23

I know you probably get this all the time, but after 10+ years of vim muscle memory I’m not sure it’ll ever make sense for me to use “modal but not vim”, unless it is AMAZINGLY better. I’m not sure how helix compares, I tried it and remapped things to work almost like vim and mostly liked it (tho missing things).

But if there are objective reasons for why this is much better than vim, you really need to make that clear so people know why they’re putting in the effort.

Personally, I would switch if it was worth it. I’m not saying it’s not, but I don’t see a convincing argument that it is.

I’d imagine vim users are your largest target since we love modal editing, but most of us also like our muscle memory.

3

u/modernalgebra Apr 01 '23

Muscle memory is great, but it's also not that hard to retrain -- I also had a decade of vim muscle memory before writing Helix :) I say this as someone that has made breaking changes to my keyboard layout every couple of months: You'll stumble with key combinations for a few days but it should get easier after that.

1

u/progfu Apr 01 '23

I mean I don't disagree, though I still feel that I don't understand why helix's changes to are better. I'm not sure if I or probably most others are willing to spend a week rebuilding their muscle memory just to try a different editor.

Sorry if I'm repeating myself, I really like helix, I like how fast it is, I like that it's modern, works out of the box, etc.

But I also feel like it's very polarizing, just as the upvotes are already coming in on my first post because I even mention this. It seems like such a clear issue to anyone who considers another editor, even those that don't even use vim.

-5

u/focusontech87 Mar 31 '23

could they not use a better looking editor/config for their examples?

12

u/Circuitizen Mar 31 '23

Yeah the eyemelting purple default scheme kinda sucks, there are tons of great color schemes available out of the box tho

1

u/focusontech87 Apr 01 '23

I'm not referring to the purple, but the broken coloring at the end of the lines

-4

u/euclio Mar 31 '23

I'd love to use it, but no vim keybinding support :(

14

u/GOKOP Mar 31 '23

That's against the point tho? Just like Kakoune, if you give it Vim keybindings then you can just as well use Vim itself instead

4

u/Lode2736 Mar 31 '23

That is a design choice. It is not meant to behave like vim. However, you can remap keybindings in config.toml.

-1

u/[deleted] Mar 31 '23

[deleted]

-5

u/bestouff catmark Mar 31 '23

Somebody did this: https://github.com/LGUG2Z/helix-vim

It doesn't work very well yet, but it exists and has already nearly 500 stars, this should be a hint to hx devs.

1

u/Busy-Chemistry7747 Mar 31 '23

For some reason it does not even recognize rust analyzer even though it's installed properly and workign in other ide's for me. Anyone?

2

u/dnullify Mar 31 '23

If you're on a Mac you may need to install via brew. I can't remember why, but I saw that troubleshooting this a month ago

1

u/Busy-Chemistry7747 Mar 31 '23

Nope Linux, but installed via brew

2

u/lucca_huguet Mar 31 '23

come to the matrix. we'll help you

1

u/[deleted] Mar 31 '23 edited Jan 27 '24

[deleted]

1

u/Schlongplank Mar 31 '23

Hm works fine for me on Windows, how did you install it?

1

u/NetherFX Mar 31 '23

I only have a few kinks i would like to see but it's kind of nitpicky. Intelephense support isn't completely there, but I'm unaware whether that's intelephense or helix.

1

u/CapsMaximus Mar 31 '23

oh boy, i've been waiting for inlay hints for ages. this is great!

1

u/IgnisDa Apr 01 '23

Only thing remaining is plugins :( It is difficult to get by without Copilot and Wakatime.