Tuesday, September 7, 2010

Re: convenient settings for /etc/motd etc. that has multi-character color codes

On Wed, September 8, 2010 1:16 am, Simon Ruderich wrote:
> On Tue, Sep 07, 2010 at 01:26:32PM -0700, Rahul wrote:
>> Is there a convenient way to edit /etc/motd (or for that matter any
>> other file that has color codes / multibyte characters in it)? The
>> usual problem is that many if the file has a color code (say,
>> ^[[33m^[[1m ) then this occupies multiple characters in the editor but
>> zero characters when finally displayed. Hence it is hard to get the
>> alignment right without lots of trial and error. For an example see
>> below.
>>
>> I was wondering if vim had a smart way of dealing with this?!
>
> You could use the new conceal support in Vim 7.3.
>

Have never used it, but I believe AnsiEsc[1] by Charles Campbell does
conceal color codes.

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

regards,
Christian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: