jEdit Community - Resources for users of the jEdit Text Editor
Archives
trouble displaying filenames longer than 8.3
Submitted by vincewebb on Thursday, 22 June, 2006 - 20:05
Hello
I have been happy using JEdit version 4.2 final under windows for some time and been very happy with it.

I recently upgraded the JDK to 1.5.0_07-b03 and now I have a problem. The problem seems to coincide with the new version of JDK but I can't be 100% sure. It still edits files OK and if I open the file via "File - Open - select file" then all is well.

If I open a file via a right click and the "Open with JEdit" option, then
if the filename is longer than the old MSDOS 8.3 format it edits the file OK but displays the filename using Microsoft's dodgy 8.3 with a tilda format.

e.g. I open the file:
common_rep_lib_body.sql
JEdit tells me I am editing a file named:
COMMON~4.SQL

This smells a bit like Windows is passing a dodgy filename to JEdit however it worked OK before and it still works OK when I open the same file using a right click and "Open with" a different application like Notepad.

Any ideas ?
where do I put an editor scheme file?
Submitted by localshredder on Friday, 23 June, 2006 - 04:50
Where in the world do I put my scheme file once i've downloaded it. I can't be this stupid...
RecursiveOpen plugin update for 4.3pre3 (RecursiveOpen.jar vn/a by nick durcholz)
Submitted by nick.durcholz on Friday, 23 June, 2006 - 16:11
This jar file is compatible with 4.3 pre3. Also includes new ignore lists option.
Help releasing plugin update
Submitted by nick.durcholz on Friday, 23 June, 2006 - 18:47
Hi I recently made some small fixes and enhancements to Lee Turner's Recursive Open plugin. This is now compatible with 4.3pre3 and 4.3pre4. I don't have CVS access and I was wondering if somebody could help me with getting this update into Plugin Central.

thanks in advance,
nick
"stackable" panes?
Submitted by sethrasmussen on Friday, 23 June, 2006 - 20:29
Can you have, say, two right-docked panes open at the same time, stacked on top of each other?

I haven't seen anything intuitive or obvious pointing to that, if so.. if not, I think that's a reasonable feature request. Has this been discussed? It's not a big deal ultimately, but it would be useful at times.
C debugger
Submitted by chobo2 on Monday, 26 June, 2006 - 04:21
Is there a C debugger in jedit? if not I would like to see one.
swap to java.util.regex?
Submitted by farmerBri on Tuesday, 27 June, 2006 - 06:27
First off - long time user, first time poster - I love jEdit, have converted most of my co-developers to jEdit devotees in the last couple of years (it's suprisingly easy to push jEdit considering how close text-editor choice is to religion amongst developers)

So, yeah - jEdit uses gnu.regexp rather than the java default java.util.regex for reasons I don't yet understand... I'm hoping some kind soul will enlighten me.
I'm particularly missing lookbehinds, both negative and positive, but after a quick comparison of the gnu.regexp documentation with java.util.regex there is also lots of other useful things:
  • \p{Punct} -- Punctuation: One of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
  • \P{InGreek} -- Any character except one in the Greek block (negation)
  • [a-z&&[^bc]] -- a through z, except for b and c: [ad-z] (subtraction)
  • X?+ -- X, once or not at all (Possessive quantifiers)
  • (?idmsux-idmsux:X) -- X, as a non-capturing group with the given flags on - off
I can't see anything in gnu.regexp that is not available in java.util.regex. So java.util.regex is more powerful (in terms of options) and I also often use the search in jEdit for conveniently testing my regexes before using in a java app, so it would be beneficial to say the least if they both spoke the same syntax Sticking out tongue

In summary - is it possible / feasible for me to swap the default regexp implementation to java.util.regex? I'm willing to get my hands dirty, but some pointers would be greatly appreciated.

cheers all.
hail jEdit.
Console plugin - change classpath default for javac
Submitted by janM on Tuesday, 27 June, 2006 - 11:30
I am using JEdit on Windows XP platform.

When I use the javac command with the console plugin it always defaults to "$Classpath; folder of java source code".

I would prefer to use the classpath environment variable setting, which it will do if I delete the default entry. However I don't want to have to do this each time I run the command.

Is there any way I can amend this default setting?

Thanks
Large files
Submitted by maciejr on Tuesday, 27 June, 2006 - 12:20
Hi,

I sometimes need to work with large data files: containing numeric and other data. By "large" I mean larger than the available memory, say a few GB. Note that there are many editors around that compete in solving the problem of editing files in memory. Surprisingly, I could not find even a simple tool that solves a different problem: does what can be done in reasonable time with a large text file on disk.

I would like to find or make a tool to edit a file with no limit on file size, like a disk-based editor. Specifically such a tool could:

(1) quickly view parts of a file
(2) edit a small part of the file in memory (taking appropriately long to commit changes)
(3) search and replace some text through the file (making one full pass through the file)

I've searched these fora and, judging from a discussion in 2004, jEdit does not seem to support editing large files.
Are there any plans for a "large files" editing mode with limited functionality?
Could anyone point me to a (free or low cost) tool that already does that?
I am totally new to jEdit, but have some programming background. Do you think it is doable to adapt jEdit to perform such a task?

Thanks in advance for help,

Maciej.
Having trouble with lookahead regex in a syntax highlighting mode
Submitted by soapi on Tuesday, 27 June, 2006 - 15:26
In the particular language I am writing a mode for, the start and end of code blocks are delimited by { }. Code appears within these braces. So, it's a little like except with different symbols. Within these braces, *everything* after a double slash - // - is a comment... right to the end of a code block (not just on the same line). For example: { some code // this is a comment } Now, the syntax I first tried was: // } However, this interferes with the match for the end of the code block, and so the end } is not detected correctly. I then tried: // (?=}) ...which I think should do the trick, as the lookahead should trigger a match upon encountering the end brace, but not include it in the match, so it should still be there for the code block rule to find. The trouble is, it doesn't match anything at all! Further experimentation seems to suggest that the END block cannot actually contain regex - just the BEGIN block. If so, this is pretty useless, so I have to assume I'm doing something wrong. Can anyone help me out and show me how to accomplish what I want? Thanks!
Plugin htmlsidekick and *.php files
Submitted by slux on Tuesday, 27 June, 2006 - 19:20
Hi!

How I can use this plugin in the .php or an other type of file ?
Currently this good plugin work fine when i'm editing a file that have the *.html extension...

Tnks!
Quick look around java codes
Submitted by ccapeng on Tuesday, 27 June, 2006 - 20:32
I have been tried Eclipse fow a while, but not really work for me. The UI is complciated and need to work on project concept.

But, I really like some of editing features in Eclipse, like "Open Declaration" and "Open Type Hierachy". Basically, I can look at the methods defined in the other classes easily.

Any similar features in jEdit?
Saving to locked files
Submitted by mekondelta on Wednesday, 28 June, 2006 - 10:19
I'v been using EditPad Pro for a while now on Windows and love it's ability to write to a file that has been locked by another program.

For example, I can view a log file from my application server (as I can in JEdit now) but I can also clear the file's contents, save and overwrite the log file so that I can have logs that just show the content that I want to see.

Is there anyway to incorporate this into JEdit. It's the killer feature of EditPad (even the Classic version) and is the only thing stopping me from switching to JEdit. (Other than the "Stay on Top" feature which I can replicate with DesktopPins.

Cheers, Chris.
Unable to start JPyDebug plugin - Windows
Submitted by lmtra on Wednesday, 28 June, 2006 - 22:02
Please forgive the runon text - this is my first post and I've struggled trying to get spacing as per my original Sad I’m running JEdit4.2Final on a Windows XP system. After upgrading to jdk-1_5_0_07 and changing the PATH accordingly to C:\Program Files\Java\jdk1.5.0_07\bin, Java compiles and runs buffers correctly, the JythonInterpreter (v 0.9.6) plugin works, BUT, when try to execute the JPYDEBUG plugin (v 0.16), I get: “A BeanShell error occurred:” (why BeanShell?) with the text: java.lang.NoSuchMethodError: org.gjt.sp.jedit.textarea.JEditTextArea.getBuffer()Lorg/gjt/sp/jedit/buffer/JEditBuffer; at org.jymc.jpydebug.jedit.PythonJeditPanel.install(PythonJeditPanel.java:362) at org.jymc.jpydebug.jedit.PythonJeditPanel.activate(PythonJeditPanel.java:204) at org.jymc.jpydebug.jedit.PythonJeditPanel.(PythonJeditPanel.java:186) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at bsh.Reflect.constructObject(Reflect.java:668) at bsh.BSHAllocationExpression.constructObject(BSHAllocationExpression.java:123) [...] The corresponding excerpt from the Activity Log is: […] [debug] EditPlugin$JAR: Opening C:\Documents and Settings\Leon.Traister\.jedit\jars\JPyDebug.jar [debug] JPYJeditPlugin: 'start' of Python Debug Plugin [debug] EditBus: PluginUpdate[what=ACTIVATED,exit=false,source=C:\Documents and Settings\Leon.Traister\.jedit\jars\JPyDebug.jar,class=org.jymc.jpydebug.jedit.JPYJeditPlugin] [debug] JPYJeditPlugin: Entering python debug menu [debug] DockableWindowManager: Loading dockables from jeditresource:/JPyDebug.jar!/dockables.xml [debug] PythonJeditPanel: Initing PythonJeditPanel [debug] PythonJeditPanel: Adding to JEditBus [debug] EditPlugin$JAR: Opening C:\Documents and Settings\Leon.Traister\.jedit\jars\jython.jar [debug] PythonJeditPanel: Installing pane [error] BeanShell: java.lang.NoSuchMethodError: org.gjt.sp.jedit.textarea.JEditTextArea.getBuffer()Lorg/gjt/sp/jedit/buffer/JEditBuffer; [error] BeanShell: at org.jymc.jpydebug.jedit.PythonJeditPanel.install(PythonJeditPanel.java:362) [error] BeanShell: at org.jymc.jpydebug.jedit.PythonJeditPanel.activate(PythonJeditPanel.java:204) [error] BeanShell: at org.jymc.jpydebug.jedit.PythonJeditPanel.(PythonJeditPanel.java:186) [error] BeanShell: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [..] Help appreciated! Leon T.
html named entities (html_named_entities.bsh v1.5 by Johannes Raggam)
Submitted by thet on Thursday, 29 June, 2006 - 16:35
converts special characters to html entities.
based on recorded macro (search/replace) and entity list from http://de.selfhtml.org/html/referenz/zeichen.htm
keeps the search settings as is.

the JTidy plugin has also this function, but maybe this beanshell macro is still useful for someone.

## NEW VERSION ##
including ISO-8851-2 charset
may also be faster
the CHARSET of the macro is UTF-8,
set your file temporary (or permanent) to UTF-8, otherwise the search will nothing find to replace.
edit the macro to fit your needs - for sure there are many characters from many charsets left.

### PLEASE NOTE ###
the file is in UTF-8 encoding. your file where you want to replace characters also has to be in utf-8, otherwise there will be no effect! so: CONVERT YOUR FILE IN UTF-8 BEFORE running the macro and convert it back afterwards.
if someone knows a beanshell commands to read and set the charset-encoding of an file, let me know - so this task could be automated. --> raggam at adm dot at
### / PLEASE NOTE ###
MAC REQUEST: apple.laf.useScreenMenuBar
Submitted by stovak on Saturday, 1 July, 2006 - 18:22
in the "java" section of the info.plist in the mac download, I'd like to request one small change: Using the mac's top white menu as the default menu bar... you do this by added the following entry to the key entry in the info.plist: [code] Java Properties ....... apple.laf.useScreenMenuBar true [/code] This will put jEdit's menu bar at the top of the screen in the white menubar.
Darcs patch and changelog edit modes (darcs-edit-modes.zip v1.0 by Nick Clarke)
Submitted by memorius on Tuesday, 4 July, 2006 - 07:03
Two edit modes for jEdit, to be used with the darcs revision control system.
Use these to examine darcs patches sent by email, or take the output of darcs commands and view it in jEdit - for example, this makes darcs whatsnew much more useable.
  • darcs-patch.xml (darcsp): Highlights elements of darcs patch files: e.g. the output of darcs send -o mypatchfile.pat and darcs whatsnew commands.
  • darcs-changelog.xml (darcsc): Highlights elements of darcs changelogs: e.g. the output of darcs changes commands.
These edit modes are intended to be installed together (one delegates to the other). They will highlight a number of things in different colours:
  • text of lines added / removed in hunk patch sections
  • line number and filename for each change
  • files added, removed, modified
  • binary patches
  • various fixed strings which divide the darcs output
  • patch metadata in darcs changes - patch name, comment, author etc.
  • handles the results of additional output options to darcs: -v, -s etc.
See top of each file for a comment with entries for the edit mode catalog file.
How to delete a marker from a buffer in a macro?
Submitted by mabra on Wednesday, 5 July, 2006 - 13:32
Hi All,

I insert a marker into a buffer, before I make some modifications to it;Just to remember my starting position. After I finish my task, I will remove the marker, but this fails.

My code[snippet] is as follows:

char mc = 'X';
buffer.addMarker(mc, 6);

... my buffer-modies here ...

Marker m = buffer.getMarker(mc);
buffer.removeMarker(m.getPosition());

The marker is stil there [and "m" is NOT null!]

Any help would be really very welcome.
Thanks,
Manfred
XInsert:Respecting CDATA in CDATA and more global references
Submitted by mabra on Wednesday, 5 July, 2006 - 14:35
Hi All, I am new to JEdit and after discovering XInsert, it becomes my most importent module!!!

With other libraries, I was not that successful [like "Clipper" and "Templates"]. Although, IMO, some enhancements would be very welcome.

First, I try to manage my VBScript library with it, but my most scripts are based on the xml-format [usual extension is ".wsf"]. Inside this scripts/snippets, I have always to include CDATA sections to surround the code-blocks, but this is not possible in XInsert using "xinsert_script" item-types:

<item name="Feature.Request" type="xinsert_script"><![CDATA[ ?XML version="1.0"?> <package> <job> <![CDATA[ -- This is the "inner" CDATA section required for VBScript 'My script body here Option Explicit Dim someObject ]]> -- end "inner" CDATA </job> </package> ]]> !!!!!!!!!!!!!!!!!!!!!! The whole library is no longer usable after this, not only the current file! All libraries below the current module are no longer displayed. I am not sure, if this is a bug, I'll just request for respecting CDATA in CDATA sections, which works well in my other xml's.

My workaround was to use "CDATA.BEGIN" and "CDATA.END" inside my snippets and replace them by macros. Even this is not easy:

String search = "CDATA.BEGIN";
String repl = "<![CDATA["; The last line is not possible at all and I have to recode it like:
cdataBeginReplace.append((char) 0x3C).append("!").append("[").append("CDATA").append("]");
..... Sad

It might be, this is simply JEdit's xml interpretion itself?

Additionally, a "global reference" to the current XInsert file would be very useful;All my modules contain currently a "Edit this lib" entry-macro, which has to be hardcoded.

Further, another tag like "macro" would be a good idea, just to put library common code into the module. Currently, I put all this things in my startup as global code.

This should not be considered as a complaint Eye-wink , just a wish for some useful enhancements!

Thanks a lot!
Manfred

Note:This was not easy to write!!! Luckily, I discovered, that one may use the "xmp" tag inside the post [just to help others with this note]
Mouse right-click behavior
Submitted by mabra on Wednesday, 5 July, 2006 - 22:22
Hi All !

Right-clicking with the mouse into the buffer unexpectedly - so far for me - also moves the caret/the current line to this position. I personally think, right-clicking the mouse should only open the context menu, nothing else.

For example, if your caret is at the end of the buffer and you scoll up to see some text to decide what do next and then open the context menu [that mentioned right click!] to insert some text etc., this would unexpectedly happen at that clicked textline, not - as I was expecting - at the end of the buffer.

What are the usual expectations here and by other users? My macros do not work very well in this scenario. It looks more as unripe behavior than planned, or I am wrong here?

Note:If there is text selected, it works well and the cursor/caret/current line stays exactly were the selection is.

Thanks a lot,
Manfred
User login
Browse archives
« June 2006 »
MoTuWeThFrSaSu
  2
4
11
12
13
15
24
25
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