Coder Social home page Coder Social logo

Comments (11)

ap avatar ap commented on July 18, 2024

What does Vim say if you move the cursor somewhere into the rgb part and type this?

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

(And for completeness’ sake: what it does say when you do that within a #xxx hex colour or on green etc?)

from vim-css-color.

siddhion avatar siddhion commented on July 18, 2024

Here is what is returned when I run :echo map(synstack(line("."), col(".")),'synIDattr(v:val,"name")') while the cursor is over different color declarations:

background: rgba(5, 205, 0, 0.5);  => ['sassDefinition', 'sassCssAttribute', 'cssValueNumber'] 

background: rgb(5, 205, 0); => ['sassDefinition', 'sassCssAttribute', 'cssColor05cd00']

background-color: #ffffff; => ['sassDefinition', 'sassCssAttribute', 'cssColorffffff'] 

background-color: yellow;   => ['sassDefinition', 'sassCssAttribute', 'cssColorffff00'] 

from vim-css-color.

ap avatar ap commented on July 18, 2024

Curiously – the rgb() one looks right, and should already be highlighted. Isn’t it?

from vim-css-color.

siddhion avatar siddhion commented on July 18, 2024

When ever I open a .sass file that has an rgb() defined in it, it is not color highlighted. same problem with the rgba(). Hex values and color names are highlighted fine upon opening a .sass file that contains them. I must stress that this problem only occurs upon opening of the .sass file. Once I open it and then edit an rgba() or rgb() value, it will immediately get color highlighted.

from vim-css-color.

ap avatar ap commented on July 18, 2024

From the test results above – was the one from the line with the rgb() function after editing or before?

from vim-css-color.

siddhion avatar siddhion commented on July 18, 2024

The one from the line with the rgb() functions (color highlights) only after editing the color value. It is not functioning upon opening a .sass or .scss file. Same problem with rgba().

from vim-css-color.

ap avatar ap commented on July 18, 2024

OK, good. I was worried that the colour wasn’t showing up even though the highlight rule for it had been correctly created and had matched, in which case there would have to be something deeply wrong that I don’t understand. I’m still having trouble understanding why the script’s first pass is failing, but at least I understand what the problem is.

from vim-css-color.

siddhion avatar siddhion commented on July 18, 2024

oh good. yeah I wonder why the script is not working at the beginning. I wonder why it would kick in when an edit is made only. well I hope you can figure this out. it would be really great!

from vim-css-color.

ap avatar ap commented on July 18, 2024

@siddhion: Can you give the latest version a shot and tell me if this is still not working correctly for you?

from vim-css-color.

siddhion avatar siddhion commented on July 18, 2024

I can't since I switched to Sublime. Old VIM data is gone. I neeed a more reliable editor.

from vim-css-color.

ap avatar ap commented on July 18, 2024

I’m closing this as works-for-me then.

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.