Editor Integration
Click file paths from crabcode into Helix, Neovim, Herdr, tmux, Zellij, WezTerm, Ghostty, Zed, VS Code, or Cursor.
Use these recipes to open files where you already edit, while keeping images in a suitable viewer.
Put path clicks where you already edit
Set editor.open to the command for your editor. File paths, image placeholders, and binary links all use it. See Editor config for the canonical reference, placeholders, and override matching rules.
- Nothing set: opens in a detected integrated editor, preserving line and column jumps; otherwise opens in the system default application.
- Terminal editors: open a new multiplexer tab or terminal window, or suspend crabcode to edit in the same terminal.
- GUI IDEs (Zed, VS Code, Cursor): auto-detected in their terminals and open all files, including images. No image override is required.
ACP-compatible editors can also host crabcode as a subprocess. That is a different integration: ACP.
{pathname} is shell-quoted, so hx -- {pathname}:{line}:{column} stays one path even with spaces.
The terminal-editor recipes below route common image extensions to "system" so clicking an image does not launch Helix or Neovim. Other files still use the main command; add overrides for PDFs or other binaries if needed. Choose one open command in each recipe. Commands that launch another tab or window do not need suspend: true.
Direct terminal editor
To run Helix in crabcode's own terminal, suspend the TUI while editing:
{
"editor": {
"open": "hx -- {location}",
// Or use Neovim:
// "open": "nvim +{line} -- {pathname}",
"suspend": true,
"overrides": {
"*.{png,jpg,jpeg,gif,webp}": "system",
},
},
}The image override defaults to suspend: false independently, so opening an image does not suspend crabcode.
WezTerm and Ghostty
Editors in standalone terminals normally have no single remote process unlike GUI editors. Open a new tab or window instead of copying.
WezTerm
wezterm cli spawn opens a tab in the current window (WEZTERM_PANE must be set):
Choose the editor to launch in the new tab:
{
"editor": {
"open": "wezterm cli spawn -- hx -- {pathname}:{line}:{column}",
"overrides": {
"*.{png,jpg,jpeg,gif,webp}": "system",
},
},
}{
"editor": {
"open": "wezterm cli spawn -- nvim +{line} -- {pathname}",
"overrides": {
"*.{png,jpg,jpeg,gif,webp}": "system",
},
},
}Add --new-window if you want a separate window.
Ghostty
On macOS, Ghostty has no CLI to add a tab to the current window. open -na starts a new Ghostty window:
{
"editor": {
// Helix
"open": "open -na Ghostty.app --args -e hx -- {pathname}:{line}:{column}",
// Or replace open with this Neovim command:
// "open": "open -na Ghostty.app --args -e nvim +{line} -- {pathname}",
"overrides": {
"*.{png,jpg,jpeg,gif,webp}": "system",
},
},
}On Linux, use ghostty -e hx -- {pathname}:{line}:{column} instead.
Multiplexers
Each click creates a new tab and runs Helix or Neovim there. You do not need a pane named hx.
Herdr (recommended)
Needs jq. Crabcode already reports agent status when HERDR_PANE_ID is set.
{
"editor": {
// Helix
"open": "tab=$(herdr tab create --focus --label hx) && pane=$(printf '%s\\n' \"$tab\" | jq -er '.result.root_pane.pane_id // empty') && herdr pane run \"$pane\" hx -- {location}",
// Or replace open with this Neovim command:
// "open": "tab=$(herdr tab create --focus --label nvim) && pane=$(printf '%s\\n' \"$tab\" | jq -er '.result.root_pane.pane_id // empty') && herdr pane run \"$pane\" nvim +{line} -- {pathname}",
"overrides": {
"*.{png,jpg,jpeg,gif,webp}": "system",
},
},
}tmux
{
"editor": {
// Helix
"open": "tmux new-window -n hx -- hx -- {pathname}:{line}:{column}",
// Or replace open with this Neovim command:
// "open": "tmux new-window -n nvim -- nvim +{line} -- {pathname}",
"overrides": {
"*.{png,jpg,jpeg,gif,webp}": "system",
},
},
}Zellij
{
"editor": {
// Helix
"open": "zellij action new-tab --name hx && zellij action write-chars \"hx -- {pathname_raw}:{line}:{column}\" && zellij action write 13",
// Or replace open with this Neovim command:
// "open": "zellij action new-tab --name nvim && zellij action write-chars \"nvim +{line} -- {pathname_raw}\" && zellij action write 13",
"overrides": {
"*.{png,jpg,jpeg,gif,webp}": "system",
},
},
}write 13 is Enter. Both panes must be in the same Zellij session so zellij action reaches it.
VS Code, Zed, Cursor
When crabcode runs in a Zed, VS Code, or Cursor integrated terminal, path clicks already open in that window. You do not need editor.open unless you want to pin the command.
Default (no editor key): use detected Zed / Cursor / VS Code with line and column jumps, otherwise use the system default application. Images and binary links follow the same selection.
{
// Zed
"editor": "zed -- {location}",
// Or use VS Code:
// "editor": "code --reuse-window --goto -- {location}",
// Or use Cursor:
// "editor": "cursor --reuse-window --goto -- {location}",
}GUI editors can display images, so these defaults need no image override. Add filename overrides only if you want selected files to open elsewhere.
Custom editor
editor.open is just a shell command. Any tool with CLI args works: a markdown previewer, a GUI you launch with open -a, a one-off script.
{
"editor": {
"open": "my-markdown-editor {pathname}",
},
}Placeholders are listed in Editor config.