You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
**/editor command fails when VISUAL contains arguments with spaces/quotes** #7749
The /editor command fails when the VISUAL environment variable contains command-line arguments with spaces or quotes. The arguments are incorrectly split, causing nvim to misinterpret them.
Environment
OS: Arch Linux (BTW)
OpenCode version: 1.0.220 (installed via Homebrew)
Shell: zsh
Steps to Reproduce
Set VISUAL with arguments:
export VISUAL="nvim --cmd 'let g:flatten_wait=1'"
Start OpenCode TUI:
opencode
Run /editor command
Expected Behavior
Nvim opens with the --cmd 'let g:flatten_wait=1' argument properly passed, allowing the g:flatten_wait variable to be set before rc loads.
Actual Behavior
Error appears:
Error detected while processing pre-vimrc command line:
E20: Mark not set: 'let
Already only one window
Root Cause
The VISUAL variable appears to be split on spaces without proper quote handling. Instead of:
Activity
github-actions commentedon Mar 25, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
mawkler commentedon May 20, 2026
I have the same issue but for the
$EDITORsystem variablemawkler commentedon Aug 3, 2026
It would be super appreciated if you could elaborate on why this was closed as "not planned" since this to me is an obvious bug :)