-
|
I want to do a vsplit and bring in the text of a file that has ansi escape sequences in the file. So: ^[[92m some text ^[[0m, does not work. although when I print it out on a terminal it works fine. Alternately, is there some command that can do what I want to display in the vsplit ? I am wanting to write a "help" buffer for my project that my people can use. thanks. Nice project so far! Jerry |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Micro does not support ANSI escape sequences in files. Files are displayed as raw bytes without interpreting ANSI codes. Workarounds: Option 1: Use dedicated ANSI viewers cat colorized.txt # Shows ANSI colors
less -R colorized.txt # ANSI-aware pagerOption 2: Strip ANSI codes cat colorized.txt | ansi2txt > plain.txt
micro plain.txtOption 3: Use syntax highlighting Why: Micro reads files as raw bytes and uses its own styling system via tcell, not terminal escape sequences from file content. This is a fundamental architectural decision. Files: |
Beta Was this translation helpful? Give feedback.
-
|
As mentioned by @anntnzrb in #3933 (comment), Micro doesn't currently support ANSI sequences or arbitrary formatting at specific locations. By "help buffer", may I ask for slightly more details on what you meant and your use case? If you meant a help file, all I have seen are written in Markdown ( |
Beta Was this translation helpful? Give feedback.
-
|
After all the answers here, the best that I could come up with was:
now when pressing the Alt-? it displays my help file with color. |
Beta Was this translation helpful? Give feedback.
After all the answers here, the best that I could come up with was:
now when pressing the Alt-? it displays my help file with color.