Live data from Hacker News

Notes on switching to Helix from Vim

jvns.ca

211–220 of 242 posts

Re: Notes on switching to Helix from Vim

#211
post #177
post #56

Earlier quoted context omitted.

> 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 the sequence right away I've been using Vim/Neovim for 20 years, but still can't get enough of which-key[1] which I only installed ~6 months ago. 1: https://github.com/folke/which-key.nvim

Yeah, that's the mortal sin of vim - insisting on shitty unergonomic defaults, requiring every new user waste time recreating a better UI while suffering for years before even the appropriate knowledge is acquired

I personally like Neovim's defaults since it fixes a few rough spots in old school Vim defaults.

Bonus is once you get used to defaults, almost every server has a Vi installed whose basic features you can use.

Re: Notes on switching to Helix from Vim

#212
post #95

Earlier quoted context omitted.

I don't have direct experience with either Helix or Kakoune but after only a few minutes tinkering around, I can see one big reason: In Helix, most of the basic commands seem to be the same as vi. Whereas I understand Kakoune inverts the action/movement paradigm of vi. Maybe that's a more sensible design, I don't know. I didn't check to see whether or not the key bindings were similar but at that point, it's rather m…

Helix inverts the verb-selection paradigm in the same way as Kakoune.

Appreciate the clarification, I guess I didn't get far enough into `:tutor` to see that.

Re: Notes on switching to Helix from Vim

#213

Earlier quoted context omitted.

I'd say that having a plugin with default configurations that is kept updated is a necessity. Because that's what enables me to use LSPs with a single line configuration.

Serious question: how often does a sensible default configuration need to change? I think I have used the same jedi-language-server config across projects and computers since before Neovim had a built-in LSP client, with the only changes being on the Neovim side gradually migrating to new features as they appeared. Obviously do whatever works for you. But I do feel like most LSPs shouldn't need more than a few lines…

Well, LSPs come and go so that's one source of churn.

Re: Notes on switching to Helix from Vim

#214
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.

What autocomplete and highlighting has to do with code quality? I would write the same output with and without "assists" anyway.

Re: Notes on switching to Helix from Vim

#215
post #207
post #190

Earlier quoted context omitted.

Check your understanding of ergonomics if you fail to see the obvious

Can you give at least a few examples? I have no understanding of ergonomics it seems

There literally is a plugin [1] containing sensible defaults that everyone in the community agrees would be good as default but “backspace” and “incsearch” are the most obvious. “Backspace” allows you to delete with the backspace key beyond the point where you pressed “insert”. I don’t think I’ve ever met someone who thinks the vim default (not allowing this) is ergonomic.

[1] https://github.com/tpope/vim-sensible

Re: Notes on switching to Helix from Vim

#216
post #160

I feel like I am not asking THAT MUCH from my neovim setup, but it is so complicated. My collection of vim config is about 1000 lines, that's insane, but when I try to trim it, everything seems required. My requirements: - language support (syntax, formatting) - lsp (I want the goto definition) - file browser - quick jump (fzf...) - a little bit of eye candy, nice fonts and a few icons to make things clear - auto rel…

So... have you tried Helix? Covers everything you're asking for, and doesn't require any config fiddling for it.

Re: Notes on switching to Helix from Vim

#217
post #190

Earlier quoted context omitted.

I have not seen any unergonomic defaults in vim. Check your understanding of vim philosophy probably.

Check your understanding of ergonomics if you fail to see the obvious

vi (the name) is ergonomical because of shortness (just two letters).

vi (the editor) is ergonomical because I use to touchtype and vi lets me to never put the hands out of the keyboard (typically its 3 rows but vi made me to learn the 4th row with digits).

vi (the system of text moving commands) is ergonomical because it has all what might be needed right from default.

I recommend you to start exploring vi from the following 4 commands to understand at least what kind of operations can be possible - w, b, e, ge. I promise there are some ergonomics in having all the 4 ways of one word iterating problem. After understanding what did I mean you are free to see some logic in _any_ vim command. (hint - pairness, there are almost no command without at least one complement pair).

Also there is a thing called "UNIX way" (all sayings about how one thing has to do only one task) and damn, vi clones are one of the most ergonomic programs on my PC. After mastering touchtyping using keyboard gives me pleasure, after mastering vi motions doing text editing gives me pleasure as well. Achievability of this kind of pleasure is what I call ergonomics.

GUI editors with modal windows and stealing-focus popups have too much power to destroy my pleasure from the dialogue with the keyboard.

Re: Notes on switching to Helix from Vim

#218

Earlier quoted context omitted.

ar_lan specifically mentioned Neovim distributions. Examples would be LazyVim and AstroNvim. These are packages you can install that provide Neovim in a pre-configured and opinionated way. They generally come with language servers, linting, and various other features out of the box, and have their own paradigms for configuration. They can be easier to get started with than just installing Neovim from scratch. But the…

The problem is that I must make these distributions fit within my well established configuration, which is not as easy as installing them on top of a blank one. Also it might be the fact that vim was never my main programming tool when IDEs were available for the programming task at hand. I debug as much as I write code, so having the debugger in the same context is important to me. These things may all sound like ex…

I think you're using asterisk, maybe *vim, and it's italicizing your text until the next *vim. You'd have to escape it with backslash.

Re: Notes on switching to Helix from Vim

#219
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.

What autocomplete and highlighting has to do with code quality? I would write the same output with and without "assists" anyway.

Wasting your time hunting down a missing string delimiter forces you to read the whole file line by line maybe, so they write better software having read it.

Re: Notes on switching to Helix from Vim

#220
post #190

Earlier quoted context omitted.

Check your understanding of ergonomics if you fail to see the obvious

vi (the name) is ergonomical because of shortness (just two letters). vi (the editor) is ergonomical because I use to touchtype and vi lets me to never put the hands out of the keyboard (typically its 3 rows but vi made me to learn the 4th row with digits). vi (the system of text moving commands) is ergonomical because it has all what might be needed right from default. I recommend you to start exploring vi from the…

> w, b, e, ge. I promise there are some ergonomics in having all the 4 ways of one word iterating problem.

Again, how can you promise anything if you're ergonomically blind? Take you w/b pair - this is just a dumb binding, these are two of the most frequently used commands in vim, yet they are not positioned in the most convenient location (hint: home row). The Word/Backword menmonic isn't paired (that would be forward/backward), but more importantly, it makes as much sense as binding cursor keys to Left/Up/Down/Right So it fails your own "pairness" criterion in its most basic movement!

> Achievability of this kind of pleasure is what I call ergonomics.

Of course you have your own personalized definition! Why would you use that in a conversation with others, though, when they're more likely using a more common one?

> there is a thing called "UNIX way"

it doesn't do its one thing "well", so as expected, you can't paper unergonomics over with some "philosophy"!

Post reply on HN