Thursday, December 12, 2013

Re: AnsiEsc can not show background

You need to install termcolor (https://pypi.python.org/pypi/termcolor)
first by pip or something else.

On Thu, Dec 12, 2013 at 12:33 PM, Charles Campbell
<Charles.E.Campbell@nasa.gov> wrote:
> Peng Yu wrote:
>>
>> Hi,
>>
>> The following code shows that vim can not show background color correctly
>> form Ansi Color. Is there a command to enable background color? Thanks.
>>
>> ~/linux/test/python/man/library/termcolor/colored/on_red$ cat main.py
>> #!/usr/bin/env python
>>
>> from termcolor import colored
>> print colored('hello', 'white', 'on_red'), colored('world', 'white',
>> 'on_green')
>>
>> ~/linux/test/python/man/library/termcolor/colored/on_red$ type less
>> less is aliased to `vim -R -c AnsiEsc -'
>> ~/linux/test/python/man/library/termcolor/colored/on_red$ ./main.py |less
>>
>> Regards,
>> Peng
>
>
> I get...
> Traceback (most recent call last):
> File "./junk.pm", line 3, in <module>
> from termcolor import colored
> ImportError: No module named termcolor
> Vim: Reading from stdin...
>
> Regards,
> C Campbell
>
>
> --
> --
> 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
>
> --- You received this message because you are subscribed to a topic in the
> Google Groups "vim_use" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/vim_use/OaASJlRyOGo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Regards,
Peng

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: