Coder Social home page Coder Social logo

Comments (8)

ap avatar ap commented on July 18, 2024

I cannot reproduce this. If you move your cursor onto an incorrectly highlighted word and give this command,

:echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')

… what is the output?

Which other color keywords does this affect? “Some” isn’t much help… 😄

from vim-css-color.

ctrl-alt-adrian avatar ctrl-alt-adrian commented on July 18, 2024

Yeah it wasn't helpful was it? lol. Sorry, was in a rush.

One of the colors I've used is purple. It looks like the color isn't shown but when you enter the hex value of it, the color pops up. In regards to the output I get:

['cssDefinition', 'cssAttrRegion', 'BG800080']

Attached is a screenshot.

screenshot 2015-09-30 05 50 55

from vim-css-color.

ap avatar ap commented on July 18, 2024

OK, so, that bit looks right. I guess we’ll have to play 20 questions; sorry for the bother.

  1. What does :hi BG800080 say in that situation?
  2. If you type #800080 instead of purple, what colour do you get?
  3. What does :hi BGa020f0 say in that situation?

from vim-css-color.

ctrl-alt-adrian avatar ctrl-alt-adrian commented on July 18, 2024

Np.

Answer to question 1:

screenshot 2015-09-30 17 09 30

Answer to questions 2 & 3:

screenshot 2015-09-30 17 11 14

Thing is after I typed #BG800080 then it worked as per the screenshot.

Now when I quit vim and made up a new .css stylesheet and typed the color in again, it didn't work again.

from vim-css-color.

ap avatar ap commented on July 18, 2024

headscratch

Is the output of :hi BG800080 different after you type #800080, once purple is highlighted correctly, compared to the output before?

from vim-css-color.

ap avatar ap commented on July 18, 2024

Yes it is. No need to show me, I found it. This is painfully stupid.

It’s a late effect of #16, itself long fixed in commit c8ae081. Once upon a time, the mapping of RGB values to 256-colour terminal palette indices was recalculated at every Vim startup. Then, at some point, to make startup faster, I dumped the results of the conversion and hardcoded them in the script. But I did this back when the mapper function had a simple stupid bug that completely broke many of its results. As a result I hardcoded a bunch of broken outputs into the script. Arrrrrrgghhh. Later I fixed the bug but did not recompute the indices, so they’ve stayed broken for another 2½ years.

from vim-css-color.

ap avatar ap commented on July 18, 2024

There you go. Thank you for the report.

from vim-css-color.

ctrl-alt-adrian avatar ctrl-alt-adrian commented on July 18, 2024

Cool. Glad to help out. Thanks for resolving the issue!

from vim-css-color.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.