Change MySQL code color while editing PHP files

Hello guys and gals.
When I open a PHP I like the code color scheme, but the color for the MySQL queries is horrible: it is underlined and with a gold background... (please see attached file)
I searched all the settings, but can't find a way to change that gold background.

Any hint?

Thanks in advance.



Attachment(s):
query.png
5 comments
Comment actions Permalink

Hi there,

The "gold background" is most likely to be Language Injection background (will be light green on standard color scheme).

Please check "Settings | Editor | Colors & Fonts | General | Injected Language Fragment" for that.

Not sure about underlined -- could be the same. If not -- look at  "Settings | Editor | Colors & Fonts | SQL"

P.S.
I do not like that color scheme...

0
Comment actions Permalink

Thanks Andriy. Turns out it was the "Warning" style. The queries were all shown as "warnings" because the database was not linked.
Not it's fine (with the green background, as you said).

BTW, I switched from another editor to PhpStorm, and before I buy the license I'm trying to reproduce some old behaviours I was used to, like color scheme I used to have and so on...

Just another question (probably off of this topic).
In my old editor (Homesite... yes, I know... pretty old) I could assign a key (like Ctrl+D) to an external javascript, that were executed inside the IDE.
I most uses this function to add dates to my comments.

Example: I press Ctrl-D and the IDE writes for me:

//comment bla bla, left by inutile on 01/10/2014 h12:01

of course the date and time is the calculated and written in real time.

I saw I can create something like that using Live Templates, but I do not know how to make PhpStorm to print the time/date.
Any hint?

Thanks again,
Enrico

0
Comment actions Permalink

Yes, Live Templates is to go here.

You should use a variable (e.g. $DATE$) where you want to have the current date. Then use "Edit variables" button and add appropriate expression(s).

The official help page has the list of all available "live functions" that can be used there plus some examples with pictures (custom date format) etc
http://www.jetbrains.com/phpstorm/webhelp/edit-template-variables-dialog.html

0
Comment actions Permalink

Great, Andrij.
Is there a way to assign a live template to a key?
Like: i press ctrl+H and the editor triggers a Live Template?

Thanks,
Inutile

0
Comment actions Permalink

No.

But you can record a macro where you use live template and assign key to it.

0

Please sign in to leave a comment.