Search This Blog

Sunday, May 19, 2019

Ansi control characters in Vim


The ANSI/VT100 terminals and their emulators allows to use escape sequences to  display colours and formatted text. (Check this link for more information on how to do this.) That's look cool in a terminal window. Problems starts when terminal output is redirected to a file (e.g. logs). Editors like Vim are virtual useless with such files, because files are full of "rubbish". At least by default, because for Vim there is a good plug-in called "Asci Highlighting". It takes escapes sequences and colour text appropriately.


Links:
  • https://misc.flogisoft.com/bash/tip_colors_and_formatting 
  • http://www.drchip.org/astronaut/vim/index.html#ANSIESC