-- Leo's gemini proxy

-- Connecting to gemini.hitchhiker-linux.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-US

NeoVim vs Helix

2023-11-09

For the past couple months I've been doing an experiment and using the Helix editor daily instead of either Vim or NeoVim.

https://helix-editor.com/


Like NeoVim, Helix is a modal editor with some IDE like features. Unlike NeoVim, Helix uses the Kakuone editor as inspiration for it's keybindings. The other major difference is that while NeoVim relies on Lua or VimScript plugins to extend it's functionality, Helix has a focus on integrating advanced features right into the codebase. This was the entire reason I wanted to try it. Rather than relying on plugins which may or may not retain a stable interface over time, which is definitely a problem I've encountered using NeoVim. Those features should also behave the same on all of the platforms which Helix supports. This is kind of major to me as well. I switch back and forth between two laptops, one with Void Linux and one with FreeBSD. Once upon a time I used kickstart.nvim as the basis for my init.lua. Then they changed it to use a different plugin manager which only supported Linux. Sure, it had the benefit that it would automatically find and install any binaries for things like language servers off the internet. But I have two major problems with that. First, I don't want it to do that. I'll handle what binaries are on my system, thank you. And second, not having FreeBSD support is a non-starter.


Adjusting muscle memory

The biggest difference to get used to with this setup is that you go from a verb-noun paradigm to noun-verb in normal mode. That is to say, instead of `d-w` to delete the next word you highlight the next word with w then delete it with d. If you type `d-w` then the character under the cursor will be deleted and the next word highlighted. After a week or so it becomes second nature, but the first few days are hard.


In my NeoVim configuration I had a file picker set up to use <leader>s-f. Helix brings up the file picker with `space-f`, so this wasn't a difficult adjustment.


One of the nicer things about navigating around Helix if you don't quite know what you want to do is that as you type in normal mode a fuzzy completion picker for possible commands will appear in the bottom gutter. This feature makes switching from another modal editor much easier than it would be otherwise.


(Most) Batteries Included

The most important features that I relied on plugins for in NeoVim were language server support, completions, snippets and telescope for a nicer file picker and some navigation aids. Helix gives you equivalent functionality out of the box. My ~/.config/helix/config.toml file is 15 lines long and just specifies overrides from the default behavior. Those overrides are the theme, adding a ruler at 80 characters, setting the cursor shape and wrapping.


The drawback is that if the Helix authors haven't included something as a feature yet then it just isn't available. Sure, you could write it yourself and push the feature upstream, it is open source. But there's no community of plugin authors and you can't just hack something together in Lua. As I stated before, Helix covers most of the bases for me already. However, it was written primarily as a code editor, so that has been the focus of the included features. One of the features it doesn't have yet is spell checking of any sort, making it less useful for more general purpose editing tasks such as writing this gemlog post.


Will I keep it?

Helix is the first editor in a long time that is tempting me away from Vim or NeoVim. I honestly couldn't say right now whether I'm going to keep using it or go back. It's incredibly powerful and definitely covers 99% of what I want out of an editor, with the added bonus of being orders of magnitude easier to configure than NeoVim. It helps that the defaults are mostly well thought out. If it had spellchecking that would be enough to make my choice.


Tags for this page

editors

programming


Home

All posts


All content for this site is licensed as CC BY-SA.

© 2023 by JeanG3nie

Finger

Contact

-- Response ended

-- Page fetched on Mon May 20 12:33:31 2024