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 facelessuser on Mon Nov 14, 2011 2:46 pm

Cool. I will give it a try.

I actually find this plugin pretty useful. Thanks for the all the work on this.
facelessuser
 
Posts: 1570
Joined: Tue Apr 05, 2011 7:38 pm

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

Postby facelessuser on Tue Nov 15, 2011 1:46 am

Just got around to trying it I think you must have made a change to writing the theme file.

Code: Select all
Traceback (most recent call last):
  File "./sublime_plugin.py", line 143, in on_modified
  File "./css-colors.py", line 378, in on_modified
  File "./css-colors.py", line 306, in colorize_css
  File "./css-colors.py", line 261, in generate_color_theme
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plistlib.py", line 75, in readPlist
    pathOrFile = open(pathOrFile)
IOError: [Errno 2] No such file or directory: u'/Users/facelessuser/Library/Application Support/Sublime Text 2/Packages/User/Colorized-766606182254614-Monokai Soda.tmTheme'


This causes the colors to all be white since it looks like it is failing to write the theme file.
facelessuser
 
Posts: 1570
Joined: Tue Apr 05, 2011 7:38 pm

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

Postby ask on Tue Nov 15, 2011 2:41 am

Hope last commit will fix this issue.
Before i delete previously colorized theme every time i apply new.
Now i do it only on init.
ask
 
Posts: 26
Joined: Wed Sep 14, 2011 12:40 pm

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

Postby facelessuser on Tue Nov 15, 2011 3:10 am

I've got a fix comming. Hang tight for a pull request.

Your last commit fixed it, but I have a fix that cleans up extra files and fixes it.
Last edited by facelessuser on Tue Nov 15, 2011 3:18 am, edited 1 time in total.
facelessuser
 
Posts: 1570
Joined: Tue Apr 05, 2011 7:38 pm

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

Postby facelessuser on Tue Nov 15, 2011 3:15 am

Pull requested. Now it works great! I will do some more testing in the next couple of days.
facelessuser
 
Posts: 1570
Joined: Tue Apr 05, 2011 7:38 pm

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

Postby leecade on Tue Nov 15, 2011 7:49 am

why, #00 is white? I think this isn't a good idea.
leecade
 
Posts: 14
Joined: Thu Nov 10, 2011 10:26 pm

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

Postby ask on Tue Nov 15, 2011 11:55 pm

leecade wrote:why, #00 is white? I think this isn't a good idea.

It shouldn't even catch such colors, since it's not a valid hex color.
ask
 
Posts: 26
Joined: Wed Sep 14, 2011 12:40 pm

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

Postby minism on Wed Nov 16, 2011 4:56 pm

wow, its working great so far! Thanks for your work.
minism
 
Posts: 8
Joined: Tue Nov 01, 2011 5:30 am

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

Postby Sh4d0W on Thu Nov 17, 2011 12:16 pm

is it ready to use yet?
Sh4d0W
 
Posts: 21
Joined: Mon Nov 14, 2011 6:06 pm

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

Postby facelessuser on Thu Nov 17, 2011 4:09 pm

The kind of coding I do for work is not web programming (we coding is more of a hobby for me), but from what limited testing I have been doing, I think it is safe to use.

There are a couple of items I think would be nice to have addressed before release though:

  • First: The current commands available in the command palette are: css_colorize and css_uncolorize. I think they should be named using the common convention already used in the command palette: CSS Colors: Colorize and CSS Colors: Un-colorize. That way I can just use the name CSS Colors and find all available commands for the plugin.
  • Second: I think the colorize/uncolorize commands' effects should be permanent. Currently if I invoke the uncolorize command, the effects only last until I edit a color, then everything becomes colorized again.
  • Third: Available in the menu under View is the menu item CSS dynamic highligting. This allows for a toggling of colorize/uncolorize that is permanent, but the menu item gives no indication of the current state of said toggling; it would be nice if there was some indication.
facelessuser
 
Posts: 1570
Joined: Tue Apr 05, 2011 7:38 pm

PreviousNext

Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests