helix: Add Helix's "Amp Jump" Feature#43733
helix: Add Helix's "Amp Jump" Feature#43733GoldStrikeArch wants to merge 27 commits intozed-industries:mainfrom
Conversation
|
I like this feature a lot. To me, it's the only thing that you really need from all these tools like easymotion, leap, hop, etc. Yes, this is the limited feature Helix happened to add, but I don't really think of it as a Helix feature as much as a general modal editing feature. As such, if this is added, I'd prefer it be available to vim too. |
We can extend it to the vim as well (in the separate PR) but there might be some conflicts of how people expect it to work compared to something like easymotions. The current implementation is how Helix implemented it and as I never used neovim/vim I don't really know how it should be implemented there 😅 |
|
Seems reasonable. Just know that there is some history/discussion on this sort of thing in Zed... #12106 That it's a much smaller diff may help. And I think it might help to sell it as something that could be the builtin modal editing label navigator. Not saying you need to sell it that way at all. But I use vim, zed, and helix and think it's a great general fit for any of them. |
0e2f28a to
9a1e395
Compare
|
Can you please share the whole section where you font is configured in
Also, I am not sure that I understand what is |
There are monospace fonts, and there are fonts where every character does not have a fixed width. In monospace fonts, This is my config, but you need to make sure that you have access to this font. If not, I am sure you can reproduce with any other proportional font. {
"buffer_font_family": "Avenir Next",
"buffer_line_height": { "custom": 1.4 },
"buffer_font_size": 18
} |
This is the "last resort" to not have an overlapping UI, if we can't have the label of the same font size then we shrink it a bit so it would fit. This is mostly in cases you have things like |
|
Appreciate the work to accommodate proportional fonts, but think this method of displaying labels is just inherently coupled to fixed width fonts. Perhaps some sort of calculation of the exact characters sets that can work for given locations is a possibility, but I just don't know that workarounds are worth it with the direct overlay design. #45387 is an example of using the Collaboration feature labeling concept. Whether that's better than this for fixed width fonts I'm not sure. |
|
Can you fix formatting and rebase on latest |
I merged (not rebased but I can do the rebase if this is mandatory) the latest main to this branch and also run the |
Merging is fine. Hmm seems like we have more conflicts to resolve. |
|
@kubkon I fixed the conflicts, not sure about the failing tests, need to see if they fail again |
|
@kubkon Hi, any update on this one? |




Helix Amp Jump Navigation
Overview
Implements Helix-style "amp jump" (
g w) navigation for jump-to-word functionality. This feature displays two-character labels on each word in the visible area, allowing users to quickly jump to any word by typing its label. Labels alternate between forward and backward directions (same algorithm as in the Helix) from the cursor position, giving closer jump targets easier-to-type labels.Context
How It Works
g wto activate "amp jump"Release Notes:
g w) that displays two-character labels on words for quick cursor navigation. Labels alternate between forward and backward directions from the cursor, prioritizing closer targets with easier-to-type labels. The color of the labels can be controlled via a newhelix.jump_label_accentsetting