Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,52 @@
# open-in-code.yazi

Plugin for [Yazi](https://github.com/sxyazi/yazi) to open the current folder in VSCode

## Dependencies

Make sure [VSCode](https://code.visualstudio.com) is installed and in your `PATH`. You can use the
`Shell Command: Install 'code' command in PATH` pallette action to do so if needed.

## Installation

### Using `ya pkg`
```
ya pkg add arxae/open-in-code

```sh
ya pkg add arxae/open-in-code
```

### Manual
**Linux/macOS**

#### Linux/macOS

```
git clone https://github.com/arxae/open-in-code.yazi.git ~/.config/yazi/plugins/open-in-code.yazi
```
**Windows**

#### Windows

```
git clone https://github.com/arxae/open-in-code.yazi.git %AppData%\yazi\config\plugins\open-in-code.yazi
```

## Configuration
add this to your **keymap.toml** file

You need to associate this plugin with a key binding.

We suggest you associate this plugin with the `g => v` key binding.
To do so, add the following code to your `keymap.toml` file:

```toml
[[mgr.prepend_keymap]]
on = [ "g", "c" ]
on = [ "g", "v" ]
run = "plugin open-in-code"
desc = "open folder in vscode"
```
you can customize the keybinding however you like. Please refer to the [keymap.toml](https://yazi-rs.github.io/docs/configuration/keymap) documentation

>[!Note]
> You can customize the keybinding however you like.
>
> Please refer to the [keymap.toml](https://yazi-rs.github.io/docs/configuration/keymap) documentation

>[!Warning]
> The key binding `g => c` is already associated with the action `Go to ~/.config` by default, see [the default `keymap.toml` file](https://github.com/sxyazi/yazi/blob/shipped/yazi-config/preset/keymap-default.toml))