jEdit Community - Resources for users of the jEdit Text Editor
Archives
Python escape quote syntax highlighting wrong
Submitted by dj_segfault on Tuesday, 17 April, 2007 - 13:53
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
Submitted by PaulCollingwood on Friday, 20 April, 2007 - 20:40
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
Is there a way to set selection font color?
Submitted by onno on Saturday, 21 April, 2007 - 15:11
Hi,

Is there a way to set the foreground or font color for both multiple and single selection?

What I'd like to do is make the background color dark blue, and the font color white.

Thanks,
Onno
Problem with CTRL+char combinations
Submitted by Naturo on Monday, 23 April, 2007 - 09:31
I have a problem with Jedit: whenever I type CTRL+some_character, it executes the command corresponding to the combination (when such command exists) but it also inserts the character into the current position in the text.

E.g. when I type CTRL+x it deletes the selected text but it inserts the character 'x'. If I type CTRL+f it opens the Find&Replace dialogue window but it also inserts the character 'f' into the text.

I have this problem only with Jedit, things work fine when I use other editors, including Java-based editors like Netbeans IDE editor.

I am using Jedit 4.2final on Fedora 3, with Sun jdk1.5.10 (but I have the same problem when switching to jdk1.6 or jdk1.4).

Here is what happens when using Utilities->Troubleshooting->Keyboard Tester:
If I type CTRL+x for instance, it prints "C+x x" in the textefield of the "Specify Shortcut" dialogue window, and the following event report is printed in the text window:
Event KEY_PRESSED,keyCode=0x58,keyChar=0x78,modifiers=0x2 passed
==> Translated to C<0,78>
Event KEY_TYPED,keyCode=0x0,keyChar=0x78,modifiers=0x2 passed
==> Translated to <0,78>
Event KEY_RELEASED,keyCode=0x58,keyChar=0x78,modifiers=0x2 passed
Event KEY_RELEASED,keyCode=0x11,keyChar=0xffff,modifiers=0x0 filtered

Thanks in advance for any help!

Displaying Chinese
Submitted by creepytennis on Monday, 23 April, 2007 - 11:15
Hi,

I'm using JEdit on Gentoo Linux 2006.1 Everything works perfectly, except that I cannot display Chinese characters.

I am loading Chinese in UTF-8. It loads, edits and saves fine (i.e. the UTF-8 encoding is not scrambled by JEdit), but within JEdit all the Chinese shows as small squares.

I have searched the internet and these forums extensively. I seem to have the same problem as this guy:

http://community.jedit.org/?q=node/view/3398

I have tried changing the LANG and LC_ALL environment variables as well as setting the -Dfile.encoding JVM option to "UTF8". Nothing works.

At the moment JEdit is useless to me because of this, although the website and docs say it can display Chinese correctly. It looks like a smart editor. Can anyone help?
Wheel scrolling not working, Vista-Intellipoint 6.1
Submitted by keensyntax on Monday, 23 April, 2007 - 18:25
I just picked up a new MS Natural Wireless 6000 mouse. When I use this mouse with Intellipoint installed, jEdit and oXygen xml editor will not scroll with the wheel. If I uninstall Intellipoint, they will, but I'd really like to have some of the features in Intellipoint. Has anyone run into this or otherwise know of a way to make this configuration work?
Line wrap
Submitted by Naturo on Wednesday, 25 April, 2007 - 16:00
Sorry to bother, I have searched the JEdit help and the forum but haven't find any answer to the following issue:

When the wrap option is set, a long line is wrapped as expected if and only if it contains spaces.
If the typed line does not contain space characters (i.e. the line is a single and very long token) then it is not wrapped (i.e. it is necessary to use the horizontal scroller to see the tail of the line). Cheching and editing such a line without visual wrapping is awkward when the line is very long, e.g. the value of a PATH variable in a .chsrc file.

Is there any way to wrap the lines even if they don't contain spaces?

Thanks for your help!

HTML&JAVA alignment
Submitted by kernel on Wednesday, 25 April, 2007 - 18:18
Hi ,
i'm new to jedit i've tried playing with it but i can't seem to find where do i define the alignment on html and java code ? (i think i used the correct english word for it , i mean how to i make it tab right automaticly ) .
ta
Go to file on current line Rails specific macro. (Go_To_File_On_Current_Line.bsh v0.4 by Panya)
Submitted by Panya on Friday, 27 April, 2007 - 14:28

This is a Ruby on Rails specific macro which ported from TextMate Rails bundle 'Go To File on This Line' command. Just go to line which contain any file name(action name, controller name, javascript file name, stylesheet file name, partial name, layout name) and use the macro will open this file. This macro requires ProjectViewer plugin.

P.S. Open_Partial macro is not needed now.
Snippet chooser / paster (Insert_Snippet.bsh v1.0 by Mike Cline)
Submitted by mikecline on Friday, 27 April, 2007 - 19:25
For pasting snippets of code (or any kind of text, really) into the current buffer.

You store all your snippets as separate text files in the c:\snippets directory (hard-code another location if you like). When you run the macro it pops up a JList selection box where you can choose which snippet to paste.
Problem with accents on Ubuntu Feisty
Submitted by gp on Thursday, 3 May, 2007 - 22:10

I am having a problem with foreign characters when using jEdit 4.3pre9 on Ubuntu Feisty. It's not strictly a jEdit problem, but I was hoping that someone here more experienced with Java could help me.

The problem is this: when typing characters with an accent, those characters come out wrong in Java apps. It appears to only affect Swing apps (jEdit, Zend Studio). Eclipse, which uses SWT, does render the accents correctly. Please note that this has nothing to do with character encoding settings in the apps themselves.

With Java 1.5, when typing an accented character, it is replaced with a totally different character (I usually get the blank square); with Java 6, accented characters are replaced with the non-accented equivalent (for example, what should be ă comes out as the letter "a"). There is one exception: accented characters from the Latin-1 (ISO 8859-1) character set, such as "ü", "é" etc. are rendered correctly.

I ran the apps on sun-java5-jre and sun-java6-jre (from the Ubuntu repositories), as well as on Java 1.5 downloaded directly from Sun. There is no difference.

Here's the output of jEdit's keyboard troubleshooting feature when I try to type the characters:

I am trying to type ă (U+0103). jEdit running on Java 1.5.

Event KEY_PRESSED,keyCode=0x41,keyChar=0x1e3,modifiers=0 x20,consumed=0 filtered
Event KEY_TYPED,keyCode=0x0,keyChar=0x1e3,modifiers=0x20 ,consumed=0 passed
==> Translated to <0,1e3>
Event KEY_RELEASED,keyCode=0x41,keyChar=0x1e3,modifiers= 0x20,consumed=0 passed

Same character, jEdit running on Java 6.

Event KEY_PRESSED,keyCode=0x0,keyChar=0xffff,modifiers=0 x0,consumed=0 filtered
Event KEY_PRESSED,keyCode=0x41,keyChar=0x61,modifiers=0x 20,consumed=0 filtered
Event KEY_TYPED,keyCode=0x0,keyChar=0x61,modifiers=0x20, consumed=0 passed
==> Translated to <0,61>
Event KEY_RELEASED,keyCode=0x0,keyChar=0xffff,modifiers= 0x20,consumed=0 passed
Event KEY_RELEASED,keyCode=0x41,keyChar=0x61,modifiers=0 x0,consumed=0 passed

Any help would be greatly appreciated.

Buffertabs sorting seems broken in 4.3
Submitted by tdir on Saturday, 5 May, 2007 - 14:08
I have been using 4.2 for a long while and recently tried upgrading to 4.3pre9. In 4.2 the order of buffertabs seems to be based on the global options "Sort buffer list" and "Sort buffer list by file name", both of which I normally check. Doing so in 4.2 causes the buffer tabs to be sorted by filename and stay in that order. With 4.3 the order seems sorta by filename but each time I select a tab it jumps to the front. This causes the other tabs to get out of order until finally each tab selection creates a new random ordering with the most recent buffers in the front row. I find this to be almost unusable - I spend too much time searching through the tabs every time I want to select a file.

I have tried the two 'sort buffer list' checkboxes in various combinations - they seem to have no effect whatever.

I am running mainly under WinXP but also Ubuntu and Red Hat.

1. Is this the correct behavior? Has the behavior changed from 4.2 to 4.3?
2. Is there a fix? Is this a bug?
3. Should I report/post to a better place than this forum?

Thank you very much for any clues provided!
Background Plugin problem with 4.3pre9/Java 1.6.0
Submitted by Magno X on Tuesday, 8 May, 2007 - 17:22
Hello all

I upgraded to 4.3pre9, and now the background plugin is acting up. The image doesn't stay fixed when I scroll up and down, instead the image tears and segments repeat. Has anyone encountered this? Is there a solution?

Thanks
User login
Browse archives
« April 2007 »
MoTuWeThFrSaSu
  1
2
7
12
14
15
16
22
24
26
28
29
30
 
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   108250
Context Free Art (*.cfdg)   0.31   46071
BBEdit scheme   1.0   18607
JBuilder scheme   .001   18508
ColdFusion scheme   1.0   18041
R Edit Mode - extensive version   0.1   17488
Advanced HTML edit mode   1.0   16222
Matlab Edit Mode   1.0   16086
jEdit XP icons   1.0   15245
XP icons for jEdit   1.1   14309