Skip to content

Commit

Permalink
Add warning about the editor path (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
apcamargo authored Dec 8, 2024
1 parent b01b360 commit 034f9da
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions docs/docs/config/editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,29 @@ title: 'editor'
language: 'en'
---

Default editor is `vi`.
This setting specifies the editor Rio will use to open the configuration file. By default, the editor is set to `vi`.

Whenever the key binding `OpenConfigEditor` is triggered it will use the value of the editor along with the rio configuration path.
Whenever the key binding `OpenConfigEditor` is triggered, Rio will use the configured editor and the path to the Rio configuration file.

An example, considering you have VS Code installed and you want to use it as your editor:
For example, if you have VS Code installed and want to use it as your editor, the configuration would look like this:

```toml
[editor]
program = "code"
args = []
```

Whenever `OpenConfigEditor` runs it will trigger `$ code <path-to-rio-configuration-file>`.
When `OpenConfigEditor` is triggered, it will execute the command:
`$ code <path-to-rio-configuration-file>`.

:::warning

If you set a value for `program`, Rio will look for it in the default system application directory (`/usr/bin` on Linux and macOS). If your desired editor is not in this directory, you must specify its full path:

```toml
[editor]
program = "/usr/local/bin/code"
args = []
```

:::

0 comments on commit 034f9da

Please sign in to comment.