如何在读取文件时识别VT-100转义序列



我有一个文件(程序输出),其中包括VT-100转义序列(颜色、粗体等)。当我在基本模式下打开文件时,转义序列显示为原样,不会被解释。如何显示VT-100序列被识别为颜色等的文件?

请参阅https://unix.stackexchange.com/questions/19494/how-to-colorize-text-in-emacs

例如:在emacs init文件中放入以下内容:

(define-derived-mode fundamental-ansi-mode fundamental-mode "fundamental ansi"
  "Fundamental mode that understands ansi colors."
  (require 'ansi-color)
  (ansi-color-apply-on-region (point-min) (point-max)))

然后在具有转义序列的缓冲器上运行CCD_ 1。

最新更新