https://github.com/helix-editor/helix/pull/12127#issuecommen...
It's rarely a good idea to do a bunch of work on a big change to an open source project in a direction that has not been validated by the maintainers. Or at least, if you do, do it for your own education and don't have high expectations that it will be merged. The contributor in question had a very good attitude about it.
I would really appreciate visible-by-default hints, alike in Linear.app. Then, learning shortcuts becomes organic, rather one need to keep tutorial open, or have a cheatsheet of some sorts.
Also the utility of these kinds of editors goes way down when you aren't doing many quick edits of arbitrary files ( which points to a larger workflow problem though perhaps unavoidable for some )
Yes, as an onlooker who is similarly cautious about moving to helix, I consider this to be a major risk factor. I've watched the maintainers waste dozens of hours of contributors' time, and leave the project with no improvement afterwards. I would actively warn against anyone trying to contribute to the project. The maintainers simply don't know how to run an open source project, and it's unlikely you will be able to accomplish anything. It's fine for a project to not accept contributions, and if you don't have the skillset to leverage contributor labor, then it's better to be upfront about it.
That being said, I hope they figure out the plugin system, or someone forks the project to add the missing table stakes features.
I really hope to be able to use helix again in the future though, there was a speed advantage in helix and less janky window management.
But for me to do that they might have to allow full vim motions as well
While this is good advice in general, it doesn't tell the whole story in the case of this specific project. The helix maintainers have a track record of giving very slow "no"s and wasting contributor time. They encourage contributors to fix various odds and ends, until the PR has been nit picked to death, and then finally the concept is rejected. Totally backwards, good project leadership would front-load the conceptual yay-or-nay before reviewing any actual code.
Is switching to Helix worth it? Can I get more-or-less equivalent functionality with Helix?
1. While Helix dev is on the slow side, I think what you’re describing as specific to Helix is in fact the typical case in open source
2. In this case the author did a bunch of work up front and the maintainers said no almost immediately after the PR was posted
I agree they could be faster to say no, but I think part of it is that the maintainers would have to agree themselves and as far as I know they are not getting together to come to consensus about random Helix PRs every day.
* Debugging is rough. There's experimental DAP support, but it isn't ready to be used. I was able to set breakpoints and step through the code, but the UI for exploring variables / state while paused felt missing or was unintuitive enough that I couldn't figure it out. I use CLion for debugging.
* Goto definition works with clangd as long as your CMake setup outputs compile_commands.json, which you already do.
* Renaming symbols (variables / functions) via clangd works fine.
* Intellisense is decent, but I had to tweak clangd settings. By default, it would stop returning results after scanning a certain number of symbols, so some valid functions just didn't show up. I was using Helix for a few days before realizing this problem, it isn't obvious that you are getting an artificially constrained filtered view of your symbols via default clangd. Maybe this is a distro packaging issue though?
* The order of intellisense completions is not great. CLion is smart about surfacing relevant suggestions first. In Helix + clangd, I often get obscure symbols that obviously have nothing to do with my project or context. It's not the worst thing, but it is mildly annoying and noticeable.
* "go to error" doesn't surface errors in files that aren't open. In Helix, space D brings up workspace diagnostics, but it only shows errors for compilation units already open. This appears to be a clangd issue, as space D in other languages will show all project errors. CLion does not suffer from this problem.
* I think you can get LLM suggestions via an LSP, but I've not tried personally. Assuming it's true that you can get LLM suggestions, it's not clear to me that you can run two LSP's on the same file, so it might be a choice between clangd and an LLM LSP? Not sure.
* No integrated build support. You'll probably end up building from a terminal. I use Wezterm with a custom lua script that is invoked on a hotkey. I put a lot of thought into the build UX, and what I've done is both extremely hacky and still not good enough.
Helix is not flexible, it's uncompromising. I like it, but I think it's hard to beat CLion or vscode for C++ development.
I'd say right now, if you have a good setup already, stick with what you have.
If you are interested in making a move to a terminal editor I would instead look to neovim until helix matures a bit more
Can you explain why you feel this way? From an outsider’s perspective, Helix seems like an impressive piece of software with a growing community. I don’t see what the maintainers are doing so wrong
I experimented with Helix a bit, and my experience (which uses a slightly different workflow):
* I need workspace folders. Even combined with fzf or similar tools, file navigation is nowhere as easy as in VSCode
* Debugging is important and missing
* Missing custom extensions that likely will never be ported to Helix even if there is an extension system
I do consider helix to be an impressive piece of software, and I agree that the user base is growing, not necessarily the set of effective maintainers though. The maintainers don't seem to have any aptitude for coordinating engineering effort. That would be fine, if they were honest and direct about it. SQLite is a project which does not accept contributions, I think helix should do the same.
Put differently, I don't expect the large community to have a meaningfully positive effect on the quality of the software, because the maintainers have not demonstrated the competency to effectively utilize that labor. I expect helix to continue slowly improving at whatever rate the maintainers can make important changes themselves.
There's a few rough edges that I'm trying to work through. I've been able to solve my "open in X" like key bindings. But I have yet to get things like "run test for current method". That's probably the biggest pain point I've had so far
For something like an editor, where whole features can be turned off by default, there's quite a bit of leeway to add bloat and get newcomers to buy in, without actually making the product worse.
For a programming language, a feature in the language has to be used by everyone. So the leadership has to say no a lot to keep the language high quality, and that makes it hard to get newcomers to buy in.
Unfortunately you can't have it both ways without paying people to maintain the project. Elm was good because the leadership said no...often. It's dead because the leadership said no so often that no one wanted to help maintain it. No one is going to waste their free time working on a project that won't accept their ideas, nor should they.
A language like Go doesn't have this trade off. If the Go leadership rejects a google employee's proposed language change, the employee still has to do maintenance chores as directed to keep their job.
To get started check out the installation instructions in order to follow along with the tutorial.
Create a new text file and open it with Helix by running hx file.txt. This is what you’ll see:
1
~
NOR file.txt 1 sel 1:1 Loaded 1 file.
Notice the NOR in the bottom-left corner, this indicates that you are currently in Normal mode. In this mode, typing letters like e and n won’t insert them as text, but rather have specific commands which we will explore later.
To actually insert some text, press i, which is the command to get into Insert mode, indicated by the INS in the bottom-left corner. In this mode, the letters you type will be inserted directly into the document.
Try it out by writing Hello helix!.
1 Hello helix!
~
INS file.txt [+] 1 sel 1:13
To get back into Normal mode press Esc. This will change the color of your cursor and you will see NOR again, indicating that you are in normal mode now.
To move your cursor you could use arrow keys, both in Normal and Insert modes:
However, this isn’t encouraged due to the fact that hand will be doing a lot of back-and-forth movement between the arrow keys and the keyboard.
Instead, it is recommended to rest your fingers on the “home row”, which is comprised of the row of keys a s d f g h j k l.
Instead of stretching to reach the arrow keys, use normal mode and h, j, k and l to move your cursor:
Try holding down h and l to move horizontally across the text you just wrote!
We only have one line of text, so let’s duplicate it several times. Type:
Spam p a few times to create several lines.
1 Hello helix!
2 Hello helix!
3 Hello helix!
4 Hello helix!
5 Hello helix!
~
NOR file.txt [+] 1 sel 3:8
Now you can try using the h, j, k and l motions to traverse the text!
Let’s say we want to replace one of the helix words with world. To do this, place your cursor on one of the h letters:
1 Hello helix!
2 Hello helix!
3 Hello helix!
4 Hello helix!
5 Hello helix!
~
NOR file.txt [+] 1 sel 3:7
e is a motion which moves to the end of the current word. Type e and it will move your cursor to the end of the helix.
It doesn’t just move your cursor there, though. The entire helix word becomes highlighted:
1 Hello helix!
2 Hello helix!
3 Hello helix!
4 Hello helix!
5 Hello helix!
~
NOR file.txt [+] 1 sel 3:11
If we now press b, which moves to the beginning of the current word, it’ll move us back to where we just were.
Try this out a few times, press e and then b to select various sections of the text. If you want to remove your selection press ;.
Let’s highlight our helix word again:
1 Hello helix!
2 Hello helix!
3 Hello helix!
4 Hello helix!
5 Hello helix!
~
NOR file.txt [+] 1 sel 3:11
Helix’s philosophy is that each action will act on a selection.
Every time text is modified (an action), you will fully anticipate the result — because you can clearly see the area of text which is highlighted, and thus will be modified.
For example, we currently have the word helix selected. To change it to world, press c,
1 Hello helix!
2 Hello helix!
3 Hello !
4 Hello helix!
5 Hello helix!
~
INS file.txt [+] 1 sel 3:7
c removes the contents of the current selection and places us in Insert mode, where you can then write your new word. Exit back to Normal mode by pressing esc.
1 Hello helix!
2 Hello helix!
3 Hello world!
4 Hello helix!
5 Hello helix!
~
NOR file.txt [+] 1 sel 3:12
The d command deletes the current selection and copies what has been deleted into a clipboard.
Let’s test it out by doing the following:
Select the line we just changed with x.
1 Hello helix!
2 Hello helix!
3 Hello world!
4 Hello helix!
5 Hello helix!
~
NOR file.txt [+] 1 sel 3:13
d to delete this line.
1 Hello helix!
2 Hello helix!
3 Hello helix!
4 Hello helix!
~
NOR file.txt [+] 1 sel 3:1
Spam p a few times to create some duplicates.
4 Hello world!
5 Hello world!
6 Hello world!
7 Hello helix!
~
NOR file.txt [+] 1 sel 6:13
Let’s remove all of our previous Hello helix! by doing the following for each Hello helix! line:
Now we have something like this:
1 Hello world!
2 Hello world!
3 Hello world!
~
NOR file.txt [+] 1 sel 2:1
What if we made a mistake, and want to go back? The u command will undo our most recent action. It’s similar to Ctrl + z in other editors.
Try pressing down u a few times to get to our previous state, before we made all those modifications:
3 Hello helix!
4 Hello world!
5 Hello world!
6 Hello helix!
~
NOR file.txt [+] 1 sel 5:13
U is similar to Ctrl + Shift + z in other editors. It will undo the last undo. It’s the inverse of u.
Press U until we get back to our most recent state:
1 Hello world!
2 Hello world!
3 Hello world!
~
NOR file.txt [+] 1 sel 1:1 Already at newest change
Feel free to make modifications to your file using the commands we have learned so far:
Once you are happy with your modifications, enter Normal mode and type :.
: enters command mode, which has commands you type out.
:w will write the current file.:q will quit the current file.:q! will quit without saving.:wq will both write and quit.┌──────────────────────────────┐
│ Write changes to disk and │
│ close the current view. │
│ Accepts an optional path │
└──────────────────────────────┘
write-quit-all
write-quit-all!
:wq
Let’s try out more Helix commands! Open the file again with hx file.txt. Select the entire file by pressing %
1 Hello world!
2 Hello world!
3 Hello world!
~
NOR file.txt [+] 1 sel 3:13
Now, delete the selection with d.
~
NOR file.txt [+] 1 sel 1:1
Using b to go to the beginning of the word and e to go to the end is useful if you are already at the word you want. But if you are far away, a very powerful command is goto word — gw.
1 **au**e **at**ates **as**ll
2 **ar**d **ap**e **an**ouds **al**ll
3 **aj**e **ah**n **af**ll
4 **ad**d **ab**e clouds **aa**ll
5 **ac**d **ae**e **ag**on **ai**ll
6 **ak**d **am**e **ao**on **aq**ll
NOR file.txt [+] 1 sel 4:13 gw
gw will create two letters at the start of every word in sight. When you type those two letters, you instantly jump to the specified word.
Let’s say we want to jump to the plates word. The first two characters have been replaced by at and highlighted. If we write at, we will highlight that word!
1 The plates will
2 and the clouds will
3 The sun will
4 and the clouds will
5 and the moon will
6 and the moon will
NOR file.txt [+] 1 sel 1:10
You can also replace a selection with contents of a register.
moon word by using gw and yank it with y.sun word and replace it with moon with R.Go to the first line by using gg.
To search for a word, use / command. Type will which is going to highlight the next will keyword, and then Enter ↵ to select it.
Since there are several wills in the text, you can cycle between them:
Select the clouds word using gw. If you press i, you will go into insert mode at the beginning of the selection. There are also 5 more ways to enter Insert mode:
Try all of them out!
Helix has a concept called registers, which is like having many clipboards at once.
To interact with them, prefix yank and delete commands with a ” and then the name of the register.
For example, the contents of the system clipboard are stored inside the + register.
Paste the following content into the file with “+p:
The plates willand the clouds willThe sun willand the moon will
Navigate to the last line by using ge for goto end.
1 The plates will
2 and the clouds will
3 The sun will
4 and the moon will
~
NOR file.txt [+] 1 sel 4:2
Select the last line with x and then yank it with y.
1 The plates will
2 and the clouds will
3 The sun will
4 and the moon will
~
NOR file.txt [+] 1 sel 4:18 yanked 1 selection to register "
Navigate to the second line by using 2gg.
Select the second line by using x and then yank into into the e register with “ey.
1 The plates will
2 and the clouds will
3 The sun will
4 and the moon will
~
NOR file.txt [+] 1 sel 2:20 yanked 1 selection to register e
Navigate to the third line by using 3gg.
Paste what we copied previously by using p.
1 The plates will
2 and the clouds will
3 The sun will
4 and the moon will
5 and the moon will
~
NOR file.txt [+] 1 sel 4:18
Notice how we haven’t pasted the 2nd line’s contents, but rather the last lines’? Because we yanked the 2nd line’s contents into the e register. To paste from it, use “ep.
” signals to the editor that we are going to use a register.
e uses the e register.
p pastes contents of the e register.
1 The plates will 2 and the clouds will 3 The sun will 4 and the moon will 5 and the clouds will 6 and the moon will
NOR file.txt [+] 1 sel 5:20
Take note of the fact that when we press p, it pastes the contents of the register after the line. To paste before, we undo with u and use P to paste before.
1 The plates will
2 and the clouds will
3 The sun will
4 and the clouds will
5 and the moon will
6 and the moon will
NOR file.txt [+] 1 sel 4:20
You can also search for individual characters by using t, which stands for till.
Copy the text below
Twilight fades; stars—whispering, bold—"Hope," they hum; yet shadows unfold...Life? A riddle—endless! Who'll dare,to seek; to dream: to wander—where?
Select the entire file with %
Override the selection by using Space + R.
Go to the first line with gg and use t; to go to the next semicolon. Repeat this several several times.
To move in the opposite direction, use T; to the previous semicolon.
Using t and T motions will move your cursor to just before the next or the previous occurrence of the character.
For example, te to go to the next e. T” to go to just before the previous double-quote.
The f for find is similar to t, but instead it places your cursor at the occurrence of the character. Try using f; several times. F goes the opposite way.
Each motion also accepts an optional count, which defaults to 1 if you don’t provide it.
Currently the text is fairly short, but we can fix that. Select everything with %, yank y and then paste it 100 times with 100p. This will create a very big file.
We can use these commands to scroll large chunks of text at once:
Now you know the basics of movement in Helix, it’s time to learn about the more advanced features Helix provides.