jEdit Community - Resources for users of the jEdit Text Editor
Outline_Sort (outline_sort.bsh vV1.01 by Peter Theobald)
Submitted by turtlecove on Tuesday, 22 March, 2011 - 06:19
outline_sort v1.01 peter@TurtleCoveTech.com

Sorts an outline.
Treats the selection or the buffer as an indented outline and sorts based on the leftmost indented "parents", carrying the subtrees with their respective parents.

Skips lines with jEdit auto-settings :setting=value: at the top or bottom of the file.

I keep all of my info in plain text outlines (Org-Mode style) and this allows me to sort my outlines.
Note: I bind this to 'CS+O s' (the two letter code Control-Shift-O s). I plan on writing more Outline macros in the style of Org-Mode and binding them to (refile: CS+O r, sort: CS+O s, capture: CS+O c, SearchToSparseTree: SC+O f, archive: CS+O a, jump: CS+O j, etc)
Handy Tip: hit 'control-e s' to select a tree before sorting to sort just one outline tree instead of the entire buffer.

UpdateIndex (UpdateIndex.bsh vV1.0 by Peter Theobald)
Submitted by turtlecove on Wednesday, 17 November, 2010 - 02:30
Macro for keeping an "index" or "table of contents" at the top or bottom of an outline file. It assumes all non-indented lined are headers with indented content following each header. Also assumes there is a header titled "Index".

UpdateIndex scans the current buffer, makes a list of all the headers, and replaces the section titled "Index" with this list.

For example:

Index
    old items
    no longer present

shopping list
    peaches
    apples

calls to make
    call Larry
    call Moe
    call Curly

After running UpdateIndex macro the file will be:

Index
    shopping list
    calls to make

shopping list
    peaches
    apples

calls to make
    call Larry
    call Moe
    call Curly
It works really well in conjunction with my WikiWord.bsh macro which can turn each header into an active link.
Vim-Style Left and Right (vim-movement.zip v1.0 by Damien Radtke)
Submitted by kog on Monday, 9 November, 2009 - 18:41
These two macros are intended to replace jEdit's default "Go To Next Character" and "Go To Previous Character" actions. When used, pressing left or right will never move the cursor up or down. Normally, if left is pressed at the beginning of a line, the cursor moves up a line, and when pressing right at the end of a line, it goes down one. With these macros, in both cases, the cursor stays where it is.
Drag_Up.bsh v1.1 by Tomek Pęszor
Submitted by takeshin on Monday, 7 July, 2008 - 07:16
Moves current line or selected lines one line up. It is not needed to select lines from the beginning to the end. Just hold shift+up/down arrow to indicate which lines to move, and then, use a keyboard shortcut you have chosen for this macro. Keeps selection. Suggested shortcut: CS+up arrow. Use in conjunction with Drag_Down.bsh macro.
Drag_Down.bsh v1.1 by Tomek Peszor
Submitted by takeshin on Monday, 7 July, 2008 - 07:13
Moves current line or selected lines one line down. It is not needed to select lines from the beginning to the end. Just hold shift+up/down arrow to indicate which lines to move, and then, use a keyboard shortcut you have chosen for this macro. Keeps selection. Suggested shortcut: CS+down arrow. Use in conjunction with Drag_Up.bsh macro.
Remove_blank_lines.bsh v1.0 by Tomek Pęszor
Submitted by takeshin on Friday, 4 July, 2008 - 11:08
This simple macro removes blank lines from the current buffer or selection (lines with spaces or tabs also, not only \n\n). It just uses simple RegEx: ([\t\s]+)?\n+\n?
Enclose pairs (Encloses.zip v0.1 by Alexandre da Silva)
Submitted by simpsomboy on Thursday, 12 June, 2008 - 14:57
Warning! this is a zip file. if you download from Macro Manager Plugin, go to your macro directory, rename the downloaded file (Enclose_pair.bsh) to Enclose_pair.zip and extract it, and delete the Encloe_pair.zip file
Set of simple macros to enclose char pairs such as: [] {} '' "" `` %% <> ()

Features
  • Insert the pair when typing
  • Enclose the selection with pair just by typing it
Each one need to be configured with a shortcut corresponding with pair
unzip file into your $HOME/.jedit/macros directory
Insert simple Date (Insert_simple_Date.bsh v1.0 by Robert Schwenn)
Submitted by Robert Schwenn on Sunday, 1 June, 2008 - 20:37
Inserts current date in simple format "01.06.2008" at caret position.
Remove Trailing WhiteSpaces (remove-trailing-ws.bsh v1.0 by Robert Schwenn)
Submitted by Robert Schwenn on Friday, 2 May, 2008 - 21:34
This macro removes trailing WhiteSpaces of selected lines (as the action with same name does). In contrast, if no selection is present, all lines are processed.
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.
LineFilter (LineFilter.bsh v1.3 by Robert Schwenn)
Submitted by Robert Schwenn on Tuesday, 29 January, 2008 - 21:07
The macro filters lines of a buffer due to a provided regular expression.

The filter actions are: remove in current buffer or write to a new buffer.
The filter is applied on: matching or not matching lines
The filter works on: the whole buffer or the selection (if it spans over mor than one line)

Based on the following macros: Retain_Or_Remove_Lines. by Jia Zhiming, Grep_Buffer.bsh and Reverse_Grep_Buffer.bsh by Robert Fletcher

Block fill with text or numbers (Block_fill.bsh v1.1 by Robert Schwenn)
Submitted by Robert Schwenn on Saturday, 26 January, 2008 - 00:01
Differences to the block-fill feature of TextTools Plugin:

1. No choice to overwrite or not the selection. Instead, the selected text is deleted and the new text is inserted with it's full length.
2. Improved performance on large selections because of:
- Removed support for multiple selections
- Removed support for tab handling

Surround selection with string (Surround.bsh v1)
Submitted by vdichev on Monday, 29 October, 2007 - 11:31

This script is designed to help with inline markup of strings for reStructuredText, AsciiDoc, txt2tags, or other similar Lightweight markup languages. Of course, you can use it on *any* plain text where you want to convey extra meaning to the contents.

Similarly to the XML plugin, it can surround multiple selections with the string requested by the user (by default, an asterisk- "*"). To be accepted as valid markup, though, the string must be at the start or end of the word, so the macro inserts the string at the closest word boundary without shrinking the selection. The selection is preserved, making it easier to apply another markup command afterwards.

Unlike the Add_Prefix_and_Suffix.bsh macro, this one operates on selections, not selected lines.

Snippet chooser / paster (Insert_Snippet.bsh v1.0 by Mike Cline)
Submitted by mikecline on Friday, 27 April, 2007 - 19:25
For pasting snippets of code (or any kind of text, really) into the current buffer.

You store all your snippets as separate text files in the c:\snippets directory (hard-code another location if you like). When you run the macro it pops up a JList selection box where you can choose which snippet to paste.
Remove_Comments.bsh v1.0 by Jakub Roztocil
Submitted by Oswald on Monday, 8 January, 2007 - 15:38
This macros removes all comments from the buffer or from selection(s), if any. Doesn't work with javadoc style comments (nested markup isn't removed).
Sort Lines (editplus style sort) (Sort.bsh v1.1 by Yuan Wang)
Submitted by p8er on Thursday, 11 May, 2006 - 07:35
Sort selected lines or whole buffer (when nothing is selected).
This is just similar to the sort function in Editplus 2.
Features:
  • Order - Either ascending order or descending order.
  • Starting column - Enter a column number from which the sorting operation begins. The text before this column number will be sorted when string after the column is the same. Enter an integer value great than or equals to 1.
  • Case sensitive - The case-sensitive comparison option.
  • Remove duplicates - Remove any duplicated line after the sorting option.
Duplicate Selection/Line macros (Duplicate_Selection_Line.bsh v1.0 by Sergey Kojin)
Submitted by runmen on Thursday, 16 March, 2006 - 17:17
This is modified version of original Duplicate_Line.bsh that allow duplicate not only lines, but also selection, like in IntelliJ IDEA Ctlr+D (duplicate) feature Checked for jEdit 4.3.pre3
Escape Properties (Escape_Properties.bsh v0.2 by Rainiero Rainoldi)
Submitted by rainierito on Friday, 28 October, 2005 - 09:42
This macro converts the selected text into a sequence of escaped chars the same way the method store() of class java.util.Properties would do. It is very useful for writing language properties files from source files originally in other encodings. It escapes also : and \ and all that stuff problematic in a properties file.
Just justify it ! (Justify.bsh v1.0 by Baldurien)
Submitted by Baldurien on Tuesday, 11 October, 2005 - 15:06
This macro will allow you to justify a list of word like The Bat (an email client) does. Also, when you are in a doc block (javadoc, phpdoc or jsdoc, etc) the macros will automaticly add the '*'. When nothing is selected, the macros will take text from the line where the caret is, until an empty line (only space, or only space with '*', or '*/' for docblock). Else it will take the text between the start line and end line of the selection. Note : you may have to customise (edit) the macro to get better result. A quick example [the comment is normally on one line, but it would broke up html presentation]
/** 
   If the selection is set, then we will use it to determine \
   the selected text. Else we will use the {@link Textarea.ge\
   tCaretLine()} method.
 */
Transformate into :
/** 
 * If  the  selection  is  set,  then  we will use it to determine the
 * selected     text.     Else     we     will    use    the    {@link
 * Textarea.getCaretLine()} method.
 */
Upper/Lower/Invert/Capitalize Case Macros WHITHOUT unselecting text (CaseMacros.zip v1.0 by Pascal Dal Farra)
Submitted by pdfneuro on Wednesday, 15 December, 2004 - 17:25
4 separated macro that allows to change word case of selected text WHITHOUT unselecting text:
  • - Upper Case
  • - Lower Case
  • - Invert Case
  • - Capitalize Case
Enjoy :-)
User login
Browse archives
« January 2018  
MoTuWeThFrSaSu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
33%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1092
Syndication
file   ver   dls
German Localization light   4.4.2.1   50949
Context Free Art (*.cfdg)   0.31   41172
JBuilder scheme   .001   17001
BBEdit scheme   1.0   16601
ColdFusion scheme   1.0   16585
R Edit Mode - extensive version   0.1   14868
Advanced HTML edit mode   1.0   14046
Matlab Edit Mode   1.0   13984
jEdit XP icons   1.0   13415
XP icons for jEdit   1.1   12438