jEdit Community - Resources for users of the jEdit Text Editor
Archives
Open Search & Replace Dialog
Submitted by andyc on Monday, 4 February, 2008 - 21:56
Hi,

I have what I hope is a simple problem...

I am writing a basic macro to find the next occurrence of the currently selected text. Something along these lines already exists and can be downloaded using the Macro Manager plugin. What's new in my version is that I would like to have the Search & Replace dialog be displayed if no text is currently selected. (That way, I can map it to Ctrl+F and still access the dialog via this shortcut.)

I couldn't find much info on this and what I did find seemed to refer to the "SearchDialog.showSerachDialog" method that doesn't seem to exist any more. I would be most grateful if someone could point me in the right direction.

Many thanks,

Andy
Quick question regarding autoindenting
Submitted by Jamalarm on Tuesday, 5 February, 2008 - 16:21
Hi,

Very quick question. What do i have to modify in order to change the autoindent from a TAB to three spaces when working with .java files. I had a look around, and i found the file i needed to change, but i couldn't work out what it was that needed changing, as it were.

Thanks enormously,

Tom
Toggle Line Comment (Toggle_Line_Comment.bsh v1.5 by John Gellene)
Submitted by goebbe on Wednesday, 6 February, 2008 - 13:40
The title says it all. This highly useful macro has once been part of the default install of Jedit. Since the macro is missing in recent development versions of Jedit and I couldn't find it in the internet I decided to upload the file here, for the purpose of conservation. All credit to John Gellene. In recent versions of Jedit (4.3pre13 and later) the GnuRegexp-plugin is required for this macro. Similar functionality is provided by the TextTools-plugin.
compile jEdit with JDK only?
Submitted by khcon on Thursday, 7 February, 2008 - 23:28
is there a way to compile jEdit using just the JDK 1.4.1 and no additional software like Ant? I can't install anything new onto that machine and the JDK is the only thing available. I also HAVE to compile it from source code ...

Thanks,
KH
Any SQL parser available for jEdit?
Submitted by net-res on Friday, 8 February, 2008 - 10:21
The title says it all: are there any SQL parsers available for jEdit?
XSL Plugin install failed
Submitted by Davide Bizzocchi on Tuesday, 12 February, 2008 - 14:52
Hi everyone, I have a problem with the installation of the XSLT Plugin in jedit 4.3pre12.
I tried downloading it from every mirror, but it keeps reporting this error at the end of the download:
"Error while downloading the plugin, please try another mirror".

Also, if I try to download the plugin manually, the zip file is corrupt and I cannot open it.
Default file selection option
Submitted by srikrishnan on Wednesday, 13 February, 2008 - 16:35
Hi All,

Is it possible to set default file selection option for some extensions (e.g. .txt,.xml,etc), for the purpose of opening them my double click the files in Windows, just like in other applications?

Regards,
Srikrishnan
Default file selection option
Submitted by srikrishnan on Wednesday, 13 February, 2008 - 16:36
Hi All,

Is it possible to set default file selection option for some extensions (e.g. .txt,.xml,etc), for the purpose of opening them my double click the files in Windows, just like in other applications?

Regards,
Srikrishnan
Default file selection option
Submitted by srikrishnan on Wednesday, 13 February, 2008 - 16:37
Hi All,

Is it possible to set default file selection option for some extensions (e.g. .txt,.xml,etc), for the purpose of opening them my double click the files in Windows, just like in other applications?

Regards,
Srikrishnan
How to get value dropdown in XML Edit Tag Dialog
Submitted by dhschulten on Thursday, 14 February, 2008 - 07:11
Hi, I am using XML Schema for validation and there are situations where there are only a limited number of allowed attribute values. I have seen that jEdit sometimes creates dropdown lists with allowed attribute values (e.g. when editing a schema), but I could not find out how this is done. At least, xsd:enumeration in the following schema expression does not lead to such a value dropdown: A similar situation are key references. It seems desirable to propose a list of existing keys for key reference attributes. But I can understand that it is not trivial to get this list and in very large documents it might not be so desirable after all. Anyhow, is there a way to get a dropdown for attribute enumerations as shown above? Cheers, Dietrich
Menu congestion under 'Plugins'
Submitted by McSwell on Friday, 15 February, 2008 - 17:28
Having installed several plugins, the 'Plugins' menu is getting rather congested. Doing anything requires drilling down several levels--AFAICT, as an end user (as opposed to a plugin provider) I can't assign any menu items to frequently used actions in plugins, nor apparently can the plugin writers put their menu items anywhere except under the Plugins menu. (I can assign shortcut keys to plugin actions, but I'm running out of them, too; and I'm allergic to toolbars.) Also, letter accelerators (like FC for File | Close) don't work with plugins, either. Is there any way for an end user (who is not a Java programmer) to modify the main menu structure? (I know that the Utilities | Global dlg allows me to modify the right-click menu, but I want to be able to modify the main menu bar.) I'm using 4.2 at the office, and don't have any control over that. (I suppose we'll move to 4.3 when it's finalized; maybe that solves my problem?) Mike Maxwell CASL/ U MD (Apologies for the ugly posting; I know how to use whitespace, but my newlines don't show up when I Preview, and presumably won't show up when I submit)
Set of my jEdit Macros (taat_jedit_macros.zip v1.0 by Tomek Pęszor)
Submitted by takeshin on Saturday, 16 February, 2008 - 23:22
A set of my jEdit macros. See description at: http://taat.pl/jedit/ Note: This is zipped file. Extract it before placing in settings directory. All macros as a separate files can be downloaded from http://taat.pl/en/jedit/
User-defined menus
Submitted by McSwell on Sunday, 17 February, 2008 - 18:15
I would like the ability to define my own menu. Then I could put some of my more frequently used commands (particularly the ones for the plugins) there. It should allow the use of "accelerator keys", that is a specified letter that you type once you're in this user-defined menu that chooses one of the actions (like when you're in the File menu, typing 'o' or 'O' will get you the File Open dialog). (The accelerator key feature is absent from the Plugins menu--adding that capability to the Plugins menu would make the user-defined menus less important, although still nice to have.)

I know that I can add actions to the pop-up menu, but I'm asking for the ability to add actions to a main menu item (probably a main menu item of my own choosing). Without Java programming Smiling.

Mike Maxwell
CASL/ U MD
Action Bar commands
Submitted by prk59 on Sunday, 17 February, 2008 - 21:06
Hi everybody,
Like a lot of you I suppose, I fell in love with jedit. But I still do not know how to use it very well. Yesterday I discovered the action bar. In the manual it says that I can open the Global Options by typing l-o in the action bar. I tried it and it worked. However I was not able to find other commands (for example for the plugin options). When I'm in the action bar and I press up I get a list of commands, but they are of the type plugin-options; what I want is short commands. Where can I find a list of all the commands that I can type in the action bar please?

I also have a small question that is off topic: is jedit still (actively) developped? Because almost everywhere on the site I see old dates (2001, 2003) and on the botton of the page it says (c) 2003. In addition to that, I think there haven't been a release for some time now. Please excuse me if I am wrong (actually I hope I am wrong...)
can jedit do this
Submitted by tsr on Sunday, 17 February, 2008 - 21:33
Hi,

I'm thinking about adapting an editor to handle the creation of UMC (user made content) for Battle for Wesnoth (BfW) - located at: http://www.wesnoth.org.

BfW uses a mark-up language called WML (wesnoth markup language) that has some similarities with xml (the main differences are: preprocessor directives and [ ] instead of < >). WML is fairly strict in what you are allowed to write where.

I've been looking (really fast and not in-depth) into jEdit, and it seems that it meets my requirements. But before I dive into the specifics of jEdit and java I'd like to know if what I want is possible.

What I want to be able to do is something like:
- hide unwanted features (from the editor) easily (as to not confuse people that are new to the concept of programming)
- indentation and syntax-highlightning
- code snippets
- wizards (that is, some kind of forms/dialogs that when completed insert a modified code snippet), both the ability to create them but also the ability to define where (in the UI) they will be shown.
- create a wml-reference
- plugin in a few wml-tools (that are currently written in python) that can be launched and generate reports back to jedit
- launch the main application (that is BfW), to easily test changes
- when the cursor waits a list of possible strings to write at the current location are displayed.

I think that's it. So is this possible to accomplish with jedit as a foundation and an unspecified amount of hours? (I mean without forking the projekt, 'just' writing a plugin)

/tsr
SQL BeanShell Preprocessor: how to use?
Submitted by Wavis on Friday, 22 February, 2008 - 00:51
I write a lot of SQL at my job. It's one of my primary responsibilities. The SQL plugin has been extremely useful. It would be even more useful if I could get it to replace @variable with a value, but I can't get the preprocessor to work. There is no indication how to use it. It doesn't prompt for a buffer to execute, there is no documentation as to variables the beanshell script would be passed, there are no settings for it in the project properties, or plugin options, or under the SQL plugin menu. Does anyone know?
AutoIt Full Version 3 Support Mode (au3.xml v1.0 by M. Bayley)
Submitted by MikeB55 on Thursday, 28 February, 2008 - 05:21
This is a full implementation of a mode file for the AutoIt scripting language. Full syntax support for code folding, user defined variables, user defined functions, etc.
SIMATIC S7 Edit-Mode (German Version) (S7_jEdit.zip v0.1 by Thorsten Willert)
Submitted by Thorsten Willert on Thursday, 28 February, 2008 - 09:06
A simple SIMATIC S7 Edit-Mode for S7 source-codes. German version only.
Includes a S7-library for XInsert.
Make XML plugin play better with Beauty plugin
Submitted by xhq on Friday, 29 February, 2008 - 14:25
Hi,

I installed XML plugin and it automatically installed Beauty plugin. I tried to use beauty to use XML:XMLIntender to format an XML file but just found they can not work well together. Here is the mail I sent the other day. I post it here in hope some one can notice it.

The problem:

When invoked from Beauty plugin, incorrect IndentAmount could be used. For example, in the buffer optios, I set "Tab width" to 8 and "Indent width" to 8 and uncheck "Soft (emulated with spaces) tabs", the result IndentAmount would be 8 tabs!

I checked the code of both Beaty and XML. It seems the XML code needs to be improved. Here is the details:

In XML/xml//indent/XmlBeautifier.java, the main line reads:

return XmlIndenterPlugin.indent(text, getIndentWidth(), !getUseSoftTabs());

But the same indent() api is used in the following way, in XML/xml/indent/XmlIndenterPlugin.java, public static void indentXml( View view ):

String resultString = XmlIndenterPlugin.indent( inputString, indentAmount, indentWithTabs );

where indentAmount is calculated using:

private static int getIndentAmount( boolean indentWithTabs, Buffer buffer ) {
if ( indentWithTabs ) {
return buffer.getIndentSize() / buffer.getTabSize();
}
else {
return buffer.getIndentSize();
}
}

So, I think the same logic used in getIndentAmount() should be applied in XmlBeautifier. It might be worth adding a new static method to XmlIndenterPlugin:

public static int getIndentAmount(int indentSize, int tabSize, boolean indentWithTabs) {
if ( indentWithTabs ) {
return indentSize/ tabSize;
}
else {
return indentSize;
}
}

and refactor the original one as:

private static int getIndentAmount( boolean indentWithTabs, Buffer buffer ) {
return getIndentAmount(buffer.getIndentSize(), buffer.getTabSize(), indentWithTabs);
}

Then the line in XmlBeautifier will be:

int indentAmount = XmlIndenterPlugin.getIndentAmount(getIndentWidth(), getTabWidth(), !getUseSoftTabs());
return XmlIndenterPlugin.indent(text, indentAmount , !getUseSoftTabs());

I think this will work, but have not test it though.
^1 ^2 ^3 stopped working
Submitted by McSwell on Sunday, 2 March, 2008 - 03:55
Sometime recently (in the past week or so?), Control-1, control-2, control-3 etc. stopped working in jEdit. Before I report this as a bug, I thought I would run it by here in case anyone had any ideas.

^1, ^2 etc. are the default keys for splitting the window. I checked and they are still assigned to those functions in the Utilities | Global Options under the Shortcuts; but when I try to assign them to some other function, they don't register at all. That is, if I click on a cell, jEdit pops up a little dialog box allowing me to "Specify Shortcut". If I type most any key, it shows up in the text box; but ^1, ^2 etc. don't appear. It's as if they aren't getting pressed. Oddly enough, ^6 still works, as does control-minus; but none of the other combinations of the control key with the top row work.

Control-. control-, and control-/ have also stopped working, and several others. I believe all the control-alpha keys work.

I thought maybe some other program was interfering. But I fired up my Other Editor, Visual Slickedit, and all these keys work fine there.

I would suspect a bug in some late version of jEdit or in Java, but if so it is odd that no one else has reported this. I did install a new Java just yesterday: 1.6.0_04, but I've also tried this with Java 1.6.0_03 and 1.5.0_02. And I'm using jEdit 4.3pre12; I have not yet tried reverting to an earlier version, although I suppose I'll try that and report back. I am running on Windows XP, all service packs. I tried both left and right control keys, and also the CapsLock key (which I've mapped back to a control key, as God intended it).

Any suggestions?

Mike Maxwell
CASL/ U MD
User login
Browse archives
« February 2008 »
MoTuWeThFrSaSu
 
1
2
3
9
10
11
17
18
19
20
21
23
24
25
26
27
 
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   83283
Context Free Art (*.cfdg)   0.31   46056
BBEdit scheme   1.0   18596
JBuilder scheme   .001   18496
ColdFusion scheme   1.0   18025
R Edit Mode - extensive version   0.1   17474
Advanced HTML edit mode   1.0   16207
Matlab Edit Mode   1.0   16069
jEdit XP icons   1.0   15230
XP icons for jEdit   1.1   14294