Editor Configuration
Crewsaidarr allows you to configure your preferred text editor for use with the /editor command. The editor must be capable of running in “blocking mode”, meaning the command line will wait until you close the editor before proceeding.
Using --editor
You can specify the text editor with the --editor switch or using editor: in crewsaidarr’s YAML config file.
Environment variables
Crewsaidarr checks the following environment variables in order to determine which editor to use:
CREWSAIDARR_EDITORVISUALEDITOR
Default behavior
If no editor is configured, crewsaidarr will use these platform-specific defaults:
- Windows:
notepad - macOS:
vim - Linux/Unix:
vi
Using a custom editor
You can set your preferred editor in your shell’s configuration file (e.g., .bashrc, .zshrc):
export CREWSAIDARR_EDITOR=vim
Popular Editors by Platform
macOS
vim
export CREWSAIDARR_EDITOR=vimEmacs
export CREWSAIDARR_EDITOR=emacsVSCode
export CREWSAIDARR_EDITOR="code --wait"Sublime Text
export CREWSAIDARR_EDITOR="subl --wait"BBEdit
export CREWSAIDARR_EDITOR="bbedit --wait"
Linux
vim
export CREWSAIDARR_EDITOR=vimEmacs
export CREWSAIDARR_EDITOR=emacsnano
export CREWSAIDARR_EDITOR=nanoVSCode
export CREWSAIDARR_EDITOR="code --wait"Sublime Text
export CREWSAIDARR_EDITOR="subl --wait"
Windows
Notepad
set CREWSAIDARR_EDITOR=notepadVSCode
set CREWSAIDARR_EDITOR="code --wait"Notepad++
set CREWSAIDARR_EDITOR="notepad++ -multiInst -notabbar -nosession -noPlugin -waitForClose"
Editor command arguments
Some editors require specific command-line arguments to operate in blocking mode. The --wait flag (or equivalent) is commonly used to make the editor block until the file is closed.
Troubleshooting
If you encounter issues with your editor not blocking (returning to the prompt immediately), verify that:
- Your editor supports blocking mode
- You’ve included the necessary command-line arguments for blocking mode
- The editor command is properly quoted if it contains spaces or special characters, e.g.:
export CREWSAIDARR_EDITOR="code --wait"