Comments (11)
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.
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.
Curiously – the rgb()
one looks right, and should already be highlighted. Isn’t it?
from vim-css-color.
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.
From the test results above – was the one from the line with the rgb()
function after editing or before?
from vim-css-color.
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.
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.
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.
@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.
I can't since I switched to Sublime. Old VIM data is gone. I neeed a more reliable editor.
from vim-css-color.
I’m closing this as works-for-me then.
from vim-css-color.
Related Issues (20)
- E121: Undefined variable: b:css_color_pat in netrw
- Neovim tree sitter support HOT 20
- support for svelte files HOT 2
- Plugin is not compatible with nvim-treesitter HOT 1
- No colors in .h files in neovim
- It would be nice to support SVG files HOT 2
- create_matches function takes 1.4 s on large nix files
- NeoVim tree sitter support HOT 1
- Error with files with no highlightable targets in Vim9 HOT 4
- Erroring in java file HOT 2
- Add support for LaTeX? HOT 1
- Add support for template strings
- Does not work HOT 5
- incompatible with nvim-treesitter HOT 2
- [Feature request]: provide a command to make it asynchronous.
- truecolor terminals and termguicolors HOT 5
- Incorrect Highlighting of C Macros
- How to enable color highlighting for strings in CSS
- Error in C comments
- Support CSS Color Module Level 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-css-color.