Live data from Hacker News

Helix-gpui: A simple GUI for the Helix editor

github.com

1–10 of 77 posts

Re: Helix-gpui: A simple GUI for the Helix editor

#3
post #2

What's a "modal editor"? I don't really understand what's so unique about this.

When you're not in insert mode, you have the whole alphabet of keyboard keys to act on the text without Ctrl/Alt/Shift/whatever combinations. So you can get a lot done with very few key presses, using shortcuts that make sense (e.g. "t." to select all text "to the next dot", and all that without straining your hands as you'd do when you use Ctrl/Alt/Shift modifiers. That last point is how I got into modal editors: Emacs keybindings were aggravating my RSI symptoms. It went away when I started using vim (and now helix).

Re: Helix-gpui: A simple GUI for the Helix editor

#4
post #2

What's a "modal editor"? I don't really understand what's so unique about this.

Modal editors like vim and helix have modes[0] that allow for different operations.

Vim has

- normal mode which allows you to enter commands to manipulate text rather than just type characters in the file

- insert mode which allows you to enter text into a file

- replace mode which allows you to replace text

and a few others.

Most editors like vscode, sublime etc only have a single mode that they are always in IE insert mode. Modal editors have additional modes that allow for additional capabilities.

[0]https://www.freecodecamp.org/news/vim-editor-modes-explained...

Re: Helix-gpui: A simple GUI for the Helix editor

#6
post #2

What's a "modal editor"? I don't really understand what's so unique about this.

Just an editor with modes. Ie in vim you have have the default normal mode (move with hjkl) to move around the code without having to move your hands over to the arrows, insert mode to enter text, visual mode to select text, etc.

Re: Helix-gpui: A simple GUI for the Helix editor

#7
post #2

What's a "modal editor"? I don't really understand what's so unique about this.

It typically means "something like vi", where there are "modes" like insert, normal, command, replace, visual, etc. that completely change the keybindings and are switched between by pressing certain keys in certain modes.

Re: Helix-gpui: A simple GUI for the Helix editor

#8
post #2

What's a "modal editor"? I don't really understand what's so unique about this.

Modal editing is an older concept, where by-default you can't hop in and start typing like normal. Most modal editors (including Helix) start you in a Normal mode, which is mostly used for reading and searching documents. Then you press a button (usually i or a) and get put into an Insert mode, where you can edit the text and type to your heart's content. Pressing escape will drop you back into Normal mode when you're done, where you can save the document and exit the editor.

It's a different workflow, but kinda nice when you want that IDE-style experience in a simpler interface like a TUI.

Re: Helix-gpui: A simple GUI for the Helix editor

#10
> Most modal editors are terminal apps, I'd like to change that and implement a good modal GUI editor.

That’s lovely, I’m doing the same. I’m using glfw and C++14 to build a vim-ish IDE. I never learned to love vim/nvim plugins, and make only basic use of macros and substitutions so that’s pretty much the feature-set. It’s very fun to build your own UI library.

Post reply on HN