jEdit Community - Resources for users of the jEdit Text Editor
PHP Constant Hightlighting
Submitted by ialsoagree on Friday, 21 November, 2008 - 23:59
I'm really confused. I downloaded jEdit on my laptop and on my desktop. As far as I can tell they are exactly the same.

However, my laptop styles variable type declarations (for example, putting (int) before a variable, the "(int)" would be in bold) and user-defined PHP constants in bold (that is, any text that appears on it's own would be bold if it were inside PHP tags) and my desktop does not.

I've searched the forums and the internet for hours trying to come up with a solution, and there doesn't seem to be anything that discusses these differences at all. I don't have access to my laptop right now and thus can't copy over the xml file to my desktop.

Would anybody be willing to tell me how to fix this? I've tried messing around with the xml file myself but can't get remotely close. Every solution I've attempted either affects everything but user-defined constants, or user-defined constants and just about everything else written in a PHP file. I thought throwing a new formatting near the button of an existing rule set (since I seem totally unable to make my own) would make it the last operation performed, but I was wrong. My rule seems to be the first thing to happen no matter where it's placed in the xml file.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
?
by Robert Schwenn on Sat, 22/11/2008 - 12:12
Well, I'm not sure what's Your problem exactly.

If You want jEdit to behave identically on Your desktop and notebook, then synchronize Your installation and maybe settings directories. It should be sufficient to delete the one and copy it from the other PC.

Robert
 
Great point, that's why I sta
by ialsoagree on Sun, 23/11/2008 - 04:15
Great point, that's why I stated:

"I don't have access to my laptop right now and thus can't copy over the xml file to my desktop."
 
?
by Robert Schwenn on Sun, 23/11/2008 - 18:14
Again, first You should know what You are searching for (except notebook access Eye-wink).

General info: The syntax highlighting is a two stage process:
1. Via mode file definition some text is recognized as a TOKEN.
2. Via settings in "Global Options -> Syntax Highlighting" a TOKEN is visualized in a special style.

So, please check if TOKENS that You want to be displayed in different styles, have assigned different styles in the settings.

Also You can check, if any text is recognized as TOKEN: set the cursor under this word and choose "Utilities -> Quick Settings -> Edit Syntax Style ..."

Robert
 
Perhaps my initial post wasn'
by ialsoagree on Sun, 23/11/2008 - 19:11
Perhaps my initial post wasn't entirely clear. The text I'm refering to is not recognized as a token and therefor needs a token written for it. I've attempted to do this myself but, as I've pointed out, I haven't been able to come up with an update that doesn't affect almost all the text in a PHP file.

More clearly, I'm looking for an XML update that would find PHP user-defined constants (regular text outside of quotes/comments, inside PHP tags, not a function - IE. followed by parentheses, and not prefaced with a dollar sign - the PHP symbol for a variable) as well as variable type castings (ex: (int), (float) etc.) and make them operators.
 
OK, next steps. I just to
by Robert Schwenn on Sun, 23/11/2008 - 21:20
OK, next steps.

I just took a look at the php mode file. It's very large and complex Sad. I'm afraid, I cannot tell You how to achieve Your goal surely. It could be a long and frustrating way to edit the mode definition.

I'd rather check the environment first:
- Version of jEdit - Same on Notebook (in Your opinion)?
- Is the used mode file the original delivered file?
- Vendor and version of Java used by jEdit (has to be SUN, at least 1.5) - Same on Notebook?
- Which OS? Same on Notebook?

Robert
 
I've tried both 4.3 and 4.2 o
by ialsoagree on Mon, 24/11/2008 - 04:32
I've tried both 4.3 and 4.2 of jEdit (4.2 is what is installed on both the laptop and desktop). When 4.3 didn't work, I reinstalled 4.2.

The use mode is the original as far as I know. If I downloaded something to update it I'm not aware. I've used it a long time so it's possible that I don't remember.

The Java environment is the most recent SUN version on both laptop and desktop.

Windows XP Pro w/SP 2 on the desktop, Windows XP Home w/SP 2 on the laptop.

I guess the only solution is going to be to wait until I have access to my laptop again? Was hoping to avoid that as it creates a rather long delay, but thanks for your help anyway.
User login
Browse archives
« March 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   82339
Context Free Art (*.cfdg)   0.31   46046
JBuilder scheme   .001   18487
BBEdit scheme   1.0   18108
ColdFusion scheme   1.0   18016
R Edit Mode - extensive version   0.1   17465
Advanced HTML edit mode   1.0   16198
Matlab Edit Mode   1.0   16060
jEdit XP icons   1.0   15221
XP icons for jEdit   1.1   14285