Skip to content

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

Merged
ConradIrwin merged 55 commits intozed-industries:mainfrom
GoldStrikeArch:feat/add-helix-amp-jump-feature
Apr 23, 2026
Merged

helix: Add Helix's "Amp Jump" Feature#43733
ConradIrwin merged 55 commits intozed-industries:mainfrom
GoldStrikeArch:feat/add-helix-amp-jump-feature

Conversation

@GoldStrikeArch
Copy link
Copy Markdown
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 the two-character label shown on the target word
  4. 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 GoldStrikeArch force-pushed the feat/add-helix-amp-jump-feature branch 2 times, most recently from 8047f88 to e79905e Compare April 22, 2026 20:45
@GoldStrikeArch GoldStrikeArch force-pushed the feat/add-helix-amp-jump-feature branch from e79905e to 4927c11 Compare April 22, 2026 20:45
@GoldStrikeArch
Copy link
Copy Markdown
Contributor Author

@ConradIrwin Hi!

As per our conversation here I adjusted the current PR to use a new NavigationOverlay, so IMO we can proceed with what we have right now. The most changes are still in helix.rs file and now we don't touch anything in "editor core"

@ConradIrwin
Copy link
Copy Markdown
Member

Thanks. Let's put the color in the theme (not the settings), but otherwise think we can merge this.

Historically we've re-used similar colors, so feel free to do that (or fallback as appropriate)

@GoldStrikeArch GoldStrikeArch force-pushed the feat/add-helix-amp-jump-feature branch from 66251c0 to d523522 Compare April 23, 2026 10:42
@GoldStrikeArch
Copy link
Copy Markdown
Contributor Author

@ConradIrwin

Let's put the color in the theme (not the settings), but otherwise think we can merge this.

Done. Now it sits inside the theme colors and you can override it. Otherwise it will use the status.error which is usually "red color" in most themes (and is kinda what Helix is using by default as well).

@GoldStrikeArch GoldStrikeArch force-pushed the feat/add-helix-amp-jump-feature branch from aa14bb2 to 1ee2e3d Compare April 23, 2026 14:08
@ConradIrwin ConradIrwin enabled auto-merge April 23, 2026 17:29
@ConradIrwin
Copy link
Copy Markdown
Member

Alright, this seems to be working well. Let's ship it.

Thanks again for working on this, and hopefully the next thing will take less than 6 months to merge.

@ConradIrwin ConradIrwin added this pull request to the merge queue Apr 23, 2026
Merged via the queue into zed-industries:main with commit b359a42 Apr 23, 2026
31 checks passed
@github-project-automation github-project-automation Bot moved this from Community PRs to Done in Quality Week – December 2025 Apr 23, 2026
@redzovic
Copy link
Copy Markdown

Will it always be 2 characters or can this be changed via some setting to behave like nvims flash?

@niekdomi
Copy link
Copy Markdown
Contributor

@redzovic based on my understanding this PR here is helix specific and (likely) can't be configured, though with #52630 afaik it should be possible to write plugins for any kind of navigation e.g., flash. At least at some point.

@GoldStrikeArch
Copy link
Copy Markdown
Contributor Author

Will it always be 2 characters or can this be changed via some setting to behave like nvims flash?

@redzovic Yes, it will always be 2 characters as this is "feature parity" with Helix editor, it will also only work in Helix mode. I don't know how nvim flash works, but I know that there are other things like easymotions and similar plugins which all is doing this type of "jump label navigation" differently

@ksweetie
Copy link
Copy Markdown
Contributor

ksweetie commented May 1, 2026

FWIW, it works in vim mode, you just have to set it to a keybind. This works for me:

  {
    "context": "VimControl && !menu",
    "bindings": {
      "g w": "vim::HelixJumpToWord",
    },
  }

I've never used helix before, but one thing I found a little surprising is that instead of jumping the cursor to the label, it jumps to the end of the word that the label starts on, with the word selected (visual mode). I find myself always pressing esc and b afterwards to exit visual mode and move backward to where the label was. I assume that's how it works in helix. My preference would be to jump straight to the label, and to stay in the same mode that you started in (normal or visual). But I don't know if that's possible with the current setup.

Thanks for your work shipping this feature!

@Malix-Labs
Copy link
Copy Markdown

Yes, that's how selection→action motions work

@GoldStrikeArch
Copy link
Copy Markdown
Contributor Author

@ksweetie

FWIW, it works in vim mode, you just have to set it to a keybind. This works for me:

TBH I didn't knew it can work with Vim mode instead of Helix mode 😅

If we really want to make it compatible with Vim there should be some refactoring, so it can be used with both modes (in vim you will not select the word as in the Helix it is a default). Feel free to open a new issue and I will do it :)

@k-soomro
Copy link
Copy Markdown

k-soomro commented May 2, 2026

@ksweetie

FWIW, it works in vim mode, you just have to set it to a keybind. This works for me:

TBH I didn't knew it can work with Vim mode instead of Helix mode 😅

If we really want to make it compatible with Vim there should be some refactoring, so it can be used with both modes (in vim you will not select the word as in the Helix it is a default). Feel free to open a new issue and I will do it :)

Thank you1 I've been waiting for this feature and only upgraded to the preview version for it. I came here looking exactly for a way to make it behave more like vim/neovim

@GoldStrikeArch
Copy link
Copy Markdown
Contributor Author

@ksweetie I did implement a proper binding to g z (because g w is already taken in Vim for rewrap) and it works without selection here, please check out that branch and see if it works for you or not

@GoldStrikeArch GoldStrikeArch deleted the feat/add-helix-amp-jump-feature branch May 2, 2026 13:56
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

Development

Successfully merging this pull request may close these issues.