Skip to content

Emacs vterm should default to system theme #431

Closed

Description

@paralin
Image

@adamdotdevin here is how it looks in emacs vterm now. much better, there are still some stray blue underscore characters though.

Image

Forked from #101

Activity

  1. unholywhale commented on Jul 6, 2025

    @unholywhale

    @paralin does it just work for you by default? This is how it looks for me in vterm (Emacs 30.1). Also, does scrolling work for you?

    Image Image
  2. paralin commented on Jul 6, 2025

    @paralin
    ContributorAuthor

    Looks good now with "system" theme

  3. paralin commented on Oct 9, 2025

    @paralin
    ContributorAuthor

    Fixed by setting the "system" theme:

    Write to ~/.config/opencode/opencode.jsonc

    {
      "$schema": "https://opencode.ai/config.json",
      "theme": "system"
    }

    I would recommend automatically defaulting to this if vterm is detected

  4. changed the title [-]Emacs vterm with system theme has unexpected characters[/-] [+]Emacs vterm should default to system theme to avoid confusion[/+] on Oct 9, 2025
  5. changed the title [-]Emacs vterm should default to system theme to avoid confusion[/-] [+]Emacs vterm should default to system theme[/+] on Oct 9, 2025
  6. prasanthkrishnan commented on Nov 4, 2025

    @prasanthkrishnan

    On doom emacs, I am not able to scroll to the previous page when using open code via libvterm. Any suggestions?

  7. WuuBoLin commented on Dec 10, 2025

    @WuuBoLin

    I have the same question as @prasanthkrishnan.

    Additionally, the loading symbols in the bottom-left corner are causing the UI to shift in libvterm (and also in the installation script).
    Image

    This is a font issue, though, because ・ (U+FF65) is a CJK character that is not present in most Latin fonts. Given the nature of Emacs as an editor, it will fall back to a non-monospace font for that character. Similarly, ⬝ (U+2B1D) is also not present in most fonts, although it is not a CJK character.

    My current solution is to replace both characters with the "Middle Dot" · (U+00B7):

    (defvar my-vterm-display-table (make-display-table))
    
    ;; Map U+2B1D (Black Very Small Square) to display as U+00B7 (Middle Dot)
    (aset my-vterm-display-table ?\u2B1D (vector ?\u00B7))
    ;; Map U+FF65 (Halfwidth Katakana Middle Dot) to display as U+00B7 (Middle Dot)
    (aset my-vterm-display-table ?\uFF65 (vector ?\u00B7))
    
    (add-hook 'vterm-mode-hook
              (lambda ()
                (setq buffer-display-table my-vterm-display-table)))

    Preventing the use of characters that are not available in monospace fonts might fix these kinds of issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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