Live data from Hacker News

Helix: Post-Modern Text Editor

helix-editor.com

141–150 of 169 posts

Re: Helix: Post-Modern Text Editor

#141
post #19

Earlier quoted context omitted.

Could you give an example of an edit you couldn’t express?

Say I am at the last line of a part of a function, that I would like to delete - maybe some debug output. In VIM, I will look at the relative line numbers and immediately see that I would like to delete up to the number 8. Then I simply write d8 or d8h, and I am done. As far as I can tell - I may be wrong - in Helix, I would have to first do 8 and then 9xd. Note the number 9 in there. This is due to the fact that in…

In Helix, you can use `maf` to mark the outer function and then press `d` to delete it.

Re: Helix: Post-Modern Text Editor

#142
post #19

Earlier quoted context omitted.

Could you give an example of an edit you couldn’t express?

Say I am at the last line of a part of a function, that I would like to delete - maybe some debug output. In VIM, I will look at the relative line numbers and immediately see that I would like to delete up to the number 8. Then I simply write d8 or d8h, and I am done. As far as I can tell - I may be wrong - in Helix, I would have to first do 8 and then 9xd. Note the number 9 in there. This is due to the fact that in…

Legit. You can do nicer than that in Helix’s defaults, but you're right that it won't match d-8-up’s concision: instead of 8-up-9-x-d ("8-move up-9-select whole lines below-delete"), you can do v-9-up-x-d, ("select-9-this line and above-the whole lines-delete").

If you're asking about what helix can do in general, though, as opposed to just the defaults, you can configure it to:

  - use relative line numbering
  - map a key (say, capital X) to the opposite of x’s behavior — or even better, to `[“extend_line_up”, “extend_to_line_bounds”]` ; the latter won't "eat" the first press by using it to select the current line.
  - make the same tweak to lowercase x
Combined, that will get you back to 8-X-d (“8-select whole lines up from here-delete”) to delete up through where you can see 8 in the gutter (and 8-x-d in the other direction).

Re: Helix: Post-Modern Text Editor

#143

Am I the only one that doesn't have any strong preference for some editor? I am always super impressed by all the comments stating how much of a night/day difference editors make to them. I have to say that I have tried many (VSC, neovim, Emacs and Spacemacs mostly) in the last five years but at the end of the day I feel like none makes such a difference to me so I just default to whatever my colleagues use to make c…

This is surely just the bias of those willing to make a comment one way or the other. If you are so-so about it, you probably don't make the effort to make a comment.

Re: Helix: Post-Modern Text Editor

#144
post #38

Interesting language support [1]. I might try it for some of my Python/Node projects (though it's hard to see a Python IDE that better than PyCharm). [1] https://docs.helix-editor.com/lang-support.html

Tree-sitter and LSP (language server protocol) are both global standards. If you support them then you automatically support any language that has a tree-sitter grammar or implements an LSP.

Not quite, it gets you about 90% there. Even with a grammar to use off the shelf, you still need to write queries to make use of it for highlighting, text object selection, auto indenting, etc. These have so far been particular to the editor.

Re: Helix: Post-Modern Text Editor

#146
post #25
post #20

For anyone who's used to fd/jk/kj/jj/jf or the like in Vim as an alias to ESC to exit insert mode, it looks like Helix is not too usable as of today: https://github.com/helix-editor/helix/issues/2612 I would've considered exploring Helix myself if it wasn't for this.

Remap capslock to CTRL when held and ESC when tapped. Good idea for vim too

CTRL+[ also sends ESC control code.

So you don't even need to map ESC on tap (I prefer to map layout switching to it).

Re: Helix: Post-Modern Text Editor

#147

Long-time Vim/NeoVim user here...about 20 or so years with it being my daily driver for the last 8. As soon as I found Helix, I was unsure whether it would become my new editor, but I've been using it every day for a few months and haven't really looked back. The only thing I still use Vim for is `vimdiff` with Git, but I don't think I need to, just been lazy about configuring Helix to do the same thing. Helix does e…

I used it for a few days, but the not-quite-vim keybindings also destroyed my workflow - I'm a slow learner, took me a while to figure out the few vim commands I know and I hate to relearn everything a bit differently.

Re: Helix: Post-Modern Text Editor

#148
post #137
post #52

Earlier quoted context omitted.

Looks interesting. I've always remapped capslock to CTRL myself, of course, but haven't thought of remapping tap-capslock to ESC. It looks like you need external software to do this though (like Karabiner Elements on mac, or xcape on linux, etc). (That being said, if you're used to jk/kj/fd/jj/jf, many years of muscle memory would still take a while to erase...)

Actually, MacOS can do this out of the box with no extra software installed. It's in the keyboard settings

You can only map CapsLock to a single modifier in keyboard settings? Which is how I've always had it myself (caps->ctrl) but that's not what's being discussed here.

Re: Helix: Post-Modern Text Editor

#149
post #118
post #85

Earlier quoted context omitted.

I use jj and jk to escape insert mode just fine...

I have the same, but it was difficult writing that essay about Dijkstra playing Blackjack in Reykjavik.

j and k are both fairly common index variable names.

Re: Helix: Post-Modern Text Editor

#150
post #25

Earlier quoted context omitted.

Remap capslock to CTRL when held and ESC when tapped. Good idea for vim too

CTRL+[ also sends ESC control code. So you don't even need to map ESC on tap (I prefer to map layout switching to it).

It's a matter of habit, I guess, but.

- Ctrl-[ is a chord that you have to press with 4/5 fingers using both hands at once.

- Whereas jk/fd etc are next to each other on the home row and pressed with 2/3 of the same hand sequentially.

Given the number of times you would have to exit insert mode, the second option is arguably more ergonomic...

Post reply on HN