The reference to "comint mode" in the context of JetBrains' terminal draws a parallel to Emacs' Comint (Command Interpreter) Mode, which provides a framework for interacting with subprocesses (e.g., shells, REPLs, debuggers) within the editor itself. Here's what the user likely means by comparing JetBrains' terminal to comint mode:
Key Features of Comint Mode (and JetBrains' Terminal)
-
Interactive Process Integration:
- Unlike a basic embedded terminal, comint mode allows direct interaction with subprocesses (e.g., shells, interpreters) while retaining control over input/output.
- For example, you can send code snippets to a REPL, manage background jobs, or debug programs without leaving the editor.
-
Input/Output Handling:
- Comint separates "user input" from "process output," enabling features like:
- Line editing (e.g., recalling/editing previous commands).
- Input history and completion.
- Structured interaction (e.g., sending regions of code to a shell).
-
Tight Editor Integration:
- JetBrains terminals (and comint) are deeply integrated with IDE features:
- Syntax highlighting in terminal output.
- Clickable file paths/error messages that open files in the editor.
- Synchronization with the IDE's working directory or environment variables.
- Job control (e.g., interrupting processes via keyboard shortcuts).
-
Customizability:
- Comint mode in Emacs is highly customizable via Lisp, allowing workflows like automatically sending code to a Python REPL or filtering output.
- JetBrains terminals similarly allow customization via plugins or settings (e.g., splitting panes, custom keybindings).
-
Structured Output Handling:
- Comint buffers often parse and structure output (e.g., collapsing repeated lines, hiding noise), making logs or test results easier to read.
- JetBrains terminals might offer similar features (e.g., search, filtering, collapsible sections).
Why This Matters for Zed vs. Foot
The user is comparing Zed (a modern editor) to Foot (a standalone Wayland terminal emulator). They’re saying:
- A basic embedded terminal (like Foot) is insufficient if it only emulates a terminal without deeper integration.
- JetBrains terminals (and comint mode) succeed because they act as smart interfaces between the editor and processes, not just dumb output viewers.
- Zed must replicate this level of integration (e.g., REPL workflows, job control, editor-aware terminals) to justify replacing Foot.
Examples in Practice
- JetBrains Terminal: You can split the terminal into multiple sessions, run Git commands that auto-refresh the IDE’s version control UI, or click error messages to jump to code.
- Comint Mode: In Emacs, you might run
M-x shell, then send Python code from a buffer to the shell with C-c C-r, or interactively debug a program with GUD (Grand Unified Debugger).
- Zed’s Challenge: To replace Foot, Zed’s terminal must offer more than VTE-based embedding—it needs structured process interaction, editor-aware workflows, and seamless integration with Zed’s features (e.g., language tools, workspace management).
TL;DR
The user wants Zed’s terminal to behave like JetBrains’ or Emacs’ comint mode: a fully integrated, interactive process interface rather than just a terminal emulator. Without this, they’ll stick with Foot for serious terminal work.