Using jEdit 4.3 pre 9, in my python code, escaped quotes (\") are confusing the syntax highlighting. For instance, in the line
req.write("
")
Everything is normal up to the first \". The [" | ] is black, then from [")] on throughout the program up to the next quote on the next line is considered a string. So everything is pretty much reversed after that.
It's very annoying. I've been forcing them to PHP mode just so my eyes don't go crosseyed with all the pink code.
Is there an update to the python syntax highlighting? I tried comparing the Python and PHP configs, but it was too confusing for me to follow.
I did find http://community.jedit.org/?q=node/view/1930#1625 which is relevant, but it isn't explicit enough on how to fix the problem for someone who hasn't worked on the mode files before. Besides, I can't be the only one who'se seeing this.
Thanks.
changelog?
Submitted by thefayth on Wednesday, 18 April, 2007 - 08:50
hi,
i don't know what forum i should ask this in so i'll put it in here, sorry if it shoulsn't be, i was wondering does anyone know when i can access the changelog for jEdit i'm doing a little bit of research for a project and it would help if i had a changelog to see how its developed over time. Thanks for any help.
4.3 pre9 hangs when opening specific perl file
Submitted by dougis on Wednesday, 18 April, 2007 - 22:35
I need some help if possible.
I have a perl lib file that causes jedit to hang whenever I open it (runs CPU to 50% and I have to kill the task to get out of it).
I am running on windows and running version 4.3pre9 (my linux box running 4.2 does not seem to have the same issue).
Is there a way to figure out what it is in the file that is causing the hang up? I have tried saving the file in another editor to try and mess with the formatting, also attempted pulling it off my server via SFTP to reload the file and it still hangs.
Any ideas I can try to track down what causes this?
question
Submitted by McSwell on Thursday, 19 April, 2007 - 14:11
I'm trying to add special coloring for #ifdef (etc.) in Python files. These constructions are not a part of standard Python, hence not included in the standard jEdit Python mode. That is, my intention is to use the built-in Python coloring for all the normal Python keywords etc., and to extend this by adding a different coloring for #ifdef etc.
I did the following: to my user's 'catalog' file (i.e. the one in c:\documents and settings\<username>\.jedit\modes) I added the following line:
<MODE NAME="python2" FILE="python.xml" FILE_NAME_GLOB="*.py" />
Then I created in that same directory a file python.xml, which leaving out the usual stuff has the following:
<RULES>
<IMPORT DELEGATE="python::MAIN"/>
<KEYWORDS>
<KEYWORD4>#ifdef</KEYWORD4>
</KEYWORDS>
</RULES>
(I tried to indent the above, but I'm not sure how to do that in this forum...) And of course I set a special color for KEYWORD4 in jEdit's Utilities | Global Options: Syntax Highlighting.
If I'm understanding the documentation in the jEdit Help, this is the recommended way to extend a built-in coloring.
But it doesn't work. That is, I don't get any special coloring for #ifdef, only the normal Python coloring.
I have ruled out a number of things that I could be doing wrong. Specifically, I get #ifdef colored appropriately (as KEYWORD4) if I leave out the <IMPORT DELEGATE> line--but then I of course don't get any of the normal Python coloring. I have also verified that there are no KEYWORD4 tags in the original (as-shipped) python.xml file.
So what am I doing wrong?
Mike Maxwell
"Can't happen"--yeah, right
Submitted by McSwell on Thursday, 19 April, 2007 - 19:48
I've got six or seven buffers loaded, and all work but one. When I try to display that particular file, the buffer is blank. I can go to the top of the file, and move the cursor down line by line; each line will appear until I get to about line 10, when a "BeanShell Error" msg appears. And it literally says "Can't happen". Some comfort...
I've tried closing and re-opening that file, closing and re-starting jEdit, and even rebooting my PC. Nothing works. At this point the file in question does not seem to be damaged on disk, but I certainly can't use jEdit to edit it.
There's a rather lengthy error msg. Unfortunately, it does not appear to be possible to copy it to the Windows clipboard. It starts out (I'm typing this in by hand, so no guarantees that I haven't made a mistake):
java.lang.InternalError: Can't happen
at org.gjtsp.jedit.syntax.TokenMarker.handleRule(TokenMarker.java:412)
at org.gjtsp.jedit.syntax.TokenMarker.markTokens(TokenMarker.java:158)
at org.gjtsp.jedit.Buffer.markTokens(Buffer.java:2115)
and so on for hundreds of lines.
I would attach the Activity Log, but it is nothing short of huge.
Suggestions on how to fix this are welcome...
Mike Maxwell
Cyrillic on Linux
Submitted by atg2d on Friday, 20 April, 2007 - 12:38
Hi i beleive this is a java problem but i hope that someone has experienced this and might be able to help me. Here is the problem:
I am using Gentoo linux and jdk 1.5.10. When i write latin symbols in jedit everything is ok, but when i try to write cyrillic symbols or romanian, or polish special characters nothing happens - nothing is displayed in the editor field (not even jibberish or squares or anything - the cursor doesn't move at all). When i paste them from another program they are displaying fine.
What could be the reason for that and how can this be fixed. Please if somebody knows something about that help me.
Thank you
tilde gobbling: any work arounds?
Submitted by WGW on Friday, 20 April, 2007 - 19:26
I can't get Jedit to output a tilde. I shuffled through forum messages and this seems to be a perennial problem, so this is just a bump to see if there is anything new.
The problem:
Minor: with the normal us keyboard, no tilde
Major: with the us international keyboard, most deadkeys can't be typed: ' " ~ ` ^
Under Ubuntu 6.10 (Edgy) I can switch keyboards to the US standard to resolve the Major problem (annoying, but an acceptable workaround: the US international keyboard works fine everywhere else except Jedit). However, I still can't get the tilde even under the US standard keyboard.
Is this a Linux problem? Jedit worked fine in Windows.
Here is some data:
Jedit 4.3pre9 Java: 1.5.0_11
Ubuntu 6.10 (Edgy)
Compaq presario R3000
Keyboard troubleshooter message: filters the character.
Using addError & addExtraMessage - the ErrorList plugin API
I have been using jEdit alongside the Microsoft Visual C++ IDE (MSDEV) application for quite some time now, whilst writing embedded apps simulations PCs hosting XP.
Some time ago I bolted together a support tool that detected compilation log creation (.plg files generated by MSVC when compiling C/C++ projects) and then opened and parsed the errors & warnings.
From this data a bsh script file is generated, an then executed by jEdit to populate the ErrorList plugin's window accordingly.
So I can compile within another IDE, but edit and correct code within jEdit. Quite handy.
I later extended this tool to collate PC-Lint analysis results (also invoked within the IDE) in the same manner.
A typical example of the bsh file generated by the tool is as follows (I have only included a single addError invocation, but this is enough to demonstrate the script format):
//-----------------------------------------------------
import org.gjt.sp.jedit.*;
import org.gjt.sp.util.*;
import org.gjt.sp.jedit.gui.OptionsDialog;
import org.gjt.sp.jedit.msg.*;
import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import errorlist.*;
import java.util.*;
import gnu.regexp.*;
import console.*;
void run()
{
void log_errors()
{
errorlist.DefaultErrorSource errsrc;
errsrc = new errorlist.DefaultErrorSource("MSVC");
errorlist.ErrorSource.registerErrorSource(errsrc);
jEdit.getAction("error-list-clear").invoke(null);
errsrc.addError(ErrorSource.ERROR, "C:\\my_projects\\hw_if\\control\\ctrlapi.c",944,0,0,"LNT787: (Info -- enum constant 'DTV_PL_ASIG_AV_IP1_AUDIO' not used within switch)");
errsrc = null;
}
if(jEdit.getLastView() == null)
VFSManager.runInAWTThread(this);
else
log_errors();
}
run();
//-----------------------------------------------------
The problem I have here is that I wish to extend some of the messages in the plugin output to be multi-line, but I cannot see how to use the addExtraMessage method with the preceding code - can anybody explain how I would modify my bsh script output to permit this?
PS - if anyone else out there running a Windows OS also wants to generate errors/warnings in jEdit from externally generated files, then let me know!
quick delete of both brackets
Submitted by djDeathx on Saturday, 21 April, 2007 - 06:36
I love jEdit, it resembles my all time linux editor Kate with the window splitting. jEdit has many functionalities, but one that could aid a programmer in getting work done _how_ they want to, would be:
On keyPresses deleting left or right bracket (from ex:" (test) ") would find the first closing or opening bracket and delete it as well. If the word 'test' was another longer word, moving the cursor to the beginning or ending of the word by means of arrow keys or CTRL + arrow keys takes longer to perform since it has 2x as many presses of the backspace button.
One change doesn't make a difference, but if your going through a stack status conditions and there's a lot of manipulation going on, it would come as a great help;
I hope you implement it. I am hooked on jEdit while on 'doze.
Thanks
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
|