workspace: Add NewFileSplit action with direction (#39726)
Add new `workspace::NewFileSplit` action which expects a
`SplitDirection` argument, allowing users to programmatically control
the direction of the split in keymaps, for example:
```json
{
"context": "Editor",
"bindings": {
"ctrl-s ctrl-h": ["workspace::NewFileSplit", "left"],
"ctrl-s ctrl-j": ["workspace::NewFileSplit", "down"],
"ctrl-s ctrl-k": ["workspace::NewFileSplit", "up"],
"ctrl-s ctrl-l": ["workspace::NewFileSplit", "right"]
}
}
```
Release Notes:
- Added `workspace::NewFileSplit` action, which can be used to
programmatically split the editor in the provided direction.
Co-authored-by: Rian Drake <rian.drake@rocketwerkz.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
This commit is contained in:
co-authored by
Rian Drake
dino
parent
67b9d480b4
commit
8bef4800f0
@@ -4563,6 +4563,7 @@ mod tests {
|
||||
| "workspace::ActivatePane"
|
||||
| "workspace::MoveItemToPane"
|
||||
| "workspace::MoveItemToPaneInDirection"
|
||||
| "workspace::NewFileSplit"
|
||||
| "workspace::OpenTerminal"
|
||||
| "workspace::SendKeystrokes"
|
||||
| "agent::NewNativeAgentThreadFromSummary"
|
||||
|
||||
Reference in New Issue
Block a user