helix: Add Helix's "Amp Jump" Feature#43733
helix: Add Helix's "Amp Jump" Feature#43733ConradIrwin merged 55 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
} |
8047f88 to
e79905e
Compare
e79905e to
4927c11
Compare
|
@ConradIrwin Hi! As per our conversation here I adjusted the current PR to use a new |
|
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) |
66251c0 to
d523522
Compare
Done. Now it sits inside the theme colors and you can override it. Otherwise it will use the |
aa14bb2 to
1ee2e3d
Compare
|
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. |
|
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 |
|
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 Thanks for your work shipping this feature! |
|
Yes, that's how selection→action motions work |
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 |

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