Sublime Forum

[CSS, theme] use real colors to highlight colors props

#50

Is there anything peculiar about your setup? Is it a traditional install of Sublimte Text 2, or a Portable, or anything non-standard about how it was installed?

0 Likes

#51

I think its dev version actually, may that be the problem? Or maybe some of the plugins i have installed or something like that?

0 Likes

#52

I am using dev too. There must be something off with the logic to determine path to color-scheme file. I will look at what Ask is doing in that area, and see if I see anything. Maybe I will get to it tonight. I am sure Ask will also be looking into to this as well.

0 Likes

#53

Thanks, hope it will be easy fix and i will be able to use this plugin :smile:

0 Likes

#54

Any news?

0 Likes

#55

I did find some general theme management bugs, but I am not sure if they will fix your issues or not. I have created a pull request. If you are still having issues after trying it with the new fixes, I can look deeper.

0 Likes

#56

Yep, still having the same error :confused:

0 Likes

#57

I will take a look at it. I am sure Ask will be looking too.

0 Likes

#58

Still nothing?

0 Likes

#59

I am not able to reproduce the issue yet. It seems to be something that happens only on rare occasions; Also, I am not a web developer by trade, but do firmware stuff, so the chances of me reproducing this issue is far less, since using CSS doesn’t often crop up in my day to day coding activities; only in hobby projects do I use CSS. I am not the lead developer on this either; I am only someone who uses this plugin. I kept thinking Ask would be looking into it, but he is probably busy; all development has been quiet on his end.

If I could figure out what combination of events causes this issue, I could fix it, but like I said, I cannot seem to make it do what you have described. Not on Linux, Windows, or Mac. Since this is not my plugin, finding the issue has been very low priority for me since all is working on my end.

It is possible I could put a safe guard on all instances where the path is assembled to ensure path integrity. This may be the way to go because it doesn’t require me to determine exactly where the issue is, but bandage it if it is detected. Ideally though, it would be nice to discover why the path pieces are not as expected on your system, and patch this issue properly.

0 Likes

#60

Oh yea i understand.
So will you try to do this way you explained here? Or you are leaving it to Ask?
Because really, its one of those plugins i really would like to use for sublime, since i use CSS alot and it would come in handy :smile:

0 Likes

#61

I will take a stab at it on an experimental branch. I will let you test off that, I can tweak that until we get something working. I should be able to have something going before the new year, but I won’t make any promises.

What I come up with here might not go on the main branch because essentially what I will be providing is a quick and dirty workaround. Eventually the root of the problem will have to be dug up. I will be patching the symptom but not the cause.

0 Likes

#62

Okay thanks, ill wait :smile:
Let me know when its done so i can test it :wink:

Anyway Merry Christmas to you :smile:

0 Likes

#63

I have an attempt to put a bandaid on the issue at github.com/facelessuser/sublime … Workaround

Please test and let me know if it works. I also put some debug code in so I need you to open up the console up and find the message the plugin outputs and post it here. I put an example of mine below. Yours will have the same “Start Debug” and “End Debug” markers. I need to understand how your path is getting messed up. To fix it proper, but this bandaid may make the plugin useful for now. If it doesn’t, I can take another swing at it.

Example output:

[code]####Start Debug####
Sublime Path: /Users/facelessuser/Library/Application Support/Sublime Text 2
Theme Path: /Users/facelessuser/Library/Application Support/Sublime Text 2/Packages/User/Colorized-946901263265910-Monokai Soda.tmTheme

End Debug####[/code]

0 Likes

#64

Well it still does the same thing, still the same error.
Here is the debug code:

####Start Debug####
Sublime Path: D:\Documents and Settings\Risk0\Application Data\Sublime Text 2
Theme Path: D:\Documents and Settings\Risk0\Application Data\Sublime Text 2\Packages\Color Scheme - Default\Colorized-432035491641541-Putty.tmTheme
#### End Debug####

But there is also this error line, as before (when a window pops up)

error: Error loading colour scheme Packages/D:\Documents and Settings\Risk0\Application Data\Sublime Text 2\Packages\Color Scheme - Default\Colorized-432035491641541-Putty.tmTheme: Error parsing plist xml: Failed to open file In file "Packages/D:\Documents and Settings\Risk0\Application Data\Sublime Text 2\Packages\Color Scheme - Default\Colorized-432035491641541-Putty.tmTheme"

Im not an expert but it seems like the path in the debug code is correct, but in this error the path starts with “Packages/” which shouldnt be there :smiley:

0 Likes

#65

Yeah, that is what I am guessing too. I put in some code to strip out “Packages/” at one point in the code, assuming I knew where the issue was, but apparently I do not know where the issue is.

Right now I am guessing where the issue is because all of my computers don’t do what yours is doing. I thought somehow that at this particular point in code your paths were wrong, but as you can see from the debug output, they were correct, which means that somewhere else things are going wrong.

This may take me a while because since I can’t reproduce your issue, I have to make wild guesses. This looks to be a more difficult issue to track down because your paths look fine. I was really hoping your paths were wrong at that point in code, but the only way to make sure was to have you post the debug output. At least now, I know something that isn’t wrong, and while that doesn’t fix your issue, I am a little closer because I can rule out that part of the code.

0 Likes

#66

Okay, ill wait and test it if you find and fix the issue.
Hope there wont be more problems with this :smile:

0 Likes

#67

In general, a plugin that does this would not be difficult…

but here is the catch: the current api does not allow to specify a color for highlight, the color must be assigned to a scope that is already defined in a theme file. (at least as far as I understand)!


Trumpet Wedding Dresses|Column Wedding Dresses|Wedding Dresses with Sleeves|New Style Wedding Dresses

0 Likes

#68

Support for Less variables colorization would be a nice plus!

@orange: #dd8826;

0 Likes

#69

Loading any .css file makes “sublime text.exe” eat 25% CPU and show nothing.
Same for “colorize css” from the command palette (I’d really like “LiveCSS: Colorize”) on an unsafed buffer with Syntax set to “CSS”.

{ "keys": "alt+l", "alt+t"], "command": "toggle_global_live_css" }

gave me:

Traceback (most recent call last): File ".\sublime_plugin.py", line 362, in run_ File ".\livecolors.py", line 89, in run TypeError: uncolorize_file() takes exactly 2 arguments (1 given)

I also find it hard to “get started” with this plugin. The documentation is all nice and stuff (I don’t really know Python to begin with) but how do I actually use it? Should be noted on the readme, imo.
Also, doesn’t this package have any configuration? I could not find information regarding this. I would like to apply this functionality on other source files as well (like .tmLanguage) without having to set the Syntax to CSS and loosing the XML style.*

0 Likes