# workspace: Add NewFileSplit action with direction \(\#39726\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/8bef4800f0f04da68bbade0e0d18b2a5b6c5f2a7)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 8bef4800f0f04da68bbade0e0d18b2a5b6c5f2a7

Requested commit: 8bef4800f0f04da68bbade0e0d18b2a5b6c5f2a7

Commit: 8bef4800f0f04da68bbade0e0d18b2a5b6c5f2a7

Tree: b58f6b5a9c1d75cdacfe24e76c0dfc0d8901ff84

Author: Rian Drake

Committer: GitHub

## Message

````
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>
````

## Parents

- [67b9d480b444ef3e44b01e722fd595dbdf2c02a9](https://git.cafe/gitcafe/zed/commit/67b9d480b444ef3e44b01e722fd595dbdf2c02a9?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/8bef4800f0f04da68bbade0e0d18b2a5b6c5f2a7?format=markdown)
