jEdit Community - Resources for users of the jEdit Text Editor
Archives
Macro to run a focused Rubt testcase
Submitted by wolfmanjm on Monday, 27 November, 2006 - 02:26
Here is a macro that will run whatever Ruby testcase the cursor is currently in, it runs only that one test, not the whole thing.
Works well for Rails functional, unit and integration tests too.

Download from http://blog.wolfman.com/files/Run_Test_Case.bsh
running processing files from jEdit?
Submitted by jesusgollonet on Monday, 27 November, 2006 - 10:15
hello all. First post here...

First of all... I love jEdit. Thanks very much for a wonderful program.

Then the question... Does anyone here use jEdit for editing processing ( http://www.processing.org/ ) files?

I want to be able to compile and run processing files from within jedit, to avoid switching between both ides when i want to publish. I know this is possible with eclipse, as explained here http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Integrate;action=display;num=1117133941 , and thought it could be possible in jEdit as well, as both are java based.

Does anyone know how could that be done?

I know this is more on the processing side than on jEdit, but I got no response on the p5 forums...

Thanks in advance for any help
Search and replace with the filename
Submitted by poil on Monday, 27 November, 2006 - 17:22
Hi

I'm struggling to write a macro that will search for a string and replace it with that buffer's file name, or better still, a substring of the filename, across all open buffers.

I'm currently trying to use SearchAndReplace.setBeanShellReplace(true) and putting variable names in SearchAndReplace.setReplaceString("theName") with no luck.

Anyone got a macro like this?

Thanks
Which plugins for basic IDE/debugger
Submitted by Jim on Tuesday, 28 November, 2006 - 04:44
Hi, guess that says it. Would appreciate guidance on minimal plugins that will give me an IDE with auto indent, syntax coloring, and a debugger that allows conditional breakpoints and a way to view variables.

Thanks very much,
Jim
Hypersearch results - link to editor
Submitted by shlomy on Tuesday, 28 November, 2006 - 07:01
This is just a curiosity question: I noticed that that clicking items in the hypersearch results brings me to the correct place in the file even after adding/removing lines in various places in the file and modifying the line to which the result was linked. This makes me think that each hypersearch result stores the line number in which it originated, and then jEdit either updates these line numbers when the file is modified or uses the undo buffer to find the up-to-date line number of the search result when it is clicked. Am I correct?

I am asking this because a similar problem exists with the ctags outlines - CtagsSideKick, CodeBrowser - neither of them works well in tracking the correct location in the code after it is modified (unless 'parse on keystroke' is used).
generating/destroying macros for RoR developers (rormacros.rar v0.11 by Panya)
Submitted by Panya on Tuesday, 28 November, 2006 - 18:44
This is a macros for generating / destroying:
  • Models
  • Controllers
  • Integration tests
  • Migrations
  • Scaffolds
This macros requires Console plugin. For the correct working you must be in RoR project directory.
Trouble writing an edit mode with line continuation characters
Submitted by logris on Tuesday, 28 November, 2006 - 21:35

I am trying to write an edit mode for "JPL", the code behind a 4GL language called Panther and created by Prolifics. I have run into a problem that I cannot find a solution to and I would like to pose it to the JEdit community for any ideas.

Panther statements are newline terminated with a line continuation character. This seems to be the root of my problems. I would like to syntax highlight embedded SQL-like statements using keywords that only pertain to the embedded language. Here is an example of the embedded statement I would like to highlight:

// Call some function
call some_func()

// Begin the embedded SQL to highlight
DBMS SQL SELECT column \
FROM table \
WHERE column = 'Value'

// Do something else
for i= ...

The statement I want to highlight always begins with 'DBMS' and ends at the end of line, unless there is a line continuation character. There can be any number of continued lines. The statement ends at the end of the first line without a continuation character. For now, I will assume nothing can go after the continuation character (no comments).

Any ideas on how to match and delegate this statement to a seperate set of <RULES>? The best I have found so far is use <SEQ> to match the beginning DBMS statement and use <SEQ_REGEXP> to match on " [^\s\\]*$" with a hash character of " " for the end, but that tends to mess up my last token's highlighting.

Maybe there is a way to match on newline or detect the end of line? Or delegate when no more tokens are left on a line? Or match across a line?

Any help would be appreciated. Thanks. =)

diff between folders
Submitted by bambule on Tuesday, 28 November, 2006 - 21:37
Hi all,

the jEdit has the nice JDiff Plugin. But sometimes I need to diff two folders. I would be nice to have a Plugin to select two folders and the different files will be shown in JDiff. So the most difficult things are done and there is just an interface needed between JDiff and "FolderDiff".
Wrong Cursor Image with Ubuntu Linux
Submitted by hamoda on Tuesday, 28 November, 2006 - 23:33
I use jEdit 4.2 with Ubuntu Linux 6.10 and Java RE 1.5. The cursor image does not seem to be sensitive of the respective GUI's area, instead it is the arrow pointer in the whole left part of the application's window, and in the right part it becomes the I-beam, from top to bottom of the window. I did not experience this behaviour under Windows.
HAML language mode
Submitted by wolfmanjm on Saturday, 2 December, 2006 - 02:15
Here is a first attempt to implement a HAML language mode for the Ruby on Rails HAML plugin.

It is documented here: http://blog.wolfman.com/articles/2006/12/01/a-haml-edit-mode-for-jedit

You can download it from here: http://blog.wolfman.com/files/haml.xml
HAML language mode (haml.xml v1.0 by Jim Morris)
Submitted by wolfmanjm on Saturday, 2 December, 2006 - 03:09
A first attempt to implement a HAML language mode for the Ruby on Rails HAML plugin. It is documented here: http://blog.wolfman.com/articles/2006/12/01/a-haml-edit-mode-for-jedit
Fixing java.lang.outofmemoryerror in Mac OS X
Submitted by AndrewClarke on Tuesday, 5 December, 2006 - 11:27
I want to increase my heap space from 64MB since I run out so often. I have read about and know the command line switch to do this, but I can't figure out how to set this up so it happens automatically when I click on the JEdit.app icon in OS X. Can anyone tell me how to do this?

Thank you very much,
- Andrew Clarke.
XQuery plugin trouble
Submitted by clif2 on Tuesday, 5 December, 2006 - 20:45
I can't get the XQuery plugin to recognise the base URL. The path supplied by the file browsers is delimited by \ and therefore invalid. I substituted / . The path was accepted, but the adapter produced no output. I modified my query so that it didn't depend on the base URL and it worked. So the problem would seem to be with the URL. I also tried prefixing file:/// but that was reported as not pointing to any directory.

Has anyone managed to get the base URL working and pointing to the local file system?

Any suggestions?
SQL Plugin - Connect to MS SQL Server from Linux?
Submitted by erezbibi on Wednesday, 6 December, 2006 - 16:38
I can connect to MS SQL Server with the SQL plugin from WinXP, I just create a User DSN in the ODBC manager of Windows, and insert the DSN name in Project->Properties->SQL...->DSN.

Has any one managed to connect to MS SQL Server from Linux? What should I write in the DSN text box?

Thanks
Erez Bibi
How do I launch the appropriate application for a file?
Submitted by turtlecove on Wednesday, 6 December, 2006 - 19:34
I am trying to write a macro that opens the file named in the selection with the appropriate application. For example, [mysheet.xls] would start Excel and open the file mysheet.xls, [mytext.txt] would open Notepad... I've tried sending the filename to cmd.exe, but that doesn't work. I've tried sending it to Explorer but that just views it in explorer. Here's what I have (not working properly):
  // launch app to open file NOT WORKING!
  /*
  os = System.getProperty("os.name");
  if(os.indexOf("Windows 9") == -1 && os.indexOf("Windows M") == -1) {
    comspec = "cmd.exe /C ";
  } else {
    comspec = "command.exe /C ";
  }
  */
  comspec="explorer.exe ";
  if (myfile.matches("[\\/]")) {
    command=comspec+myfile;
  } else {
    // handle relative paths:
    command=comspec+buffer.getDirectory()+myfile;
  }
  // Macros.error( view, "launching "+command);
  setAccessibility(true);
  runtime = new java.lang.Runtime();
  runtime.exec(command);
  return;


Searching for a file in a list of directories
Submitted by turtlecove on Wednesday, 6 December, 2006 - 19:54
I am trying to find a single specified file in a set of directories. The filename is currently selected, the directories are listed at the bottom of my text file as follows: [path:adirectory][path:anotherdirectory][path:yetanotherdirectory].

The paths are searched recursively (ie: subdirectories are searched as well), or alternatively I can allow globs in the paths like so: [path:C:\toplevel\projects\*\]

I've got searching the current document for [path:xxxx]. I've got the selected filename.
What I am having trouble with is searching the filesystem for the filename. I am trying to figure out how to use DirectoryListSet to do this, but I cannot see how it can be used alone without involving the GUI. I also tried to figure it out using File.list(), but cannot figure out how to specify a filter.
Any help I've found googling around has been in Java, not Beanshell, and since I'm not expert at either I cannot figure out how to translate the Java solutions into Beanshell.

Any help?
BufferTabs: Split screen shouldn't duplicate all tabs
Submitted by turtlecove on Wednesday, 6 December, 2006 - 20:20
The title says it all. When using BufferTabs if you split the screen BufferTabs happily duplicates ALL of the tabs in each split screen. If I have a lot of buffers open this can waste 1/3 of my screen real estate!
Of course, the tabs should be shown ONCE across the bottom and not duplicated when the view is split.
Timed out installing plugin under Ubuntu
Submitted by matthewyoung on Friday, 8 December, 2006 - 22:19
In Ubuntu 6.10, I tried to install the RubyPlugin get Connection timed out exception. At the same time, I try to install plugin in Windows XP and it's fine so the mirror site is not the problem, right?

I am using Sun java version "1.5.0_08" in Ubuntu.

If automatic plugin install does not work, can I manually download and install plugin?
Compiling/Running from within jEdit?
Submitted by vapourmle on Sunday, 10 December, 2006 - 14:47
HI there, I'm new, I have been trying jEdit, I quite like it but I have been alt+TABing between it and a console window which I do my compiling in. this is a bit awkward as I'd like to compile from within the editor, but I can't find any documentation that tells me how to do it? Are there compile/run buttons in jEdit, if so, what are they?

Also, I have never really grown to love its colourless icon scheme, are they ways of changing this, for example skins?
plugin or macro?
Submitted by godfailed on Sunday, 10 December, 2006 - 18:04
http://downloads.symfony-project.com/demo/admin/admin_generator_commented.mov

I was watching this video and noticed something in textmate. I don't know if thats a macro's or some form of keyword based autocomplete. Is there something in jedit that is simular to this? or would it have to all be done through macro's?
User login
Browse archives
« November 2006 »
MoTuWeThFrSaSu
 
5
8
10
11
12
13
14
16
17
18
20
21
22
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   109183
Context Free Art (*.cfdg)   0.31   46075
BBEdit scheme   1.0   18610
JBuilder scheme   .001   18511
ColdFusion scheme   1.0   18044
R Edit Mode - extensive version   0.1   17492
Advanced HTML edit mode   1.0   16226
Matlab Edit Mode   1.0   16089
jEdit XP icons   1.0   15248
XP icons for jEdit   1.1   14312