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 |
inspired by a friend’s fledgling language design and motivated by the JeanHeyd Meneide RustConf Fiasco™ and improving the story for compile-time introspection, i decided i needed a place to spew the last year’s musings on variadic generics in Rust in one mighty, less-than-understandable catharsis.
i think somewhere in here is a considered and reasonable design, so that’s neat!
perhaps i’ll make this an RFC one day. probably not. you have my express permission to do that yourself.
this nugget of language jargon encapsulates the idea that we might want to bind to an arbitrarily large list of generic parameters, all at once. there are many reasons to want to do this:
bevy_ecs's Bundle trait](https://github.com/bevyengine/bevy/blob/87f7d013c0d4f45a93a4c29e5d48237f4b512ca2/crates/bevy_ecs/src/bundle.| 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) |