Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.16k stars 302 forks source link

Cannot change background color of embedded languages #1626

Open CJDennis opened 8 years ago

CJDennis commented 8 years ago

Short Summary

In Komodo 8 there was an option for "Use a different background colour when used as a sub-language". This was very handy for editing PHP files that generate HTML, CSS and JavaScript as you could clearly see which of the four languages each character of the code was in.

There doesn't seem to be a way to edit the colours by language in Komodo 9, only common syntax.

However, in Komodo X this feature is back. The problem is that editing the background colour for "default" on each language shows that the background colour is changed for the whole language in the preview window, but it doesn't change the background colour for each individual item once you go back to the main editor.

Steps to Reproduce

Create a PHP file with HTML, CSS and JavaScript content as well. Go to the Colour Scheme Editor Choose a different background colour for HTML, CSS and JavaScript by selecting the default style (all looks good so far) Apply all the changes Close the Colour Scheme Editor

Expected results

The entire block of HTML should have a single background colour, except where PHP, CSS or JavaScript is embedded, in which case each language should show its own solid background colour.

Actual results

HTML - Only empty space and plain text has the correct background colour, everything else, elements, attribute, values, etc. has PHP's background colour. CSS - ditto JavaScript - ditto

Platform Information

Komodo Edit and IDE Komodo 10.0.0 Windows 7, Windows 10

Additional Information

I would like to see the behaviour from Komodo 8 re-introduced. I don't want my individual HTML, CSS and JavaScript files to have different background colours, only when they are embedded into other languages.

There is also currently no way to select the default background colour for an item once it's been changed to a specific colour.

Naatan commented 8 years ago

How are you changing the background color for individual languages? There is no option for this at the moment.

CJDennis commented 8 years ago

I forget to mention that you select the default style and change its background colour. The preview shows the new colour for all content, but when you apply it, only the whitespace gets the new background colour. You then have to go back and change each element individually, and if you decide you don't like the new colour it's a lot of work to change it again.

mitchell-as commented 8 years ago

It seems you are reporting two issues in this thread. (1) You cannot change the background color of individual embedded languages; (2) Changing the "default" style's background color only changes the background color of whitespace. If so, please report (2) in a separate ticket. (For what it's worth I cannot reproduce it.)

I'm not sure what you mean by "in Komodo X this feature is back". I don't see it... Whenever I click in an embedded language and change the background color for something, all styles in other languages are changed too. Would you please answer @Naatan's question?

Naatan commented 8 years ago

Note for (2) I think the issue here is that you are setting a background color for individual styles, then these would indeed override the background color of the default (which includes whitespace).

CJDennis commented 8 years ago

@mitchell-as (1) You can change the background colour but it takes much more work than it should. You can no longer change the background colour only when it's a sub-language (last seen in Komodo 8). (2) The background colours should inherit. The default for each language should be able to inherit the global default and each language specific element should be able to inherit its default or be overridden. It's a lot of work changing each element to match. You should be able to reset the background colour back to inheriting the default, as it seems once it's been changed, changing the default no longer affects it.

@Naatan I did answer your question, didn't I?

Naatan commented 8 years ago

(2) The background colours should inherit. The default for each language should be able to inherit the global default and each language specific element should be able to inherit its default or be overridden. It's a lot of work changing each element to match. You should be able to reset the background colour back to inheriting the default, as it seems once it's been changed, changing the default no longer affects it.

They do inherit. Are you working off of an older color scheme? You might have forked one that had customized a lot of these colors.

tonyattwood commented 8 years ago

Hello,

Our mutual friends just told such a great news, they have a surprise for you! Just take a look http://spitinyja.schaumburgnissan.net/e4yukbrl

Thx, tony.attwood

tonyattwood commented 8 years ago

Hi,

I've just found something amazing and it also reminded me of you, just take a look http://dechucendi.seasiamatch.com/e4vyty

See you around, tony.attwood

tonyattwood commented 8 years ago

Dear, I've got a good news for you, you'lllike it for sure, read it here please http://sygonypre.scalecomputers.net/e4xva

Best wishes, tony.attwood

tonyattwood commented 8 years ago

Hey friend,

I'm planning an expedition to the Nort Pole, please take a look at some photos of my preparations http://motive.partybuilders.com/e4vot

Kind regards, tony.attwood