Live data from Hacker News

Notes on switching to Helix from Vim

jvns.ca

141–150 of 242 posts

Re: Notes on switching to Helix from Vim

#141

Earlier quoted context omitted.

All of this plus that with their approach of shipping an editor that is useable out of the box I feel a lot safer from supply chain attacks. No matter if VSCode or (neo)vim, needing tens of plugins from almost that many different parties always made me feel quite uneasy.

Their cargo.lock file is 3500 lines or so: https://github.com/helix-editor/helix/blob/master/Cargo.lock So, I kind of agree with you, but that’s still a lot of dependencies baked into the editor. It’s probably not as bad as Neovim+plugins, but it’s still a supply chain issue.

it's 317 unique crates, some of which are internal

  305 with helix- removed
  258 with gix removed (git stuff in multiple packages from a single upstream group)
  240 with windows api wrappers removed.
  170 if you remove all subprojects (split on -/_ taking first field, then uniq).
what's left?

  fast math and various hashes
  backtrace utils
  various build utils
  some allocators, zero copy facilities, mmap and structures   like lrus
  time and date handling
  character maps / internationalization
  concurrency libraries (futures, runtime, etc)
  cross platform path & directory helpers
  support for general unix platforms, for redox, for linux, for windows
  logging infrastructure
  some compression libraries
  markdown
  various testing helpers
  rope string representation
  shell lexer and utils
  terminal interaction models
  toml
  wasm & wasi
compared to neovim, which is hard to determine because c & cmake toolchains are a bit of a shitshow to figure out, but lets take a look at maybe debian, that says 34 package dependencies downstream. The list is clearly missing a bunch of the toolchain, has limited portability and so on, but certainly shorter at 34 - for a single platform. Note also that neovim bundles several dependencies (e.g. markdown and so on - so they're "hidden" (almost surprising debian hasn't done their usual trick of insisting this isn't hidden))

so where's the rest? well the rest is in the project: tokei says helix contains 132kloc. tokei says neovim contains 984kloc.

so round a little and you get: helix has an order of magnitude more dependencies, but also an order of magnitude less code than neovim.

while I'm sympathetic to concerns around dependency bloat, particularly with an eye to the js ecosystem and supply chain security, it's important to look through the right lens - when the functionality is fairly closely equivalent (there are differences, helix has a lot more modern features, vim has a lot more traditional text manipulation and unixy integration features), and there's an order of magnitude tradeoff in both directions - this is likely demonstration of fairly effective code sharing in helix.

there are important supply chain safety techniques required when using a wide number of disparately owned dependencies. there are also important supply chain safety techniques required when managing a wide number of disparately owned sub-directories of a larger project. there could just as well be a needle in neovims vimscript haystack as there is in helix dependency stack, i can tell you now though, as i'm familiar with almost all of helix dependencies i've put eyes over their code at least once, there's almost certainly been more eyes on helix deps recently than on neovims vimscript - though eye's passing over don't always catch things either of course.

Re: Notes on switching to Helix from Vim

#142
I tried Helix two years ago, unfortunately the default keymap was a bit frustrating to me. I don't mind changing my habits, however I had difficulty I made sense of the keymap design.

For example, typing `w` select the word. However, typing `2w` select the second word and not two words. To select two words you have to enter in visual mode (`v2w`). To remove two words you thus need to type `v2wd` or `wdwd`. In Vim you can type `d2w`. I miss this composability. In Kakoune (one of the main inspiration of Helix), you can type `2Wd` (`2wd` has the same behavior as Helix).

I was also hoping that the use of Ctrl/Alt modifiers be completely removed. Why not fully embrace modal editing?

Re: Notes on switching to Helix from Vim

#143
post #48

> crashes: every week or so there’s a segfault and the editor crashes. ... This doesn’t bother me that much though, I can just reopen it. Strange approach to data loss, since it doesn't have persistent undo, you can't just reopen it to the same editing state? > After using Vim/Neovim for 20 years, I’ve tried both “build my own custom configuration from scratch” and “use someone else’s pre-buld configuration system” a…

I think you completely missed the context for the configuration issues in vim: I’ve been trying to get a working language server setup (so I can do things like “go to definition”) and getting a setup that feels good in Vim or Neovim just felt like too much work.

[deleted]

Re: Notes on switching to Helix from Vim

#144

Earlier quoted context omitted.

Indeed, Vim has had ways to do this for years, before nvim. I suppose their point is that it comes out of the box? It is worded in a way that makes it seem like they think like there are no options. There are other things too, like pressing `*` then using `:%s` is no different than the behaviour they describe. I use a plugin that shows you all the updates live as you type making it essentially the same as multiple cu…

That is not the same as helix multiple selections. I suggest trying our helix to really understand. I really liked helix, but the problem is that pretty much everything I use is setup using Vim bindings (shell, browser, ideavim,...) so switching to helix concept of editing was different enough to require effort, but close enough that it screwed up all my other muscle memory.

Fair enough, I definitely made some assumptions there, but it sure sounds the same based on the description. I guess `%` selects more than just the token?

But ya, I'm way too invested in Vim to bother with Helix. I have years of scripts and plugins I've written. I can't even be bothered to switch to nvim (I tried once and was not fun).

Re: Notes on switching to Helix from Vim

#145
post #88
post #80

I tried to switch from neovim to helix for a couple weeks, but noted down the following things that were essential to me and not implemented yet: - Code actions on save, for example adding Go imports: https://github.com/helix-editor/helix/pull/6486 - Fuzzy search with a filepicker like telescope+rg, seems to have been added earlier this year: https://github.com/helix-editor/helix/pull/11285 - Automatically updating b…

Although the file explorer you link there was abandoned, a vim-telescope style explorer was merged earlier this year. However, when you already have a fuzzy-search based file picker built in, an explorer doesn't bring much extra utility.

Totally disagree. I find having both extremely useful. Once I start to get to know a code base jumping through files with telescope is super useful. But when I'm getting spun up on a project and don't know what files I'm looking for, a file tree is super nice.

Re: Notes on switching to Helix from Vim

#146
post #139
post #48

> crashes: every week or so there’s a segfault and the editor crashes. ... This doesn’t bother me that much though, I can just reopen it. Strange approach to data loss, since it doesn't have persistent undo, you can't just reopen it to the same editing state? > After using Vim/Neovim for 20 years, I’ve tried both “build my own custom configuration from scratch” and “use someone else’s pre-buld configuration system” a…

>> little help popup telling me places I can go. I really appreciate this because I don’t often use the “go to definition” or “go to reference” feature and I often forget the keyboard shortcut. > Exactly! Pity this basic contextual help isn't more widespread, every single app that uses a lot of keybind sequences could benefit from it, especially if it becomes a bit smarter and only shows a popup if you don't finish t…

Neovim with lazy.nvim has that by default (delay included).

Re: Notes on switching to Helix from Vim

#147
post #61

I cannot express how liberating it feels to opt out of "advanced" editor tools like lsp. I program in neovim with no plugins, no syntax highlighting and no autocomplete of any kind. There is a discipline that this imposes that I believe leads to better quality programs. It's not for everyone I suppose, but I really recommend trying it.

I recently found out that Mitchell Hashimoto has a setup like this, which blew apart my belief that you need modern tooling to be productive. Do you not find that you fatigue more quickly as a result of having to actively recall everything though? I can't understand how doing things like this would actually result in better code.

I'm not sure that's true. I've heard him talk in several interviews about using AI tools, including in his editor. Definitely not a minimalist setup.

Re: Notes on switching to Helix from Vim

#148
post #61

I cannot express how liberating it feels to opt out of "advanced" editor tools like lsp. I program in neovim with no plugins, no syntax highlighting and no autocomplete of any kind. There is a discipline that this imposes that I believe leads to better quality programs. It's not for everyone I suppose, but I really recommend trying it.

I do this when working on personal projects. I don't go this far though. I still like having syntax highlighting, and I have an LSP on to try in editor feedback on syntax errors, but I don't use auto completete or in editor documentation.

Re: Notes on switching to Helix from Vim

#149
post #18
post #10

Earlier quoted context omitted.

I use kakoune, and don't understand why helix seems to be taking off while kakoune (which predated and inspired helix) remains niche. Kakoune fully embraces the unix philosophy, even going so far as relying on OS (or terminal-multiplexer, e.g. kitty or tmux) for window management (via client/sever, so each kakoune instance can still share state like open buffers). A comparison going into the differences (and embracin…

I genuinely don't like the concept of the keyboard interaction in helix and kakoune, selecting things to modify them. I don't know what it is, but it somehow just feels much less satisfactory to me personally compared to the vim way.

I spent about a month trying to get used to Kakoune. It never clicked with me and I went back to vim.

My biggest beef with Kakoune’s editing philosophy is that it seems to emphasize “editing in the large” as its preferred mode of interaction. This is totally backwards to me. Editing in the large (making multiple identical edits throughout a buffer) is a rarity. Most edits in day to day use are single edits. So the fact that Kakoune likes to leave a bunch of extra cursors in your wake (like a trail of breadcrumbs) as you jump around a file to make single edits is extremely infuriating to me, like it’s trying too hard to be helpful.

The irony of Kakoune using a clippy-style contextual help window is not lost on me!

Re: Notes on switching to Helix from Vim

#150
post #139

Earlier quoted context omitted.

>> little help popup telling me places I can go. I really appreciate this because I don’t often use the “go to definition” or “go to reference” feature and I often forget the keyboard shortcut. > Exactly! Pity this basic contextual help isn't more widespread, every single app that uses a lot of keybind sequences could benefit from it, especially if it becomes a bit smarter and only shows a popup if you don't finish t…

Neovim with lazy.nvim has that by default (delay included).

I'm not Neovim person, but would you happen to know what plugin provides that feature?
Post reply on HN