Home Download Buy Blog Forum Support

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

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

Postby Sh4d0W on Fri Dec 16, 2011 5:30 pm

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 :)
Sh4d0W
 
Posts: 21
Joined: Mon Nov 14, 2011 6:06 pm

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

Postby facelessuser on Fri Dec 16, 2011 5:38 pm

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.
facelessuser
 
Posts: 1457
Joined: Tue Apr 05, 2011 7:38 pm

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

Postby Sh4d0W on Sat Dec 17, 2011 10:25 pm

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

Anyway Merry Christmas to you :)
Sh4d0W
 
Posts: 21
Joined: Mon Nov 14, 2011 6:06 pm

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

Postby facelessuser on Sat Dec 17, 2011 10:38 pm

I have an attempt to put a bandaid on the issue at https://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: Select all
####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####
facelessuser
 
Posts: 1457
Joined: Tue Apr 05, 2011 7:38 pm

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

Postby Sh4d0W on Sun Dec 18, 2011 12:35 pm

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

Code: Select all
####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)

Code: Select all
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 :D
Sh4d0W
 
Posts: 21
Joined: Mon Nov 14, 2011 6:06 pm

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

Postby facelessuser on Sun Dec 18, 2011 3:17 pm

Sh4d0W wrote: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 :D


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.
facelessuser
 
Posts: 1457
Joined: Tue Apr 05, 2011 7:38 pm

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

Postby Sh4d0W on Sun Dec 18, 2011 4:00 pm

Okay, ill wait and test it if you find and fix the issue.
Hope there wont be more problems with this :)
Sh4d0W
 
Posts: 21
Joined: Mon Nov 14, 2011 6:06 pm

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

Postby mandaly on Mon Mar 26, 2012 3:41 am

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
mandaly
 
Posts: 3
Joined: Mon Mar 26, 2012 3:22 am

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

Postby Granze on Tue Mar 27, 2012 9:17 am

Support for Less variables colorization would be a nice plus!

@orange: #dd8826;
Granze
 
Posts: 3
Joined: Tue Mar 20, 2012 1:44 pm

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

Postby FichteFoll on Fri Apr 13, 2012 1:37 am

[I'm using Sublime Text 2 Build 2190 on Win7x64.]

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".

Code: Select all
{ "keys": ["alt+l", "alt+t"], "command": "toggle_global_live_css" }

gave me:
Code: Select all
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.
FichteFoll
 
Posts: 313
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

Previous

Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 6 guests

cron