You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experimenting with keymaps for cargo commands, but I'm a bit stuck at cargo add <pkg>.
The problem is, I don't want to always type in the whole command: :sh cargo add <pkg>
but instead would like to use a keymap like: Space+l+a and then type the rest into the command-line of helix.
NOTE: I've made up a workaround: select the crate name (text), yank it to system-clipboard and use that text in shell for cargo add <system_clipboard>
keymaps:
[keys.normal."space".l]
c = ":sh cargo check"t = ":sh cargo test"r = ":sh cargo run"# FIXME: how could wait_for_input be done?# a = [":sh cargo add ", "wait_for_input"]# workaround:a = ["yank_to_clipboard", ":sh cargo add (wl-paste)"]
d = ["yank_to_clipboard", ":sh cargo rm (wl-paste)"]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm experimenting with keymaps for cargo commands, but I'm a bit stuck at
cargo add <pkg>
.The problem is, I don't want to always type in the whole command:
:sh cargo add <pkg>
but instead would like to use a keymap like: Space+l+a and then type the rest into the command-line of helix.
NOTE: I've made up a workaround: select the crate name (text), yank it to system-clipboard and use that text in shell for
cargo add <system_clipboard>
keymaps:
Beta Was this translation helpful? Give feedback.
All reactions