jEdit Community - Resources for users of the jEdit Text Editor
Automatically run Ant on the default target of the build file for frontmost buffer (Run.bsh v1.0 by Philip Weaver)
Submitted by philmaker on Tuesday, 7 March, 2006 - 09:47
It's kind of cumbersome to have to switch between ProjectViewer and AntFarm during development. So I created this simple macro (3 lines) to allow me to press command-r to run the nearest build file for the frontmost buffer. You'll also need to create a keyboard shortcut yourself.

The script assumes that AntFarm and ProjectViewer are docked in the same pane. Whenever AntFarm runs, its panel becomes visible automatically, so the macro quickly switches it back to ProjectViewer (which I always leave open.)

If you have any questions or would like to enhance this, feel free to contact me at philip at philmaker dot com. All of this is documented in jEdit help:

- Console Plugin Help: 6. Macros and the Console plugin
- AntFarm Plugin Help: 5. The Ant Shell
- jEdit API Reference: org.gjt.sp.jedit.gui.DockableWindowManager
Shuffle Lines Macro (Shuffle_Lines.bsh v1.0 by DreamTangerine)
Submitted by DreamTangerine on Thursday, 6 October, 2005 - 17:58
a BeanShell macro script for shuffling the order of lines in a buffer. If there are selections, the lines in the selections will be shuffled, otherwise the whole buffer will be shuffled.
Geo coordinates converter macro (Coordinates_convert.bsh v1.0 by Rolandas A.)
Submitted by Driezas on Wednesday, 28 September, 2005 - 12:53
This macro converts geografical coordinates between degree.decimal and degree minutes seconds.decimal formats and vice versa. Created primary for X-plane flightsim related development. Maybe will be usefull for anyone. If you have any comments or suggestions contact me by email rolandas dot ananijevas at gmail dot com.
Get_Screen_Color.bsh v1.0 by Delvin Johnson
Submitted by delvinj on Thursday, 8 September, 2005 - 18:20
Get_Screen_Color.bsh: A small text field that shows RGB or Hexadecimal color value for the current mouse coordinate. Usage:
  1. Press UP or DOWN to toggle RGB/Hexadecimal values
  2. Press ENTER to copy the current value to the clipboard and stop.
  3. Press ESCAPE to stop without copying.
Requires JRE 1.5 or later
Screenshot.bsh v1.0 by Delvin Johnson
Submitted by delvinj on Thursday, 8 September, 2005 - 18:15
Take a screenshot of your desktop and save it as a PNG file.
Write Active Plugins to Buffer (Write_Active_Plugins_To_Buffer.bsh v1.0 by Jeroen Budts (TeRanEX))
Submitted by TeRanEX on Wednesday, 17 August, 2005 - 21:12
This macro creates a new buffer an writes a list of currently active plugins to it. The list is formatted in DokuWiki's table syntax. (formatting can easily be changed)
Select lines matching regex (Select_Lines_Matching_regex.bsh v1.0 by De Franciscis Dimitri)
Submitted by megadix on Friday, 12 August, 2005 - 09:45
Selects lines matching a regular expression
  • remembers previous values
  • suggested shortcut: CTRL-G (next to CTRL-F "Find")
SelectToMatchingTag.bsh (selectToMatchingTag.bsh v0.2 by Saimon Moore)
Submitted by saimonm on Thursday, 20 January, 2005 - 16:07
Selects all text between the current tag and the matching tag. (This requires the XML plugin.)
In fact code is slightly modified from the xml plugin action xml.XmlActions.matchTag.
So this could just be added to the xml plugin itself.
Select RegExp HyperSearch Matches (Select_HyperSearch_Matches_RegExp.bsh v1.0 by Jakub Holy)
Submitted by malyvelky on Thursday, 7 October, 2004 - 07:41
A Beanshell macro script for the jEdit text editor - selects all matches for the last HyperSearch in the current EditPane. Contrary to the original macro that selects the whole line containing (the start of) a match, this one sets the selection exactly from the beginning of the match to its end thus possibly spanning across multiple lines. Thanks to this it's well suitable for regular expression search.
Find Next Selected (Find_Next_Selected.bsh v1.01 by Dan Ferreira)
Submitted by DanF on Tuesday, 24 August, 2004 - 18:19
Got this idea from UltraEdit32, where I'd often skip the Find dialog by just selecting text and searching for its next occurrence. I never found another editor that provided this simple functionality, and now jEdit can do it with this macro!

If there's no selection, it looks for the next occurrence of your last search (issues a "find-next" action). It's meant to be an improved "find-next", so you can remap your "find-next" shortcut to this macro if you want to.

New in version 1.01:

- Special behavior when regular expressions enabled: if the current selection matches your regexp search string, then it issues a "find-next" action (so it won't disrupt ongoing regexp searches); otherwise, the selected text becomes the new regexp search string; if the new regexp search string is invalid, a regular search is performed (sounds more complicated than it actually is, the point is that now it handles regular expressions nicely :-) )
Ruby auto indent and insert end v0.6 (Ruby_auto_indent_and_insert_end.bsh v0.6 by Robert McKinnon)
Submitted by robmckinnon on Sunday, 22 August, 2004 - 16:12

Designed to be executed each time the enter key is pressed. Auto indents and inserts 'end' after the following: if, for, while, until, unless, def, case, class, module, begin, loop do, x do |y|. Also aligns else and elsif. Designed to work with the auto-indenting defined in Ruby edit mode v0.3.

Use in combination with the Ruby edit mode v0.3 to solve most of your Ruby indenting needs!


  1. Place in directory: [user_home_dir]/.jedit/macros/Ruby
  2. Add the 'ENTER' key shortcut to this macro via:
    • Utilities -> Global Options -> Shortcuts -> Edit Shortcuts: Macros
  3. Install Ruby edit mode v0.3.
Select_HyperSearch_Matches.bsh (modified) (Select_HyperSearch_Matches.bsh v1.01 by Ollie Rutherfurd (modified by Saturn))
Submitted by fixedsys on Wednesday, 11 August, 2004 - 06:48
selects all matches for the last HyperSearch in the current EditPane
Clear Hypersearch Results Macro (Clear_HyperSearch_Results.bsh v1.0 by Lee Turner)
Submitted by lturner on Friday, 16 July, 2004 - 10:19
Beanshell macro to clear all the hypersearch results from the hypersearch window.
minor updates for VOGen macro (VOGen.bsh v1.1 by Jia Zhiming)
Submitted by jiazhimi on Tuesday, 27 April, 2004 - 03:57
Some minor changes to VOGen macro, changes include:
1. removed java edit mode checking, now a new buffer can perform VOGen before saving.
2. added in check to verify the buffer contains matching brackets, if no matching bracket alert the user, instead of fialed to generate content and leave user in the lurch.
3. added in version number in comments
The macro support incremental VO generation. Means if you added in some new variables into existing generated java file, the macro will only generate get and set methods for newly added variables.
The macro retains the original format.
List_Dirty_Buffers.bsh v1.0 by Lee Turner
Submitted by lturner on Wednesday, 14 April, 2004 - 08:16
Beanshell macro to provide a simple message box telling you whether there are any dirty buffers. If all buffers are saved, a message will appear telling you there are no dirty buffers, otherwise a message will appear listing all the buffers that are dirty. This is useful if you like all available screen space to develop (no toolbars, no no docked plugins visable etc).
Insert_File.bsh v1.0 by Ollie Rutherfurd
Submitted by orutherfurd on Wednesday, 31 March, 2004 - 18:44
Prompts user to select a file then replaces the current selection with the contents of the selected file.
Toggle Word Wrap (Toggle Word Wrap.bsh v1.0 by Lee Turner)
Submitted by lturner on Thursday, 26 February, 2004 - 09:44
Beanshell macro to toggle word wrap for the current buffer in the order of none, hard, soft.
Search Ruby documentation v0.2 (Search_Ruby_documentation.bsh v0.2 by Rob McKinnon)
Submitted by robmckinnon on Wednesday, 25 February, 2004 - 06:42

Allows user to search Ruby documentation using ri (Ruby interactive reference). I map this to: ctrl+r ctrl+i

  • Brings up dialog for user to enter search term.
  • Macro runs ri on term, and reports ri results in another dialog.
  • Remembers last term searched, and places it in search entry field.
  • If user has selected text, then that is placed in search entry field instead.

New in 0.2: lengthly results placed in scroll pane; handle error that occurs when results overflow native system's std out buffer.

See other ideas for Ruby editing macros.

Go to Ruby method v0.5 (Go_to_Ruby_method.bsh v0.5 by Rob McKinnon)
Submitted by robmckinnon on Monday, 23 February, 2004 - 05:35

Brings up a popup menu of Ruby methods that are in the current buffer grouped by class and ordered alphabeticaly. Selecting a class or method from the menu places the caret at that member's location in the file.

New in v0.5:

  • Submenus show if there are multiple classes in file.
  • Show wait cursor while popup is being generated.
  • Fixed bug that occurred when "class" or "def" are preceded by non-white text.
Unicode Escape (Unicode_Escape.bsh v1.0 by Robert Fletcher)
Submitted by rfletch6 on Tuesday, 16 December, 2003 - 10:41
Converts all selected characters to Java-style unicode escapes (e.g. \u0000) unless the selection is a sequence of unicode escapes in which case they are converted back to characters.
User login
Browse archives
« February 2018  
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
Yes, I'd like to have translations
No, that'd be bad (please comment)
Total votes: 1092
file   ver   dls
German Localization light   51056
Context Free Art (*.cfdg)   0.31   41260
JBuilder scheme   .001   17053
BBEdit scheme   1.0   16658
ColdFusion scheme   1.0   16636
R Edit Mode - extensive version   0.1   14919
Advanced HTML edit mode   1.0   14092
Matlab Edit Mode   1.0   14038
jEdit XP icons   1.0   13463
XP icons for jEdit   1.1   12487