[ TextTools ]

by mike dillon <mdillon@jedit.org>

The TextTools plugin provides a set of plugin actions for manipulating text in a buffer.

TextTools actions

Sort by mike dillon <mdillon@jedit.org>

This action sorts all selected lines in lexicographic order. If no text is selected, it sorts the entire buffer. If the selection begins or ends in the middle of a line, the entire line is sorted.

Since 1.10:

If the selection is rectangular, only the selection will be evaluated for lexicographic sorting. The entire lines are sorted.

Reverse Sort by mike dillon <mdillon@jedit.org>

Same as Sort, except the sorted lines are inserted in reverse order.

Advanced Sort by Carmine Lucarelli <carmine@jedit.org>, extended by Rudi Widmann <rudi.widmann@web.de>

Same as Sort, but with advanced options.

You enter the options in a dialog where you can specify which fields to use and how those fields should be sorted.

A field is specified by its left / right column.

Note: In case of rectangular selection, the left / right columns are preset in the dialog

Important: If you press ok, the last entered field is not registered in the table.
Therefore, press always TAB after the last cell you edit, or else your change will be ignored

Globally you can specify

For each of the fields you create, you can specify:

Delete Duplicated by Rudi Widmann <rudi.widmann@web.de>

Deletes duplicated lines, without sorting them. If no text is selected, it compares all lines of the buffer. If the selection begins or ends in the middle of a line, the entire line is compared.

If the selection is rectangular, only the selection will be evaluated for comparision. The entire lines are deleted if the line parts of the selection are duplicated.

Shuffle Lines by Carmine Lucarelli <carmine@jedit.org>

Randomize the data, in effect 'unsorting' it.

Transpose Characters by mike dillon <mdillon@jedit.org>

Transposes the characters on either side of the cursor. At the either end of a line, it transposes the two characters nearest the cursor.

Transpose Lines by mike dillon <mdillon@jedit.org>

Transposes the current line with the preceding line. If there is no preceding line, the current line is transposed with the following line.

Transpose Words by mike dillon <mdillon@jedit.org>

Transposes the nearest word to the cursor (which i'll call the "pivot" word) with one of the adjacent words. If there is a word before the pivot, the pivot will be transposed with that word; otherwise, it will be transposed with the following word. The intervening non-word sequence is left between the transposed words. All letters and digits, in addition to any character in the "noWordSep" Buffer property (which is typically defined by the Buffer's current mode), are considered word characters. All other characters are not. If a transposition takes place, the cursor is placed after the transposed sequence.

Column Insert by Nathan Tenney <eulernt@yahoo.com>

Inserts text in place of a rectangular selection. When invoked, a small dialog pops up for user input. When enter is pressed, the text is placed on each line of the selection, replacing any text selected.

Block Fill / Insert by Rudi Widmann <rudi.widmann@web.de>

Inserts text in a rectangular selection. When invoked, a dialog pops up, with following options:

If you select "overwrite" , the tool overwrites exactly the rectangular selection. This means:

If you don't select "overwrite", the tool inserts the entered text at the left side of the rectangular selection. The length of the original selection is ignored.

Note: If the (rectangular !) selection selects only one line, the selected columns are filled till end-of-file, extremly useful for numbering.

Move Rectangular Selection by Rudi Widmann <rudi.widmann@web.de>

Moves the selected text in all directions

Actions:

Supports multi selection

Toggle Line Comment by Robert Fletcher <rfletch6@yahoo.co.uk>

Comments or uncomments a single line or a selected group of lines. Options govern the positioning of the comment symbol and the handling of already commented lines in a selection.

Supports all edit modes with defined line comment symbols and works with embedded modes such as JavaScript within HTML.

Toggle Range Comment by Robert Fletcher <rfletch6@yahoo.co.uk>

Toggles the state of range comments in the selection. Any text currently commented out will become uncommented and vice-versa. If there is no selection the command acts on the entire line at the caret position.

Supports all edit modes with defined range comment symbols and works with embedded modes such as JavaScript within HTML.