Monnoroch / ColorHighlighter

ColorHighlighter - is a plugin for the Sublime text 2 and 3, which underlays selected hexadecimal colorcodes (like "#FFFFFF", "rgb(255,255,255)", "white", etc.) with their real color. Also, plugin adds color picker to easily modify colors. Documentation: https://monnoroch.github.io/ColorHighlighter.
https://sublime.wbond.net/packages/Color%20Highlighter
1.31k stars 130 forks source link

Couldn't enable the Color Highlighter #298

Open shuaibird opened 8 years ago

shuaibird commented 8 years ago

I use sublime text editor 3 and install the color highlighter via the package control but just have no way to enable it. When I go to the Tools menu and click the color highlighter, both the enable and disable option are not available to choose. Could anybody help me out, THX a lot!

Monnoroch commented 8 years ago

Did you try to restart ST?

shuaibird commented 8 years ago

Yep. I've restarted the editor. I've also found that the setting files are blank. I try to modify them but still couldn't get it work.

Sent from my iPhone

On Mar 5, 2016, at 10:41 AM, Max notifications@github.com wrote:

Did you try to restart ST?

— Reply to this email directly or view it on GitHub.

benmarten commented 8 years ago

Yes, I can confirm that it seems broken!

screen shot 2016-03-05 at 11 39 19 am

The console only outputs that on toggling enable/disable:

reloading Packages/User/ColorHighlighter.sublime-settings

Any ideas?

Monnoroch commented 8 years ago

If the settings files are blank, that means there was a problem with installation. Try to reinstall the plugin.

benmarten commented 8 years ago

I just reinstalled it, still doesn't work: Also the file contains:

{
    "enabled": true,
    "style": "filled"
}
Js-GitHub commented 8 years ago

Try this:

colorhighlighter-preferences

Preferences > Package Settings > Color Highlighter > Settings - User

colorhighlighter-preferences-package-setting-default

Preferences > Package Settings > Color Highlighter > Settings - Default

colorhighlighter-preferences 2

Example CSS file:

colorhighlighter-demo-css

shuaibird commented 8 years ago

Guys, I've solved my problems finally. There're both Color Highlighter and ColorHighlighter in my install package panel after I added this repo via package control, the former one works while the latter one just didn't work. I don't know exactly what the hell is going on but that's fine.

Js-GitHub commented 8 years ago

So what did you do to resolve issue?

benmarten commented 8 years ago

Oh, ok, for me it works as well. just not in the xml file i was looking at initially... e.g. css file works ;)

Monnoroch commented 8 years ago

@benmarten A list of file extensions for which highlighting is enabled is in CH's settings file. You can add .xml there.

Monnoroch commented 8 years ago

Also, full file highlighting is a feature that can be enabled in settings: ha_style: "filled" (or whatever else you want).

shuaibird commented 8 years ago

@Js-GitHub uninstall the ColorHighlighter package then install the Color Highlighter package. Got it?

alexandrebobkov commented 7 years ago

Make sure there is extention specified for the file you want this plubin to be enabled:

"file_extensions": [".css", ".less", ".scss", ".sass", ".styl", ".config", ".conf",""],

rizkyanfasafm commented 6 years ago

still not working for me? anyone solve this problem??

nunks commented 6 years ago

I'm using Xubuntu 16.04 and what fixed highlighting for me was installing libqt dependencies on which the plug-in seems to depend:

$ sudo apt install qt5-default

After that I restarted Sublime Text and it worked.

I figured it out after testing the color picker item from right-click menu. It raised a "couldn't find libQt5Widgets.so.5" error (something like that) in the console.

nekopa commented 6 years ago

Thanks @nunks that fixed it for me.

AlonsoQml commented 6 years ago

shuaibird is almost right. Somehow in the folder "packages>user" appears file "ColorHighlighter.sublime-settings" with no space between color and highlighter. I just add space, now it's called "Color Highlighter.sublime-settings". But some days later it's called "ColorHighlighter.sublime-settings" again. I just renamed it again and it's worked. And I change settings only in "Tools>Color Highlighter>...". Hope this helps.

GoMrPickles commented 6 years ago

I'm having a similar issue. Ubuntu 16.04, Sublime Text. Installed as 'Color Highlighter' with a space. @nunks solution didn't alter anything for me, although my system did compile and install qt5. I can't get anything to highlight and I can't open the color picker. -installed, uninstalled, reinstalled color picked; no luck -using .css file extension -tried renaming settings with and with out a space, per @AlonsoQml -installed qt5-default per @nunks , no change in behavior -user-settings is 75 lines; where in that file do I make or insert changes? for example, where do I put "ha_style": "filled"?

nunks commented 6 years ago

@GoMrPickles do you get the libqt error on the console when you try to open the color picker? If yes, maybe Sublime Text isn't following your library path?

GoMrPickles commented 6 years ago

@nunks What do you mean by "on the console"? When I try to open the color picker, or highlight a color, or set Color Highlighter to highlight all colors, nothing at all happens. Apologies if I'm missing something obvious.

nunks commented 6 years ago

@GoMrPickles no problem, sorry for not being more specific. I meant, go to menu View > Show console and, with the console open, try to load the color picker and see if it shows a Qt library error

GoMrPickles commented 6 years ago

@nunks thanks - I don't get a Qt library error, but I do get a different error. I've attached the console log from startup to trying to select the color picker/. sublime-text.log

Edit: I appear to be having the same issue as @RafaelFabeni. https://github.com/Monnoroch/ColorHighlighter/issues/436

ETA: Fixed, per that thread.

Squidies commented 6 years ago

Windows 7

Can confirm @AlonsoQml. Plugin seems to be generating "ColorHighlighter.sublime-settings" (no space). Changing the filename to "Color Highlighter.sublime-settings" (space between "Color" and "Highlighter") seems to fix the issue and the plugin works again. However, changing settings via tools > Color Highlighter seems to generate a new "ColorHighlighter.sublime-settings" (no space) file that then again breaks functionality.

Squidies commented 6 years ago

At least for me, this conflict in naming between .sublime-settings files is certainly the issue. Whenever new settings are applied, a new "ColorHighligher.sublime-settings" file is created, however at least on Windows, there seems be a conflict since the package name is "ColorHighlighter". I've since configured the settings I want and copied them to both files and this seems to have temporarily fixed the issue, however, any time I want to change settings, I would then have to go back and repeat copying the new settings to both files....

dcoli commented 6 years ago

For the Color Highlighter.sublime-settings -> ColorHighlighter... problem, in Windows, open and Administrator command prompt, navigate to the folder containing the bad name, remove the one with the space in the name, and then

C:\Users\username\AppData\Roaming\Sublime Text 3\Packages\User>mklink "Color Highlighter.sublime-settings" ColorHighlighter.sublime-settings

Not sure how long that holds up, given upgrades and stuff.

Kulgar commented 5 years ago

Just a note for others: had the same pb on Ubuntu 18 and installing qt5-default as @nunks said, did solve the pb :)

SpyrosKo commented 5 years ago

I was having the issue, but I removed the Package and installed Color Highlight instead and that worked good for me.

srkanoi commented 5 years ago

+1 @thinnling I also uninstalled "Color Highlighter" and installed "Color Highlight". Everything's perfect!

Leptune commented 4 years ago

+1 @thinnling I also uninstalled "Color Highlighter" and installed "Color Highlight". Everything's perfect!

that's correct!!

semi26 commented 2 years ago

Hello @Js-GitHub, my default and user settings don't look like the one you show as an example. I checked to see if it's the correct package and it is.

thank you,