this post was submitted on 25 May 2026
105 points (95.7% liked)

Technology

84918 readers
3408 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] palordrolap@fedia.io 2 points 1 day ago (3 children)

The italic text in Vim threw me for a loop. But I realised it makes sense.

Syntax highlighting already exists in editors. Terminal based ones often implement this in terms of terminal escapes or similar. Most modern terminal emulators support the enable-italic escape. Thus, some combination of these can effectively emulate markdown.

What I do note is that my root Linux consoles (Ctrl+Alt+F[1-6]), and LMDE) don't support italics, suggesting the Vim instance is running in a full-screen terminal emulator under some windowing system or another.

That seems like overkill just for italics in an otherwise text-only interface, but maybe I'm missing something (patience being one possibility).

[–] flubba86@lemmy.world 8 points 23 hours ago* (last edited 23 hours ago)

The answer is right there in the fist paragraph, and in more detail if you read the whole article.

The author uses kmscon, that is a usermode console with proper graphics drivers, hi res rendering, and UTF8 font support. There is no desktop environment used.

I suspect that is where the italics support is coming from. Makes me want to try it out.

https://en.wikipedia.org/wiki/Kmscon

[–] tal@lemmy.today 2 points 23 hours ago* (last edited 23 hours ago) (1 children)

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 2 points 19 hours ago* (last edited 19 hours ago)

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

[–] frongt@lemmy.zip 1 points 1 day ago (2 children)

I'm surprised vim supports italics. Is there any terminal standard for that, like colors and bold text?

[–] tal@lemmy.today 1 points 23 hours ago* (last edited 23 hours ago)

Apparently there are escape sequences for it; see my response to the parent post.

Even if there weren't, if a given terminal supported either the older Sixel or the newer KiTTY graphics protocol, it can outright display arbitrary images.

Mainline tmux doesn't support either protocol, though there's a fork that does do Sixel. They're using tmux, so I assume that that's not the route used.

[–] AHemlocksLie@lemmy.zip 1 points 23 hours ago

I wouldn't be surprised if support comes from a plugin rather than Vim itself. Plugins can do a LOT in Vim.

Of course, Vim also has a crazy base feature set, so I guess I wouldn't be all that surprised if it did have base support.