Files
oak-gpui/crates
Thorsten Ball 11bd28870a editor: Add MoveUpByLines and MoveDownByLines actions (#7208)
This adds four new actions:

- `editor::MoveUpByLines`
- `editor::MoveDownByLines`
- `editor::SelectUpByLines`
- `editor::SelectDownByLines`

They all take a count by which to move the cursor up and down.
(Requested by Adam here:
https://twitter.com/adamwathan/status/1753017094248018302)


Example `keymap.json` entries:

```json
{
  "context": "Editor",
  "bindings": [
    "alt-up":         [ "editor::MoveUpByLines",     { "lines": 3 } ],
    "alt-down":       [ "editor::MoveDownByLines",   { "lines": 3 } ],
    "alt-shift-up":   [ "editor::SelectUpByLines",   { "lines": 3 } ],
    "alt-shift-down": [ "editor::SelectDownByLines", { "lines": 3 } ]
  ]
}
```

They are *not* bound by default, so as to not conflict with the
`alt-up/down` bindings that already exist.

Release Notes:

- Added four new actions: `editor::MoveUpByLines`,
`editor::MoveDownByLines`, `editor::SelectUpByLines`,
`editor::SelectDownByLines` that can take a line count configuration and
move the cursor up by the count.

### Demo



https://github.com/zed-industries/zed/assets/1185253/e78d4077-5bd5-4d72-a806-67695698af5d




https://github.com/zed-industries/zed/assets/1185253/0b086ec9-eb90-40a2-9009-844a215e6378
2024-02-02 08:48:04 -07:00
..
2024-01-31 15:46:24 -07:00
2024-02-01 22:22:02 -07:00
2024-01-29 23:47:20 -05:00
2024-01-31 15:46:24 -07:00
2024-01-29 23:47:20 -05:00
2024-02-01 22:22:02 -07:00
2024-02-01 22:22:02 -07:00
2024-01-31 15:46:24 -07:00
2024-02-02 16:58:07 +02:00
2024-01-29 23:47:20 -05:00
2024-01-31 15:46:24 -07:00
2024-01-29 23:47:20 -05:00
2024-02-02 16:35:58 +01:00