I would like to change the color for defined variables in Aptana 3 and I can't find the right element for this (Window - Preferences - Aptana studio - Themes) .
define ("valid_username","Valid username");
<?php echo valid_username; ?>
I tried to change the color for constant element but it only affects numbers and true/false.
So, which element in Themes section is responsibile for defined v开发者_如何学运维ariables.
For php, I would try to adjust the color for "variable" instead of "constant". In the example:
$rated = "test";
$rated would have its color changed if you modified the theme for the "variable" element.
The valid_username
token after echo
doesn't have a distinct scope in our current PHP support. It reports back a scope of source.php source.php.embedded.block.html
, which is just the scope for anything inside a php block.
As a result you can't really target it to be colored differently. Textmate uses a scope of source.php source.php.embedded.block.html constant.other.php
, which allows you to color it by targeting constant
, or constant.other
.
This is a bug, please file a ticket for us to fix this mismatch in scopes for this snippet here: http://jira.appcelerator.org/secure/CreateIssue!default.jspa
精彩评论