Closed Civitasv closed 2 years ago
You can press i
to go into insert mode in the terminal buffer, and input whatever you want
When I press i
, yes, it enter into insert mode, but then after I input something, it'll disappear. See:
Looks like the process exits (successfully as well). For some reason, it isn't waiting for your input.
Could you test this code out?
fn main() {
loop {
let mut a = String::new();
io::stdin().read_line(&mut a);
println!("{}", a)
}
}
I find it weird. I think it enters into loop and wait for my input in the terminal.
But I can't input anything in it(and you can see I've entered into terminal mode from normal mode). After click Ctrl+C
, it exits.
You can see my config for rust-tools.
Don't think this is an issue with rust-tools, but with your terminal. What happens if you run the code outside of neovim? Does the issue still persist?
I've tested in vscode, it works fine.
So, I have codes to print any character I input to the terminal. Like:
Actual behavior: But when I run it, the execute terminal won't let me input and it will be closed after whatever key I click.
Expected behavior: I should be able to input, and when I input
<C-c>
, it will stop.Any idea?