-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: --execute
flag which runs the passed keymap before launch
#13847
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
base: master
Are you sure you want to change the base?
Conversation
Another use case I've thought of previously was setting the language for text that's piped into helix: some-command | hx -x ':lang bash<ret>' Edit: Yeah, this works great: ghostty +show-config --docs --default | hx --execute ':lang ghostty<ret>' |
this is incredible! my long standing usecase of “open file automatically in insert mode, at the end of the last line” can finally be solved 🚀 |
yay it works :D no merge conflict no errors nothing :D |
Why take a keymap rather than the commands the keys are mapped to? e.g.
vs
|
syntax would need to be introduced to chain commands, in that case 🤔 surrounding in |
|
Co-authored-by: Alexander Brevig <[email protected]>
Adds a new flag
-e
/--execute
which gets passed a command to execute before launching helix.Why: Currently, when passing a directory to Helix like
hx ..
it will open a file finder<space>f
.What if instead of that, you want to open it with a file explorer
<space>e
? This PR allows you to do this by usinghx .. --execute "<esc><space>e"
which will open the file explorer insteadIt allows for more versatility as well: you'll be able to start helix with whatever sequence of commands you want