6 ms·
Helix-gpui: A simple GUI for the Helix editor
- wkat4242 2y agoWhat's a "modal editor"? I don't really understand what's so unique about this.
- cbolton 2y agoWhen 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).
- bern4444 2y agoModal 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/ https://www.freecodecamp.org/news/vim-editor-modes-explained...
- lifty 2y agoa modal editor is an editor with different editing modes, like Vim or Helix. Notepad for example is not a modal editor, and neither is VSCode by default.
- paranoidxprod 2y agoJust 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.
- senkora 2y agoIt 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.
- talldayo 2y agoModal 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.
- Lyngbakr 2y agoI'm a happy Helix user and I'm curious what the benefit is of this over terminal-based Helix?
- dcre 2y agoIn general, the benefit of a UI would be that you can draw things you can't draw when constrained to a grid of characters, and you can have interactivity you couldn't otherwise have. It would be more like VS Code or Zed but with the Helix editing model underneath. (Worth noting one of the maintainers said only a couple months ago: "this is really far away right now as helix needs large architectural changes before writing a GUI is even feasible/a good idea."[1]) [1]: https://github.com/helix-editor/helix/issues/39#issuecomment-2000300124 https://github.com/helix-editor/helix/issues/39#issuecomment...
- Lyngbakr 2y agoAh, I see. Would this come at a performance cost? (My only experience with GUI editors is VSCode, which feels sluggish compared to Helix.)
- dcre 2y agoNot necessarily. Zed is designed to be very fast. Worth looking into. https://zed.dev/ https://zed.dev/ Both VS Code and Zed have pretty comprehensive (and in the case of VS Code, widely used) Vim modes, so it would really be quite a lot like that.
- lsllc 2y ago+1 for Zed [running in vim mode]. It has best-in-class tree-sitter and LSP support (not unsurprising since Max Brunsfeld of tree-sitter fame is one of the founders).
- zokier 2y agoArguably native drawing should be faster than going through terminal subsystem, all other things being equal.
- leecommamichael 2y ago> 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.
- turboponyy 2y agoThe best graphical, modal text editor is Emacs.
- beyondCritics 2y agoEmacs is far from being modal though ...
- karthink 2y agoEmacs' keymap system is fully modal by design. This state machine is why it's possible to fully implement evil-mode (and many other modal editing UIs, like boon, lispy etc) quite easily on top.
- createaccount99 2y agoTaking "quite easily" on a walk there
- turboponyy 2y agoEmacs is whatever you want it to be, and it has wonderful modal editing packages such as evil-mode[1] - which surpasses the editing system from vi that it is based on - and Meow[2] 1. https://github.com/emacs-evil/evil https://github.com/emacs-evil/evil 2. https://github.com/meow-edit/meow https://github.com/meow-edit/meow
- jhchabran 2y ago
- davefol 2y agoWhat has your experience using GPUI been like?
- jenadine 2y agoAlso wondering how stable it is (how often are they breaking source compatibility?) Since it is not released on crates.io
- kybernetikos 2y agoI'm a fan. I was looking for something a bit more like a vscode experience with kakoune/helix style keybindings, but everything seemed to be either 100% terminal or vim-style. I was quite interested in https://lapce.dev/ https://lapce.dev/ also written in rust, but as I say, vim-style rather than kakoune/helix style.
- cbolton 2y agoWhat's the thing that bothers you most in a terminal app like helix compared to a regular GUI?
- feel-ix-343 2y agono shadows, no blur, no animations ...
- eviks 2y agoApp detection, which breaks simple things like alt tab and more complicated things keyboard rebindings via external tools (and all the other cooperation with utilities based on app detection), then poor keybinding support of terminals with whole modifiers missing
- cbolton 2y agoWhat is app detection? Regarding poor key binding support, I think that's not really a problem in modern applications. Quoting https://gpanders.com/blog/state-of-the-terminal/ https://gpanders.com/blog/state-of-the-terminal/ : > Sending key presses as escape sequences requires that terminal applications are able to recognize and parse those sequences, so it is not something that “just works” out of the box. However, the kitty keyboard protocol has been widely adopted by both modern terminal emulators and terminal applications. Terminals which support the kitty keyboard protocol (to some degree) include Wezterm, Alacritty, kitty, foot, Ghostty, and iTerm2. Applications which support the kitty keyboard protocol (to some degree) include Vim, Neovim, Helix, kakoune, and nushell. This means that when using one of these applications in one of these terminals, all of the key encoding problems discussed above (as well as some others which were not discussed…) are solved. At least I indeed saw no such issue using helix in wezterm for example.
- k33st 2y ago[dead]
- dcre 2y agoFor anyone interested, here is the issue about auto-reloading. https://github.com/helix-editor/helix/issues/1125 https://github.com/helix-editor/helix/issues/1125 Another example of a missing feature in high demand is the ability to pipe info about the current file (path, line number, etc) to a command, e.g., for a custom git blame command. Fortunately there is a PR for that and helix is easy to build from source. https://github.com/helix-editor/helix/pull/6979 https://github.com/helix-editor/helix/pull/6979
- worldsavior 2y agoNot sure why would you use a GUI over the terminal, since it looks like a replica of Helix only using GUI components instead of terminal rendering.
- ldelossa 2y agoAll we want is a tree explorer :'(
- matrixhelix 2y agoFunny how the maintainers preferred to build a plugin system instead of just the tree explorer, I suspect Helix will lose its biggest feature: no plugins and easy configuration :(
- bobbyskelton41 2y agoConfiguration with scheme looks like it would be pretty similar. https://github.com/helix-editor/helix/discussions/10441 https://github.com/helix-editor/helix/discussions/10441
- frankjr 2y agoThat's probably not going to happen as part of the core editor (there's a long discussion about this somewhere on the bug tracker) but should be easy to add using the now work-in-progress plugin system. Scroll down to the Examples section. https://github.com/helix-editor/helix/pull/8675 https://github.com/helix-editor/helix/pull/8675
- bobbyskelton41 2y agoThere's already a plugin for it: https://github.com/mattwparas/helix-config/blob/master/cogs/file-tree.scm https://github.com/mattwparas/helix-config/blob/master/cogs/...
- innocentoldguy 2y agoI used to use tree explorers all the time, but once I discovered fuzzy-search file explorers, I never used a tree explorer again. It’s been too long for me to remember why I liked tree explorers before or why I stopped using them, so I’m curious, what are the benefits of a tree explorer over a fuzzy-search file explorer? I’m not questioning the usefulness or validity of tree explorers. I’m just trying to see things from a different perspective.
- mekster 2y agoIf you're in an environment to use GUI, there are plenty other more featureful alternatives. But good terminal editors are rare to be used within SSH sessions. (Vs code can do but editing root owned files aren't easy)
- jchw 2y agoEditing root-owned files by opening an editor as root is generally considered to be an anti-pattern. There is sudoedit as an option, but that also works with VSCode (and has the same limitations roughly.) The better option is probably just not editing root-owned files directly except in an emergency; there's usually better approaches to deploying system-wide changes.
- mekster 2y agoWhat would be the better approach to handle bunch of files in /etc/ without making the process reluctant? I don't want to git push/pull on every minor edit that I might revert the next minute. This also involves, directory listing that is only root accessible.
- jchw 2y agoGenerally, I think most people agree that directly editing live configuration files on systems is not the ideal way to manage systems. As for what to do instead, it strongly depends. On test or development systems, I suspect most people wouldn't bat an eye to just running Vim as root, but there are some other options: - Use configuration management systems to provision configuration changes: Ansible, SaltStack, Chef, etc. (And yeah, when testing on development or test set ups/VMs, you might first try stuff with vim directly. But if you are pretty sure you know what you want, you can also just do it in the configuration management system, test it, and provision it.) -- This may seem overkill for local configuration but it's pretty handy. - If possible, make use of features of your tools to require less root access. For example, in Nix there are various ways to move the Nix configuration for the system out of /etc/nixos and into a user directory, or some hybrid of the two. Maybe some services can be made rootless: either running as "user" services, or even under a rootless container. - Make use of permissions or ACLs to give write access to a non-root user or group. Then you don't need to be root to edit or provision the files.
- Charlie_e 2y agoBeing made with gpui means it's mac-only right? Seems worth mentioning for anyone not familiar with the library and an odd choice if the goal is parity with Helix.
- Flex247A 2y agoGPUI works on Windows too now. Can build Zed from the main branch.
- Charlie_e 2y agoI had heard of that but went off the fact that MacOS is still a requirement in the repo readme. Just had a peek in the build.rs and do see the windows target, which is great, Rust could definitely use some more cross-platform UI tooling
- efnx 2y agoI have a similar setup in using helix with Alacritty. Of course Alacritty doesn’t provide a GUI (being a terminal emulator) but it is a very fast stack that looks quite nice.
- erfhfdchdxd 2y agoGhry
- MaximilianEmel 2y agoWhy is this flagged?
- thegeekpirate 2y agoHey dang, it looks like this was flagged incorrectly.