micro-ansiwrap-plugin
ANSIwrap is a Micro editor plugin for working with ANSI escape sequences directly inside the editor.
language: Lua
release date: 2026-04-23
about
ANSIwrap is a Micro editor plugin for working with ANSI escape sequences directly inside the editor.
It is aimed at people who write shell scripts, inspect terminal output, edit logs, or simply want a fast way to insert ANSI color codes without leaving Micro.
ANSIwrap can wrap selected text, insert an opening escape at the cursor, toggle an existing wrapper, and strip ANSI sequences from text.
It is aimed at people who write shell scripts, inspect terminal output, edit logs, or simply want a fast way to insert ANSI color codes without leaving Micro.
features
- Wrap selected text with ANSI open/close sequences
- Insert only the opening sequence when nothing is selected
- Toggle wrapping on selected text
- Strip ANSI sequences from text
- Use literal mode (033) or real-escape mode (ESC)
- Use common style names like bold, underline, and strike
- Use style negation shortcuts like -1, -5, or -0
- Use named colors such as red, green, blue, and more
- Use 256-color values from 0 to 255
- Use truecolor RGB with R255 G100 B10
- Use compact RGB syntax such as rgb(255,100,10)
- Use foreground or background color prefixes
- Reject ambiguous or incomplete input with clear errors
compatibility
The code is compatible with every current version of micro.