Neovim 101 — OSC 52

Let’s check out Operating System Command (OSC) and OSC 52.

alpha2phi
5 min readOct 16, 2022
Neovim 101 — OSC 52

In this article, we will learn the basics of OSC (Operating System Command), and how to use OSC 52 to transport data from a remote SSH session to the local system clipboard.

This article is part of the Neovim 101 series.

The Neovim configuration files are available in this repository.

Getting Started

In the previous article on terminal and shell, we talked about Control Sequence Introducer (CSI), and how to configure Alacritty, Kitty, and WezTerm to enable CSI u which uses control sequences starting with ESC [ or \x9B.

In this article, we will go through OSC which uses control sequences starting with ESC ] or \x9D.

OSC

OSC stands for Operating System Command. Originally OSC sequences were defined by Xterm, but many are also supported by other modern terminal emulators, e.g., Alacritty, Kitty, and WezTerm.

--

--

alpha2phi

Software engineer, Data Science and ML practitioner.