Currently, I'm using iTerm as my terminal, and the only way I can quickly insert new lines is by using mapped shortcuts. Otherwise, every time I need to input a line, I have to type \ + Enter, which feels like a nightmare.
Currently, my approach is to map `\\\n` to a specific hotkey. While this works temporarily when using rovodev, when I switch back to claduecode, I have to handle a new mapping scheme again.
Hi @liu924645150_qq_com welcome to the community. RovoDev uses a multi-line prompt mode where regular Enter sends the request, so you must use \ + Enter to create a new line. There’s no setting to change this yet, and the behavior is the same across terminals. The only workaround is exactly what you’re doing—custom keybindings or switching to an editor input box. If you need flexible multi-line editing, write the prompt in your editor first, then paste it into the RovoDev CLI.
You are dealing with three different behaviors simultaneously: Rovo Dev CLI, Claude Code, and how iTerm (plus the shell/readline) handles line breaks and the Enter key. This results in the "hell" of typing \ + Enter or constantly remapping shortcuts.
The goal is to provide a stable setup that works for both tools using terminal/shell features instead of specific hacks.
1. Understanding "\ + Enter"
This pattern usually stems from:
VI-style editing mode: Where Enter sends the prompt, and \ followed by Enter is interpreted as line continuation.
Custom bindings: Your shell (zsh/bash) or the tool itself is configured to treat Enter as "submit" and requires an escape character for a newline.
The goal is to have:
A specific key for a newline without sending (e.g., Alt+Enter or Ctrl+O).
The standard Enter key to send.
2. Using Rovo Dev CLI Editing Mode
You can define the "editing mode" in the Rovo Dev config file: File: ~/.rovodev/config.yml
YAML
console:
# Editing mode for the prompt session (default: "EMACS")
# Options: "EMACS", "VI"
editingMode: "EMACS"
Recommendation: Keep it as EMACS. This allows you to use standard readline bindings (Ctrl+A, Ctrl+E, etc.) and makes it easier to configure a "newline" key.
3. Configuring a "New Line" Key in the Shell (zsh/bash)
You can create a shortcut that inserts a literal \n without submitting the command.
For ZSH (default on macOS): Add this to your ~/.zshrc:
Bash
# Defines a widget that inserts a literal newline
function insert-newline-widget() {
LBUFFER+=$'\n'
}
zle -N insert-newline-widget
# Map it to Alt+Enter (Option+Enter)
bindkey "^[\r" insert-newline-widget
# Alternative: Map to Ctrl+O if Alt+Enter fails
bindkey '^O' insert-newline-widget
For BASH: Add this to your ~/.inputrc:
Bash
"\C-o": "\n"
Then run bind -f ~/.inputrc or restart the shell.
4. Configuring Directly in iTerm2 (Universal Method)
This is often the most reliable way because it works regardless of the specific CLI tool.
Go to iTerm2 → Settings → Profiles → Keys.
Click + to add a new mapping.
Keyboard Shortcut: Press Option+Enter.
Action: Select Send Text...
Value: Press Enter once in the text box (it will look like a blank line).
Now, in both Rovo Dev and Claude Code, Option+Enter will create a new line, and Enter will send the message.
5. Avoiding Tool Conflicts
The core issue is mapping a sequence like \\\n which has different semantic meanings across tools. By mapping a literal newline (\n) via iTerm or the shell:
Both Rovo Dev and Claude Code receive the same input.
You stop relying on the \ escape character.
The behavior remains consistent across different CLIs.
6. Quick Checklist for a Practical Solution
Check Rovo Config: Ensure editingMode: "EMACS" in ~/.rovodev/config.yml.
Choose ONE Option:
Option A (iTerm - Recommended): Map Option+Enter to "Send Text" with a literal newline.
Option B (Shell): Add the insert-newline-widget to your ~/.zshrc and use Ctrl+O.
Test: Open acli rovodev run and claude-code to verify that the shortcut creates a newline in both without needing the \.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.