gko / vim-coloresque

css/less/sass/html color preview for vim
352 stars 63 forks source link

Would vim-coloresque show 256 color? #17

Open marslo opened 10 years ago

marslo commented 10 years ago

I saw a post: http://askubuntu.com/questions/67/how-do-i-enable-full-color-support-in-terminal/14891#14891 It shows 256 color by python script.

I want to ask could vim-colorsque can support 256 colors? Thanks.

Br. Marslo

gko commented 10 years ago

Hi,

It does support 256 colors. Which terminal do you use?

marslo commented 10 years ago

Hi,

Thanks for your reply. The terminal is xterm? Maybe. I just echo $TERM in VIM, and it shows xterm-256color. The screenshot is my vim color configuration, I can see the colors for RGB, but it doesn't work for 256 colors.

By the way, I using putty to connect to server.

256color

marslo commented 10 years ago

Hi,

Anything update?

gko commented 10 years ago

Hi,

Sorry for delayed answer. Highlighting term colors is not hard. The problem is that its only numbers. If I start highlighting those it will highlight them in all files, which might be painfull.

marslo commented 10 years ago

Oh! Yes!! However, would you add the highlighting term in the situation vim == &filetype ?

Or, would you give me some clew, so I can add it in my configuraton file.

marslo commented 10 years ago

Or, the 256 color (only numbers) can be shown if I executed a command (:Show256Col for example) or something...

gko commented 10 years ago

Yes, that is an option. I will add that to next build if it doesn't make experience miserable =)

marslo commented 10 years ago

:+1: That's very nice of you!

Here is a script gui2term: http://www.vim.org/scripts/script.php?script_id=2778 , you can find the term color (256 color) and the related RGB, for example:

termcolor = {
    16: '#000000',
    17: '#00005f',
    18: '#000087',
    19: '#0000af',
    20: '#0000d7',
    21: '#0000ff',
    22: '#005f00',
    23: '#005f5f',
    24: '#005f87',
....
}

Hope it will help you.

marslo commented 10 years ago

Hi,

Is anything update? Thanks.

Br, Marslo