Neovim 101 — Terminal

A deep dive into the Neovim terminal and configuration recipes to fine-tune the terminal emulator.

7 min readFeb 14


Neovim 101 — Terminal

Using the built-in terminal, we can run or integrate any command-line utilities with Neovim. In this article, we will explore the built-in Neovim terminal emulator, and check out configuration recipes to fine-tune it.

This article is part of the Neovim 101 series.

The Neovim configuration files are available in this repository.

Getting Started

In several past articles, we discussed topics related to the terminal, shell, OSC52, and how to configure terminal emulators to better integrate with Neovim.

In this article, we will continue to explore tips and tricks to fine-tune the Neovim built-in terminal emulator.

Do check out the previous articles!

Terminal Color

Most of the current terminal emulators (alacrity, kitty, wezterm, iterm2, Konsole, ConEmu, st, etc) and multiplexers (tmux, screen, etc) we commonly used support true color. For a complete list, check out the terminal standard repository.

Below are the different levels of color support for terminal emulators.

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: “888” colors (aka 16 million)

To check if the terminal emulator supports true color, we can use this script. It prints TRUECOLOR in brown, if it understands Xterm-style true-color escapes.

printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n"

For a more thorough test, we can use this awk script.

awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
for (colnum = 0; colnum<77; colnum++) {
r = 255-(colnum*255/76);
g = (colnum*510/76);
b = (colnum*255/76);
if (g>255)…




Software engineer, Data Science and ML practitioner.