mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 11:01:54 +00:00
Add arrow key movements to terminal vi mode (#22103)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Expands #18715 Release Notes: - Added arrow keys movement to the built-in terminal's [vi mode](https://github.com/alacritty/alacritty/blob/master/docs/features.md#vi-mode) (which is using Alacritty under the hood). Details -- A minuscule improvement on #18715 to allow user with alternative keyboard layouts to use the terminal's vi mode with the arrow keys.
This commit is contained in:
parent
b25d8ecb75
commit
cbd2e81a7e
1 changed files with 4 additions and 4 deletions
|
@ -1183,10 +1183,10 @@ impl Terminal {
|
||||||
}
|
}
|
||||||
|
|
||||||
let motion: Option<ViMotion> = match key.as_str() {
|
let motion: Option<ViMotion> = match key.as_str() {
|
||||||
"h" => Some(ViMotion::Left),
|
"h" | "left" => Some(ViMotion::Left),
|
||||||
"j" => Some(ViMotion::Down),
|
"j" | "down" => Some(ViMotion::Down),
|
||||||
"k" => Some(ViMotion::Up),
|
"k" | "up" => Some(ViMotion::Up),
|
||||||
"l" => Some(ViMotion::Right),
|
"l" | "right" => Some(ViMotion::Right),
|
||||||
"w" => Some(ViMotion::WordRight),
|
"w" => Some(ViMotion::WordRight),
|
||||||
"b" if !keystroke.modifiers.control => Some(ViMotion::WordLeft),
|
"b" if !keystroke.modifiers.control => Some(ViMotion::WordLeft),
|
||||||
"e" => Some(ViMotion::WordRightEnd),
|
"e" => Some(ViMotion::WordRightEnd),
|
||||||
|
|
Loading…
Reference in a new issue