Vim text coloring

前端 未结 3 504
無奈伤痛
無奈伤痛 2021-01-12 00:44

I use echo -e to color my scripts output, it works fine when using standard output.

But when I redirect the output to a file, vim doesn

3条回答
  •  粉色の甜心
    2021-01-12 00:58

    It is usually a bad idea to add any ANSI escape characters to your output if that output is meant to be processed by another program.

    Because it is a text editor, it is reasonable to expect Vim to display the content of the file as it is, with the escape characters, rather than as you want it to look.

    So no, there's nothing to fix, here. On Vim's side, anyway.

提交回复
热议问题