-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helix keymap #4642
Comments
Zed is pretty awesome and support for the helix bindings would be nice. Can we do a bounty for someone from the community/core to get this running? I am not so skilled myself 😀. I can do $100 for anything helix bindings related. |
Hey @3210jr - this is an extremely nice gesture; if I had to guess, I think the biggest blocker isn't that someone doesn't want to do it, it is probably more that at the moment, contributing to keymaps is a bit awkward at the moment. We don't have documentation on what all the contexts are, the source code of Zed is closed (not for much longer 🥳), the |
Zed + Helix would be extremely nice :3 |
I would absolutely love to have this. I've been using Helix as my main editor for several months. Having a GUI with the same ergonomics would be fantastic. |
Now that the repository has been open-sourced, what would be a rough outline of adding Helix keymap support? 🙂 |
I'm in the same spot but have to say, that i'll stick to helix itself. |
@JosephTLyons I think the request here would be to do a modal keymap that is Another thought long term - NeoVim crew embedded their engine into VS Code. You can run the editor window using NeoVim but within the rest of VS Code. Would be very interesting for Zed to do something like this where another terminal type engine could power the editor. Maybe a chance to get the best of both worlds. |
I would like to look into this as I use Helix in preference to vim when I can. But how to do it? Is it a complete new mode? Or is it a key-binding hack on vim-mode? |
@andreweades You'd have to introduce a new |
Also I do like the helix bindings but I don't like to retain the selection when returning using insert mode or append mode. I have this mapped in helix Also vim doesn't really allow you to select the newline character (or the emptiness at the end of the buffer). Helix does. I have a hard time differentiating a whitespace from a newline in helix so I hope the cursor changes colour or something when it is on a newline character. |
This comment was marked as spam.
This comment was marked as spam.
@clo4 Good point. I use a custom Helix keymap as some of my muscle memory from VIM does not translate well. I try to limit the amount of mousing as after 30+ years of mousing I have RSI in my shoulder so I like editors that have VIM and now Helix keys. I think selection->action makes a lot of sense so I would love to see it in Zed at some point and would not mind contributing when I have time. |
@JosephTLyons I wonder why this is not in the top ranking issues? It has more votes than a lot of the ones I see there. Is it because it doesn't neatly fit into one of the categories? Maybe it should be in the vim section. |
This would only be included on the top-ranking issues report if it had more likes than the item at the bottom of the |
This PR is a bit of a shot in the dark. I'm not sure if this will be acceptable and I understand if it gets rejected. I've been trying to integrate Zed as my daily driver and the key bindings have been a major hurdle for me. Mostly due to the windows/linux keybindings being messed up, but also me wanting to have more chained key bindings similar to helix or common in custom neovim configurations. I think having a `None` base keymap would allow someone to more easily implement a new base keymap (#4642) and would make my daily use of Zed a little nicer 😅. Also I am aware that there would need to be a little more work done in this PR for the other base keymaps such as 'atom' since they assume the 'default' (vscode) base keymaps are loaded. I'm happy to do that work if a 'none' base keymap is acceptable. Release Notes: - Added ability to specify no base keymap which allows for full keybinding customization
This PR is a bit of a shot in the dark. I'm not sure if this will be acceptable and I understand if it gets rejected. I've been trying to integrate Zed as my daily driver and the key bindings have been a major hurdle for me. Mostly due to the windows/linux keybindings being messed up, but also me wanting to have more chained key bindings similar to helix or common in custom neovim configurations. I think having a `None` base keymap would allow someone to more easily implement a new base keymap (zed-industries#4642) and would make my daily use of Zed a little nicer 😅. Also I am aware that there would need to be a little more work done in this PR for the other base keymaps such as 'atom' since they assume the 'default' (vscode) base keymaps are loaded. I'm happy to do that work if a 'none' base keymap is acceptable. Release Notes: - Added ability to specify no base keymap which allows for full keybinding customization
i would love to have helix support inside zed 💜 how i could contribute to achieve this new crate? i'm not the very best rust developer but i think i can mimic the vim crate somehow and do some tweaks to achieve |
@zoedsoupe There's some work at #11130, but the original author is unable to keep working on it. If you'd like to start working on that branch that would be very appreciated! We decided to stay in the same crate as vim for now (because that way we can re-use all the mode tracking, registers, marks, test support, etc.). once we have something more close to usable we can revisit that decision if necessary. |
I wonder how feasible it would be to embed the helix core into zed and use that for not just helix emulation but just straight up full helix support. Similar to how neovide does it for nvim |
AFAIK it is not possible now because helix does not have a splitting feature helix-editor/helix#312 @Suyashtnt. Based on the issue's title, Kakoune does have a client-server model? If that worked it'd also mean slightly different keymaps, and no support for the Helix -> Zed windows user.
|
We would prefer to build helix on top of our existing CRDTs so that extensions, collaboration, etc. work properly. |
I know this isn't a solution, but here are my settings.json and keymap.json files in case anyone searching for this topic wants a quick fix. It's not exactly like helix of course, but decently close. I added as many keymappings from here as possible. I've been using this for about a week and I like it, for now. I would still love to see an actual helix integration into Zed. |
Great keymap. There are some inconsistencies but it's a great start! One thing I noticed right away is that the basic word motions (like What do you say of creating a repository and working on this collaboratively? |
here are a few more ontop of @ericpko 's "n": "vim::PreviousWordStart",
"b": ["workspace::SendKeystrokes", "v n"],
"w": ["workspace::SendKeystrokes", "v e"],
"ctrl-v": "editor::Paste",
"shift-u": "editor::Redo",
"d": "vim::DeleteRight",
"x": "editor::SelectLine"
|
Hello, It would be great if it was possible to have the settings in multiple files, because currently it's pretty much impossible to directly use this repo as zed configuration file since we all have different preferences |
loved using this, you saved my a$$, ty! |
Maybe we should have a generator script that generates a file based on a couple questions, kind of like Powerlevel 10k |
As an alternative proposal, if one could point to the helix config file and translated it to zed, that way every-time you make a change in one both change. A piedra-rosetta of sorts, may be overkill and overcomplicated, but I think it would be the comfiest. |
This might be a bit out there, but has the idea of using modal editors within a terminal tab been discussed? You can currently open a terminal tab right next to a file tab, type hx 'filename' and use helix within Zed. If there were a way to just default to opening files in a terminal with a command, that might be an interesting way to easily get helix editing within the greater Zed environment. I have only played around with this, but if it were a built in feature where I could still easily add my files to LLM context I think it might just do it for me. Also could be a hotkey to switch between views? Just thinking out loud here, want to make sure this idea is at least mentioned. |
Quite frankly that seems a little pointless to me. The whole point of this would be being able to use zed's future extension ecosystem, including things that the terminal can't support like multiple concurrent font sizes (for type hints and such), smooth scrolling etc. If I want to use helix directly, what would be the benefit of using it in an integrated terminal instead of in an external one? |
I believe you’re right, it probably doesn’t make sense to consider this. I was thinking as someone who has been trying to pick up helix, it would be nice to have a file browser and integrated LLM assistant on top of the helix editor. But there would be too much else missing from this experience. |
Just so you know, there is a fork of Helix that implements support for Copilot, while the plugin support isn't ready. https://github.com/AlexanderDickie/helix/tree/copilot And for the file browser, you can always use tmux and one of the ranger variants. But the existing file picker is pretty good too. |
Does anyone know of a way to rebind movement in zed? Here's what I have in helix:
|
@hamzahmalik101 https://zed.dev/docs/key-bindings and https://zed.dev/docs/vim should get you started |
I feel the same way, I think Zed is fantastic and I would like to see this issue resolved! I just created a $100 bounty on Opire, if anyone wants to join and add more money to the bounty that would be great. I love the project and this way I can contribute my two cents. |
Wow, another Workman layout user! Small world! |
I don't know what the current state of this issue is but I'm particularly interested in having a mechanism where you can configure your own set of keybindings for modal editing (be it Vim, Helix, Kakoune, or something else). Maybe this belongs to an extension, but having native support would be a killer feature. Don't get me wrong, I think Helix modal editing is great, but I wish that some of the default keybindings were more consistent (there's a huge thread about keymaps on the Helix repository discussing some of the decisions and they don't seem inclined to change any of it). If we get that and a TUI equivalent interface like in: #7493 it would be perfect 😚👌 |
@thiagomajesk did you have a look at @noahfraiture keymap.json? https://github.com/noahfraiture/zed-helix It should help get you started. |
@oliverpool, does this actually work? How can I test it? (It looks like I missed some Zed updates 😅). From what I'm reading this is built on top of the native Vim support which might be a little limiting, but it's a good start. I think I would still love to see Zed support modal editing in a generic way and then build both Vim and Helix keybindings on top of native Zed commands. Do you know if this is something maintainers are looking into? |
@thiagomajesk It's a simple configuration file that you need to add to your setup. However, to be honest, it isn't very effective due to the differences between Vim and Helix motion. Several people want Helix motion to be implemented, and only @maan2003 has done significant work to make it happen. There has been a new PR #17575 because the previous one was too extensive for a single person to handle, and no one had the courage to continue it. This new PR should be merged soon, and then everyone will be free to make improvements, as it doesn’t aim to be a complete integration of Helix into Zed. |
One thing that would be very useful / helpful is, if possible, to support the full range of commands from helix - not just the text navigation and editing, but also stuff like the "goto mode", "window mode", "space mode", etc, so it is possible to fully use Zed including menus, different tabs and panes, only with the keyboard. But I understand this may be a big ask though :) . |
I’ve fallen for helix bindings, but there are still things missing from helix and I prefer gui apps. This would probably be enough to prompt me to move to Zed. |
I have paused my use of Zed because I need to improve my Helix skills. I hope there will soon be keybindings for Helix in Zed |
I know it can be tricky, but the only reason preventing me from day to day use of zed is Helix with their beautiful system based on keys without mouse, multiple selections and other features.
Will be great to support that and maybe I will try to research possible ways to do so:
https://docs.helix-editor.com/keymap.html
The text was updated successfully, but these errors were encountered: