Below are macros I've written for jEdit.
I prefer to write macros in Python, using the JythonInterpreter Plugin, but during the development of jEdit 4.2, I re-wrote many of them in Beanshell so they could be included with jEdit. I almost always run the development version of jEdit built from CVS, so the macros may not always work with older version, but I make an effort to keep them compatible.
Please drop me a line if you have questions or run into problems.
For all Jython macros you will need to have JythonInterpreter installed.
a BeanShell macro for jEdit which copies either the selected text, or the current line if no text is selected, to the clipboard.
[download] (updated 2003-11-19)
A Jython macro for jEdit that is an enhanced version of the built-in copy action. If no text is selection the current line is copied to the clipboard, otherwise the default copy behavior is used.
[download] (updated 2003-07-23)
a BeanShell macro for jEdit which cuts either the selected text, or the current line if no text is selected, to the clipboard.
[download] (updated 2003-11-19)
A Jython macro for jEdit that is an enhanced version of the built-in cut action. If no text is selected then the current line is cut to the clipboard, otherwise the default cut behavior is used.
[download] (updated 2003-07-23)
A Jython macro for jEdit that implements Emacs-like scrolling. If the cursor is at the bottom of the text area (or electric-scroll boundary), instead of just moving to the next line, the text area will first be scrolled so the cursor is in the middle of the screen. This may be used as a replacement for the built-in 'Go To Next Line' command.
[download] (updated 2003-03-25)
A Jython macro for jEdit that implements Emacs-like scrolling. If the cursor is at the top of the text area (or electric-scroll boundary), instead of just moving to the prev line, the text area will first be scrolled so the cursor is in the middle of the screen. This may be used as a replacement for the built-in 'Go To Previous Line' command.
[download] (updated 2003-03-25)
A Jython Macro for jEdit that will backspace to the previous tab column when using soft tabs. For example, If you are on column 6 and have tabs size set to 4 if you invoke this macro, it will backspace to column 4 (assuming 5 and 6 are both space characters). This macro can be used as a replacement for the built-in Delete Previous Character action, however you might want to bind another key combination to Delete Previous Character, such as CS+BACKSPACE for times when you do actually want to delete a single whitespace character. This macro will behave the same as Delete Previous Character when not using soft tabs or when any text is selected.
[download] (updated 2003-03-25)
Deletes until non-whitespace character is at the caret or the caret is at the end of the buffer.
[download] (updated 2003-11-19)
A Jython macro for jEdit which is similar to Vim's O command. It inserts a new line above the current one, moves the caret to the new line, and indents if appropriate.
[download] (updated 2003-11-03)
a Jython macro for jEdit that creates a blog entry for my blog and regenerates the affected pages. This is very specific to my machine, blog, and configuration -- so it's not likely to be of use w/o modifications.
[download] (updated 2003-11-20)
Inserts a closing tag for the last un-closed element. This macro assumes it's bound to "/", so will always insert a "/". It's intentionally naive -- it simply scans backwards in the buffer, ignoring self-closing elements and closes the last open one. This makes it useful for HTML/XML in Javadocs, strings, comments, etc... where the XML plugin's tag insertion won't work.
[download] (updated 2005-04-14)
Inserts a closing tag for the last un-closed element. This macro assumes it's bound to "/", so will always insert a "/". It's intentionally naive -- it simply scans backwards in the buffer, ignoring self-closing elements and closes the last open one. This makes it useful for HTML/XML in Javadocs, strings, comments, etc... where the XML plugin's tag insertion won't work.
[download] (updated 2005-04-14)
a Beanshell macro for jEdit that starts a new line continuing any recognized sequence that started the previous. For example, if the previous line beings with "1." the next will be prefixed with "2.". It supports alpha lists (a., b., etc...), bullet lists (+, =, , etc..), comments, Javadocs, Java import statements, e-mail replies (>, |, :), and is easy to extend with new sequence types. Suggested shortcut for this macro is S+ENTER (SHIFT+ENTER).
[download] (updated 2005-04-14)
A Jython macro for jEdit that decodes a buffer, or selections in a buffer, enocded in base64..
[download] (updated 2003-03-25)
A Jython macro for jEdit that decodes the buffer in the current textArea from Quoted Printable to plain text.
[download] (updated 2003-03-25)
A Jython macro for jEdit that unescapes the selected text, if any text is selected, or the entire buffer, if no text is selected, using urllib.unquote_plus(). Characters sequences of %xx are replaced with their singled character equivlents.
[download] (updated 2003-03-25)
A Jython macro for jEdit that escapes the selected text, if any text is selected, or the entire buffer, if no text is selected, using urllib.quote_plus(). Special characters are replaced with their %xx equivlents.
[download] (updated 2003-03-25)
a BeanShell macro script for the jEdit text editor - Allows user to easily compare backup version of the current buffer, using the JDiff plugin.
[download] (updated 2003-11-19)
A Jython macro for jEdit that deletes the current file, but doesn't not close the current buffer.
[download] (updated 2003-04-14)
A Jython macro for jEdit for comparing backups of buffers using the JDiffPlugin.
[download] (updated 2003-03-25)
A Jython macro for jEdit that let's one search a directory tree for files using Unix shell-style wildcards. If only one file is found it is opened, if multiple files are found then a dialog is displayed so the user can pick which file(s) to open.
[download] (updated 2003-03-25)
A Jython macro for jEdit that displays the current buffer as a Hex Dump, using the Hex Plugin.
[download] (updated 2003-03-25)
A Jython macro for jEdit for browsing and opening backups of open buffers.
[download] (updated 2003-06-04)
A Jython macro for jEdit that opens the current buffer in the default Web Browser for your system. Requires Python.
[download] (updated 2003-03-25)
a BeanShell macro for jEdit that toggles a local file's read-only flag.
[download] (updated 2003-11-19)
A Jython macro for jEdit that toggles a file's read-only flag. Works on Windows and Linux.
[download] (updated 2003-04-14)
a BeanShell macro for the jEdit text editor - Decreases editor & gutter font size by 1.
[download] (updated 2003-11-20)
a BeanShell macro for the jEdit text editor - Increases editor & gutter font size by 1.
[download] (updated 2003-11-20)
a BeanShell macro for the jEdit text editor - Expands or collapses the bottom docking area, depending on it's current state.
[download] (updated 2003-11-19)
a BeanShell macro for the jEdit text editor - Expands or collapses the left docking area, depending on it's current state.
[download] (updated 2003-11-19)
a BeanShell macro for the jEdit text editor - Expands or collapses the tight docking area, depending on it's current state.
[download] (updated 2003-11-19)
a BeanShell macro for the jEdit text editor - Expands or collapses the top docking area, depending on it's current state.
[download] (updated 2003-11-19)
A Jython macro for jEdit which increases the font size used in the textarea.
[download] (updated 2003-11-20)
A Jython macro for jEdit which decreases the font size used in the textarea.
[download] (updated 2003-11-20)
A Jython macro for jEdit that creates getters and setters for Java class members. This macro reads the current source file, and tries to pick out member declarations. It displays these in a table and you can pick which get/set methods you would like created.
[download] (updated 2003-07-23)
A Jython macro for jEdit that closes all open and non-dirty buffers that aren't existing files. This is useful for situations where one deletes or moves a directory containing a number of files open in jEdit.
[download] (updated 2003-03-25)
A Jython macro for jEdit that copies the name of the current buffer to the clipboard.
[download] (updated 2003-03-25)
A Jython macro for jEdit that copies the path of the current buffer to the clipboard.
[download] (updated 2003-03-25)
A Jython macro for jEdit that copies all non-folded lines to the clipboard.
[download] (updated 2003-03-25)
A Jython macro for jEdit that closes all buffers matching a filename glob pattern.
[download] (updated 2003-04-01)
A Jython macro for jEdit that switches the buffer in the current text area to the next dirty one.
[download] (updated 2003-03-25)
A Jython macro for jEdit that reloads all buffers that are 'clean' and whose file last modification time is newer than the last last modification time in jEdit.
[download] (updated 2003-03-25)
a Beanshell macro for jEdit text that writes HyperSearch results matches to a new buffer in the format:
[download] (updated 2003-11-19)
A Beanshell macro script for the jEdit text editor - selects all matches for the last HyperSearch in the current EditPane.
[download] (updated 2003-11-19)
A Jython macro for jEdit that selects all lines in the current buffer which contain matches from the most recent HyperSearch.
[download] (updated 2003-04-03)
A Jython macro for jEdit which writes the results of the most recent HyperSearch to a new buffer formatted as grep-like output: buffer :line: text.
[download] (updated 2003-04-03)
A Jython macro for jEdit that centers the text of the current line by padding the left with whitespace.
[download] (updated 2003-03-25)
A Jython macro for jEdit that removes all empty lines from the current buffer.
[download] (updated 2003-03-25)
a BeanShell macro for the jEdit text editor - Prompts the user for a column position on the current line, then moves the caret there.
[download] (updated 2003-11-19)
A Jython macro for jEdit which allows the user to move the caret to a specified column on the current line.
[download] (updated 2003-11-03)
A Jython macro for jEdit that puts quotes around the currently selected text, or if there is no selection, the current word.
[download] (updated 2003-03-25)
a BeanShell macro script for reversing the order of lines in a buffer. If there are selections, the lines in the selections will be reversed, otherwise the whole buffer will be reversed. NOTE: Lines are not sorted or reverse sorted, simply reversed.
[download] (updated 2003-11-19)
A Jython macro for jEdit that reverses the order of lines in the current buffer. If any lines are selected the lines within the selections are reversed, otherwise all lines are reversed. Note: this macro doesn't to work with rectangular selections.
[download] (updated 2003-03-25)
A Jython macro for jEdit that removes every second line, if they are all blank. Essentially, it takes a double-spaced buffer and converts it to single spacing.
[download] (updated 2003-03-25)
A Jython macro for jEdit that swaps the case of selected text, or the entire buffer if no text is selected.
[download] (updated 2003-03-25)
A Jython macro for jEdit that changes the case of selected text, or the entire buffer if no text is selected to "Title Case". For example, "one day" would become "One Day".
[download] (updated 2003-03-25)
A Jython macro for jEdit that underlines the current line using a character given by the user.
[download] (updated 2003-03-25)
a BeanShell macro script for displaying and switching between open buffers.
[download] (updated 2003-11-20)
A Jython macro for jEdit that allows one to switch between or close open buffers without having to use the mouse.
[download] (updated 2002/11/27)
a Beanshell macro for the jEdit text editor that provides a gui for inserting Buffer Local properties for the current buffer into the current buffer. If the buffer's mode as a line comment defined, or comment start and end properties then the inserted properties will be commented out.
[download] (updated 2003-11-20)
A Jython macro for jEdit for inserting 'Buffer Local Properties' into the current buffer. It will remember which properties were inserted for each mode the last time it was used.
[download] (updated 2003-11-03)
A Jython macro for jEdit that inserts the output of a process into the current Buffer.
[download] (updated 2003-03-25)
A Jython macro for jEdit that prints a mapping of action names to shortcut bindings.
[download] (updated 2003-11-03)
a BeanShell macro for viewing and moving the cursor to markers in a buffer.
[download] (updated 2003-11-20)
A Jython macro for jEdit which displays a list of recently used files, allowing one to quickly open a recently used file.
[download] (updated 2003-04-09)
a Beanshell macro for the jEdit text editor which reloads a plugin. When the dialog is opened, the last reloaded plugin is selected. This plugin is useful when developing a plugin as it allows you to quickly reload a new version. Note that only plugins using the new plugin API will be displayed.
[download] (updated 2003-11-19)
[download] (updated 2003-11-20)
A Jython Macro for jEdit that submits a 'download' to community.jedit.org.
[download] (updated 2003-03-25)
A Jython macro for jEdit that writes shortcuts for jEdit's actions to a new buffer.
[download] (updated 2003-11-03)