• tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    21 hours ago

    suggesting the Vim instance is running in a full-screen terminal emulator under some windowing system or another.

    Courtesy of this post, here’s a test script to show a terminal’s capabilities:

    #!/bin/bash
    echo -e "\e[1mbold\e[0m"
    echo -e "\e[3mitalic\e[0m"
    echo -e "\e[3m\e[1mbold italic\e[0m"
    echo -e "\e[4munderline\e[0m"
    echo -e "\e[9mstrikethrough\e[0m"
    echo -e "\e[31mHello World\e[0m"
    echo -e "\x1B[31mHello World\e[0m"
    

    I thought that it might be them using fbterm (a more-sophisticated userspace framebuffer virtual terminal emulator that’s an alternative to fbcon, the built-in Linux kernel virtual terminal emulator), but at least on my system, fbterm doesn’t seem to show italics.

    EDIT: Ah, saw @zloubida@sh.itjust.works’s comment about kmscon. It looks like they’re using kmscon, a different userspace framebuffer virtual terminal emulator, and explicitly say so in the article.

    EDIT2: If you install it, looks like on Debian it gets used by default on next boot as the new console virtual terminal emulator. Note that unlike fbcon and fbterm, you apparently need to use Control-Alt-FKey rather than just Alt-Fkey to switch terminals when you’re inside kmscon, same as if you’re in Xorg or Wayland.

    • MonkderVierte@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      edit-2
      18 hours ago

      Better use tput instead. The escape sequences depend heavily on the emulated terminal used.