Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
#! @python3@/bin/python3 -B | |
import argparse | |
import os | |
import os.path | |
import sys | |
import errno | |
import subprocess | |
import glob | |
import datetime | |
import shutil |
This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).
Running this script should look the same in tmux as without.
curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
https://github.com/muan/unicode-emoji-json | |
° — degree | |
× — times | |
🇿🇦 | |
🇬🇧 | |
🛜 — wireless | |
🔗 — link |
local n = require("nui-components") | |
local spinner_formats = require("nui-components.utils.spinner-formats") | |
local renderer = n.create_renderer({ | |
width = 100, | |
height = 24, | |
}) | |
local signal = n.create_signal({ | |
active_tab = "tab-1", |
---Utility for keymap creation. | |
---@param lhs string | |
---@param rhs string|function | |
---@param opts string|table | |
---@param mode? string|string[] | |
local function keymap(lhs, rhs, opts, mode) | |
opts = type(opts) == 'string' and { desc = opts } | |
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr }) | |
mode = mode or 'n' | |
vim.keymap.set(mode, lhs, rhs, opts) |