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
#8521 added +N number handling to helix, but in vim +N actually executes command N.
Helix already handles :N so it would be possible to generalise the behaviour.
Possible flag names are: --cmd-C-x-e--run--exec
Possible description:
-C, --cmd <command> Specifies a command to run at startup, can be passed multiple times
This flag will be useful for scripting. Another one could be added later to source commands from
It is also possible to keep + for the first approach and and add --cmd for the second one.
I tried to implement the second approach like this:
for command in args.commands{for key_event in helix_view::input::parse_macro(&command).unwrap(){
app.compositor.handle_event(&Event::Key(key_event),&mut cx
);}}
That code is in Application::new just after let app =, but it seems to break on :quit<ret>
› cargo run -- -C ':quit<ret>'
thread 'main' panicked at helix-view/src/tree.rs:278:29:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I believe it requires view or something to be already created, couldn't figure out how to do that without adding a new event type, as that seemed too complicated for no reason, so for now will just keep this issue here.
I also didn't find an API to implement the first approach.
The text was updated successfully, but these errors were encountered:
#8521 added +N number handling to helix, but in vim +N actually executes command N.
Helix already handles :N so it would be possible to generalise the behaviour.
Possible flag names are:
--cmd
-C
-x
-e
--run
--exec
Possible description:
This flag will be useful for scripting. Another one could be added later to source commands from
There are two ways it could work:
Exiting immediately using these two approaches:
hx --cmd quit
hx --cmd ':quit<ret>'
It is also possible to keep + for the first approach and and add --cmd for the second one.
I tried to implement the second approach like this:
That code is in
Application::new
just afterlet app =
, but it seems to break on:quit<ret>
I believe it requires view or something to be already created, couldn't figure out how to do that without adding a new event type, as that seemed too complicated for no reason, so for now will just keep this issue here.
I also didn't find an API to implement the first approach.
The text was updated successfully, but these errors were encountered: