I use echo -e to color output my scripts, it works fine when using standard output.
But when I redirect the output to a file, vim does not display colors; instead, it displays the following characters: [[
example:
echo -e "\e[32m Green message\e[0m"; echo -e "\e[31m Red message\e[0m";
with vim:
^[[32m Green message^[[0m ^[[31m Red message^[[0m
How to fix it.
NB : cat also shows colors !!
vim echo color-scheme
Ould abba
source share