0

i have a log file with ^A as a delimiter. i want to change the background color of this delimiter to make things easier to see. i understand changing the background color is already answered here:

How to change the output color of echo in Linux

so my question is how do i change the display settings of how a file is displayed with the UNIX less command? or any other file viewing command (i.e.: vi) is there such a way? in other words i want to permanently change the way ^A is being displayed in my log files.

thanks in advance.

Shi Zhang
  • 143
  • 5
  • 18
  • Stackoverflow is for help with software development. You should consider asking this on [unix.se] or [su]. – Kenster Aug 24 '18 at 20:56
  • The simple answer is this is harder than you think. For example, VI/VIM rely on syntax plugins to change the colours (and many more things) so does most of the other file editing tools. You're going to have to write syntax plugins for all the tools you use and some may not support syntax at all (`less`). – Prav Aug 24 '18 at 21:07
  • If the output contains ansi color sequences, `less` can be made to render those with `-R` switch. And there are ways to preprocess contents for `less` (with alias or `$LESSOPEN`). Wouldn't work with vim, of course. – weirdan Aug 24 '18 at 21:41
  • See [Get colors in less or more](https://superuser.com/questions/117841/get-colors-in-less-or-more) – agc Aug 25 '18 at 03:59

0 Answers0