Helix: static commands & custom keymap binding #56422
Closed
jmevel
started this conversation in
Feature Requests
Replies: 1 comment
-
|
Ok, I actually just found out in this file that the And I also solved the issue of A working binding could then be written like this "ctrl-s": [
"workspace::SendKeystrokes",
": editor::SaveLocation enter : write enter",
],Or also like this "ctrl-s": [
"workspace::SendKeystrokes",
": editor::SaveLocation enter : workspace::Save enter",
],Discussion closed, I just needed a tiny bit more of research actually. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Problem
In Helix,
Ctrl-sis not saving the current buffer but instead saving the cursor's position (command:save_selection).This PR was recently merged which makes Zed behave the same as native Helix.
I personally like to bind
Ctrl + sto execute asave_selectioncommand but also perform a:write(short::w).To get this behavior here is what I have in my helix
config.tomlfile:This file isn't interpreted by Zed so I wanted to make a custom binding in my
keymap.jsonhowever I'm hitting two issues when trying to do that:"ctrl-s": ["workspace::SendKeystrokes", ":write enter"]I honestly don't know why
save_selectioncommand in any way. In Helix, static commands can be accessed by doing<space>?but trying that in Zed doesn't work. The?is immediately interpreted as asearchaction instead of letting us execute a static command.Anything I missed ?
Is there any workaround I haven't think about to solve either the first or the second issue (or even both !!!) ?
Even if that doesn't get me to my final goal, I'd love being able to solve one issue or the other.
Should I open proper Github issues ?
Let me know what you think of it. I don't mind opening one or two issues to track both problems even if the implementation takes a while. I think it would be better tracking them outside of a "discussion"
Thanks for your answers
Beta Was this translation helpful? Give feedback.
All reactions