VIM 中的 ANSI 颜色代码 [英] ANSI Color Codes in VIM

查看:49
本文介绍了VIM 中的 ANSI 颜色代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个脚本可以生成一个带有 ANSI 颜色代码的日志文件,如下所示:

I have a script that generates a log file with ANSI color codes in them like so:

[2012-05-14 18:00:02] ^[[0mINF: -- Starting update script --^[[0m
[2012-05-14 18:00:29] ^[[91mERR: Improper date, entry being ignored.^[[0m

有什么方法可以让 Vim 理解这些颜色代码?

Is there any way to get Vim to understand these color codes?

感谢您的帮助.

推荐答案

使用 Charles Campbell (Dr Chip) AnsiEsc 插件:

Use Charles Campbell's (Dr Chip) AnsiEsc plugin:

http://www.vim.org/scripts/script.php?script_id=302

之前:

:AnsiEsc

这篇关于VIM 中的 ANSI 颜色代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆