jEdit Community - Resources for users of the jEdit Text Editor
Archives
Opening file: reuseview problem
Submitted by lilive on Friday, 19 March, 2010 - 15:30
Hi,

Since a few days, I can't re-use jEdit view to open a file. My OS is Windows XP.

this command...

start "jEdit startup" "C:\WINDOWS\system32\javaw.exe" -Xmx192M -jar "C:\Program Files\jEdit\jedit.jar" -reuseview a-file.txt

...always launch a new jEdit instance.

I did the same thing during many months without problems. I haven't updated my jEdit installation, nor my JRE.

Can anyone help please?
Open/Save to Google Docs
Submitted by vsPiotr on Monday, 22 March, 2010 - 00:16
Hi All,

I'm a total non-programmer so bear with me Smiling

I would love to be able to open/save to google docs (via a URL or ideally getting the doc list from google to choose file from within jEdit)?
I had a short play with python + gdata (docList?) and it seemed straight forward.

I hope that would give me some sort of syntax highlighting for google docs.


Cheers!
Can you edit the list of open files jEdit tries to restore on start-up?
Submitted by Julian Treadwell on Monday, 22 March, 2010 - 02:25
Hi,

A long-time jEdit user but first-time poster here.

I tried to use jEdit to open a large data file which caused it to hang. jEdit now hangs every time I use the standard start-up batch file (start "jEdit startup" "C:\WINDOWS\system32\javaw.exe" -Xmx192M -jar "C:\Program Files\jEdit\jedit.jar" -reuseview %*) unless I append '-nosettings -norestore'. Just appending '-nosettings' or '-norestore' doesn't fix the problem.

I need to remove this filename from the files jEdit will try and open - anyone know how to do this?

Thanks,

Julian
Visible Tabs?
Submitted by rovf on Tuesday, 23 March, 2010 - 17:29
I have set my global options like this:

Tab Width: 4
Soft Tabs: checked

When I press the Tab character, the text is intended to the next multiple of 4 characters, and the intending is done by inserting spaces. This is OK.

When I however open a file which already containins tabs, these settings cause jedit to display the text alsoe tabulated to a multiple of 4, but there is no visual clue that we have a tab character (it looks not different from spaces).

What I would like, however, is the following behaviour:

- If the text contains "hard tabs", they should be displayed either using some special (rarely used) character - as most text editors do - or by using a different background colour - which I would prefer.

- In addition, I would like to set up a different tab width for hard tabs (for instance, 8 characters).

Is this possible with jEdit?
"Open with jEdit" does not work with Win7 (x64)
Submitted by Hans_Bauer on Friday, 26 March, 2010 - 08:27
Opening a file via the context-menu of the explorer does not work anymore under Win7 (x64), although the associated entry in the registration for the context-menu:
HKCR\*\shell\Open with jEdit\Command
with the content
"C:\Windows\system32\javaw.exe" -Xmx192M -jar "C:\Program Files\jEdit\jedit.jar" -reuseview "%1"
uses correct paths.

Amazing workaround:
Create the file "C:\Temp\JEditStart.bat" with the line
"C:\Program Files\jEdit\jedit.jar" -reuseview %1
And create a registration key
HKCR\*\shell\Open via JEditStart\Command
with the content
"C:\Temp\JEditStart.bat" "%1"
This will do the job.

My first suspicion was, that the tcp/ip-traffic between the jEdit-client and the server could be causal and be blocked by the windows-firewall. So i allowed "C:\Windows\system32\javaw.exe" for internal and external traffic, but nothing changed.

Any ideas to fix/enable the original context-menu-item "Open with jEdit"?

Thank you!
Hans
+line command line attribute does not work with spaces on the filepath ?
Submitted by PlayeFox on Saturday, 27 March, 2010 - 19:29
So, I'm trying to load jedit from the command line and redirect the cursor to a line number.
I copy my test text file readme.txt to the HD root, and do from the jEdit folder:

jedit "c:\readme.txt" +line:2

Works like a charm, cursor is right there on second line. Then I create a directory named "a a" at the root, move the readme, and do:

jedit "c:\a a\readme.txt" +line:4

Nope, still on line 2. Tried fidling with the batch file with no luck.
Any ideas ?
Writing text in two buffers
Submitted by DirkK on Sunday, 28 March, 2010 - 13:31
Hi to all,

I'd like to write text in two new buffers, so I wrote this short beanshell script:

buffer1 = jEdit.newFile(view);
editPane = view.goToBuffer(buffer1);
textArea = editPane.getTextArea();

textArea.setSelectedText("Buffer 1\n");

buffer1.save(view, "C:/Work/test1", true);

buffer2 = jEdit.newFile(view);
editPane = view.goToBuffer(buffer2);
textArea = editPane.getTextArea();

textArea.setSelectedText("Buffer 2\n");

buffer2.save(view, "C:/Work/test2", true);

as soon as the script tries to execute the textArea.setSelectedText, I get an exception "Text component read only". Has anyone an idea why I get this exception?
Moving the buffer1.save downward to the buffer2.save the script works fine.

The next challenge: if I try to write in the buffers alternate (first in buffer1, next buffer2 and then in buffer1 again) all the text is written in just one buffer. how do I select where my text is written?

thanks in advance for your responses, Dirk
Re-installing jEdit 4.2 with appropriate plugins
Submitted by Kuba on Monday, 29 March, 2010 - 23:34
Hi,

I'm looking to re-install jEdit 4.2 with a working Jython Interpreter and am running into problems. The reason I'd like to do this is because the current Jython Interpreter seems to have problems with jEdit 4.3.1 -- http://community.jedit.org/?q=node/view/4354.

On an old computer I have jEdit 4.2final which still works with the Jython Interpreter I installed with it a few years ago. When I copy the jEdit 4.2 folder to my new computer, all the plugins are gone. Where can I find the plugin files on my old computer (Mac powerbook, OS 10.4.11)? Spotlight search for "jython" yields nothing.

Alternatively, I still have the jEdit 4.2 DMG installation file and can re-install. But the plugin manager for 4.2 has a very limited list of plugins available for installation, and I'm having trouble installing Jython Interpreter manually. I've downloaded it from the current Plugins page, copied the .jar files into the jars folder, but I get a string of install messages that lead me to install ErrorList and then Sidekick, which, finally, does not seem compatible with my program.

So, does anyone out there know how to run Python macros in jEdit using Jython Interpreter either in jEdit 4.3.1 or 4.2?

Many thanks in advance for your suggestions!
Kuba
Is there a way to create a local mirror for one plugin?
Submitted by patrick_toole on Wednesday, 31 March, 2010 - 04:57
I am developing a plugin that I dont necessarily believe is best served for public consumption. Is there a way for me to create a local "mirror" with only my plugin on it, without having to actually mirror everything?

Basically, I'd like my users to pull from the public mirrors, but have access to our Intranet to download an additional plugin.

Thanks.
Extending the action bar - passing arguments to actions
Submitted by irumat on Wednesday, 31 March, 2010 - 22:46
Hi all,

Long time reader, first time poster. I was thinking of adding a (probably awful) hack to the ActionBar to see if I could have the action bar do something like:

<ctrl+enter>action_name my_arg<enter>

For example, it could be "my.save.as filename.bak". Ofcourse, it would be a big effort to have this work for the built-in jEdit actions. But one could, perhaps, write a macro that took an argument like that. It would replace having to show a dialog box to collect simple input.

Any thoughts? Do you think it is possible and worth pursuing?

Cheers,
Irumat
XInsert plugin does not load (my) user xinsert file
Submitted by mabra on Friday, 2 April, 2010 - 17:30
Hi All !

I have just upgraded to jEdit 4.3[.1], I installed from scratch and setup all required plugins.

XInsert no longer works for me! None of my xinsert files are loaded!
I tried all, I can think about:
- use the \Program files\XInsert dir
- use \user\.jedit\XInsert dir
- specify a custom dir [in plugin options]
- install the plugin manually

All my includes works well in jEdit 4.2.
I depend completely on XInclude and just cannot continue.

Any help would be really great! I do not know, what's wrong and
if this is a bug.

Best regards,
mabra
PHPParser doesn't parse preg_replace
Submitted by premislaus on Wednesday, 7 April, 2010 - 11:01
code like this:

$addr2 = preg_replace("/(\d+.*$)/is", "", $addr2);

and parser says: Unexpected token: '$'

regards
HTML Cleanup (delete tags and contents)
Submitted by modestmoose on Wednesday, 7 April, 2010 - 20:07
I am working on a project at my law school. I receive news articles in .docx format and then convert them to .html. This requires a lot of cleanup of the extra tags Word puts into the text. I have a very simple macro that does a find and replace to delete common unneccessary tags. What I want to do is the entire header tag and its contents (and other tags such as table tags).

I have no programming background and can't figure it out. How would I have a macro search for (head) and (/head) and then delete the tags and everything in between?

Thank you ahead of time for any insights you can give me,

Brian
FTP - New feature request FTPS/FTPES support
Submitted by Ed34222 on Thursday, 8 April, 2010 - 12:08
It is cool that it does FTP and SFTP (FTP over SSH); but it would be even more handy if it did FTPS(FTP over SSL Passive connection) and FTPES (FTP over SSL Active connection).

SSH is first and foremost a telnet protocol. As such it carries risks.
In order to use it for FTP users must also, often, have telnet access - not exactly ideal from an administrative point of view.

Many servers now use FTPS and FTPES instead of SFTP.

Being able to access those servers directly from jEdit would be quite the time saver.

I currently use the open source FileZilla client to access these kinds of servers.
Locating files
Submitted by strangelybrown on Thursday, 8 April, 2010 - 12:20
If a file references other include files within it, is it possible to locate it in the File Browser without having to manually scroll through the File Browser? I was originally hoping it would be possible to right click on an include reference in order to see the actual file in the file structure.

many thanks
Submitted by Anonymous on Thursday, 1 January, 1970 - 00:00
n/a
Paste location at caret instead of cursor?
Submitted by BigDub on Wednesday, 14 April, 2010 - 01:57
I am a newbie -- evaluating jedit cuz it looks like a better editor than what I have been using. Mostly I like the feature set of jedit, but one thing really bugs the heck out of me. It may be a show-stopper for me if I can't change this behavior. Specifically, when I right click and choose paste from the popup, the clipboard gets pasted at the cursor rather than the caret. I think I am using the terminology right... The caret is a stationary spot in the text area that is set by left clicking. The cursor is a dynamically changing spot which tracks mouse movement. All other editors I have ever used paste at the caret and that is the way I would like to have it work. Is there a way? A setting? A plugin? A macro?

jedit version = 4.3.1
OS = Ubuntu Karmic (9.10)

Warren
Block selection
Submitted by optigon on Thursday, 15 April, 2010 - 16:38
Hi all,

There are two ways to select a block of text in jedit as far as I know.
1) press [Alt] + [\] to enter block selection mode. Then use [Shift] and the Arrow keys.
2) press [Ctrl] + the Left mouse button.

While these are both useful, I am trying to figure out if there is a way to make a third option
3) [Alt] + Arrow keys

The advantage is that it wouldn't leave you in Block Selection mode like 1, and you wouldn't have
to move your hand to the mouse, like 2.

I tried making a macro of 2, but the macro recording facility won't register mouse events.
Is there a way to do this?

Richard
I've lost my tag matching and autocomplete functionality
Submitted by jcaponi on Friday, 16 April, 2010 - 19:52
Maybe it was the upgrade to 4.3, but I've lost some jedit functionality:

Tag matching - the highlight in the gutter that would link an opening and closing html tag, for instance; and
Tag autocomplete - being able to hit the tab key and close a bold tag, for instance, after hitting just the open bracket and backslash

What option or plug in do I need?
thanks!
Sharing: A macro for making text bold () with Ctrl-B
Submitted by ezuk on Sunday, 18 April, 2010 - 20:19
Hi all, This may be useful for newbies. A macro based on the "Insert Tag" macro which comes with jEdit, but which surrounds the selected text with b and /b tags. I bound it to Ctrl-B and it's a very useful way to quickly make a word bold.
void insertTag(tag)
{
	caret = textArea.getCaretPosition();
	if( tag == null || tag.length() == 0) return;
	text = textArea.getSelectedText();
	if(text == null) text = "";
	sb = new StringBuffer();
	sb.append("<").append(tag).append(">");
	sb.append(text);
	sb.append("");
	textArea.setSelectedText(sb.toString());
	//if no selected text, put the caret between the tags
	if(text.length() == 0)
		textArea.setCaretPosition(caret + tag.length() + 2);
}

if(buffer.isReadOnly())
	Macros.error(view, "Buffer is read-only.");
else
	insertTag("b");

Enjoy Smiling
User login
Browse archives
« March 2010 »
MoTuWeThFrSaSu
3
4
6
7
8
9
10
11
12
13
14
16
20
21
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