Skip to content

Proposal: live PTY terminal pane with Cmd+Return fenced-code execution #1378

Description

@VinhTieuGit

What

Terminal pane in the editor window (⌘⌥T), backed by SwiftTerm (MIT). Real PTY, bottom split, resizable/closable.

Cmd+Return with cursor in a bash/sh/zsh/shell fence runs that block directly in the pane (auto-opens if closed). Other languages/no tag: no-op.

Also: bundled MesloLGS NF font (Apache 2.0) + Paper/Dark ANSI themes, switchable in Preferences.

Why

I read a lot of markdown docs with embedded shell snippets (setup steps, quick test commands) and kept alt-tabbing to a terminal to run them. Wanted to run the snippet where I'm already reading it, no context switch.

Prototype: https://github.com/VinhTieuGit/macdown/tree/feature/terminal-pane

Tradeoffs

  • New dependency: SwiftTerm.
  • Bundled font adds binary size (few hundred KB).
  • macOS only, no plans beyond that.

Ask

Would love feedback on whether this fits the project's direction. Happy to open it as one PR, or split into smaller pieces (pane / font+theme / fence-exec) if that's easier to review. No worries either way if it's not a fit — just wanted to check before polishing further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions