Skip to content

helix: Add Helix's "Amp Jump" Feature#43733

Open
GoldStrikeArch wants to merge 27 commits intozed-industries:mainfrom
GoldStrikeArch:feat/add-helix-amp-jump-feature
Open

helix: Add Helix's "Amp Jump" Feature#43733
GoldStrikeArch wants to merge 27 commits intozed-industries:mainfrom
GoldStrikeArch:feat/add-helix-amp-jump-feature

Conversation

@GoldStrikeArch
Copy link
Contributor

@GoldStrikeArch GoldStrikeArch commented Nov 28, 2025

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

  • Request: Implement "amp jump" navigation similar to Helix editor's jump-to-word feature.
  • Scope: Full implementation including label generation, UI rendering, and input handling.
  • Inspiration: Helix editor's "amp jump" and vim-easymotion/hop.nvim plugins.

How It Works

  1. Press g w to activate "amp jump"
  2. Two-character labels appear on all words in visible area
  3. User types first character (e.g., 'a') - labels are filtered
  4. User types second character (e.g., 'c') - cursor jumps to that word

img

Release Notes:

  • Added in Helix mode the "amp jump" navigation (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 new helix.jump_label_accent setting

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 28, 2025
@GoldStrikeArch GoldStrikeArch changed the title helix: add helix's "amp jump" feature helix: Add Helix's "Amp Jump" Feature Nov 28, 2025
@baldwindavid
Copy link
Contributor

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.

@GoldStrikeArch
Copy link
Contributor Author

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 😅

@baldwindavid
Copy link
Contributor

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.

@kubkon kubkon force-pushed the feat/add-helix-amp-jump-feature branch from 0e2f28a to 9a1e395 Compare December 19, 2025 13:12
@Dima-369
Copy link
Contributor

I tested it and since I am using a proportional font via buffer_font_family (I am using Avenir Next) in settings.json, the hints look a bit weird with some overlapping others because every character has a potential different width.

I wonder if there is any way to improve this for proportional fonts? Maybe there isn't?

Just leaving this here, since I am also interested in such a feature. Thanks for the PR!

image

@GoldStrikeArch
Copy link
Contributor Author

GoldStrikeArch commented Dec 25, 2025

@Dima-369

Can you please share the whole section where you font is configured in settings.json (or the whole file, either is good)? I will take a look at it

I wonder if there is any way to improve this for proportional fonts? Maybe there isn't?

Also, I am not sure that I understand what is proportional font?

@Dima-369
Copy link
Contributor

Also, I am not sure that I understand what is proportional font?

There are monospace fonts, and there are fonts where every character does not have a fixed width. In monospace fonts, i takes the same width as w. In proportional fonts, they are a different width.

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
}

@GoldStrikeArch
Copy link
Contributor Author

@Dima-369

Can you try again now please? It should work better now (we still might hide 3 letters instead of 2) but I checked the Helix's case and there you have an "overlapping" instead. I guess there is no easy solution for the proportional fonts

The Helix version with Avenir Next:

Screenshot 2026-01-01 at 10 00 33

Our version:

Screenshot 2026-01-01 at 11 36 49

@Dima-369
Copy link
Contributor

Dima-369 commented Jan 2, 2026

Can you try again now please?

Yes, it is okayish. Some hints are smaller for whatever reason.

CleanShot 2026-01-02 at 12 42 38@2x

I guess there is no easy solution for the proportional fonts

One could instead always show the characters below (instead of hiding them), and draw the hints with a rounded background color over the characters. Then ensure that the overlaid hints do not overlap each other, but then the UI is different to the Helix implementation.


Anyway, let's see what the Zed team says about this 🙂

@GoldStrikeArch
Copy link
Contributor Author

@Dima-369

Some hints are smaller for whatever reason.

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 if or some other "small words" and they are like at the end of the line and you can't really do anything about it (unless we use some other type of implementation)

@baldwindavid
Copy link
Contributor

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.

@kubkon
Copy link
Member

kubkon commented Jan 5, 2026

Can you fix formatting and rebase on latest main please?

@GoldStrikeArch
Copy link
Contributor Author

@kubkon

Can you fix formatting and rebase on latest main please?

I merged (not rebased but I can do the rebase if this is mandatory) the latest main to this branch and also run the cargo fmt to fix the issues with formatting

@kubkon
Copy link
Member

kubkon commented Jan 6, 2026

@kubkon

Can you fix formatting and rebase on latest main please?

I merged (not rebased but I can do the rebase if this is mandatory) the latest main to this branch and also run the cargo fmt to fix the issues with formatting

Merging is fine. Hmm seems like we have more conflicts to resolve.

@GoldStrikeArch
Copy link
Contributor Author

@kubkon I fixed the conflicts, not sure about the failing tests, need to see if they fail again

@GoldStrikeArch
Copy link
Contributor Author

@kubkon Hi, any update on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

Status: Community PRs

Development

Successfully merging this pull request may close these issues.

4 participants