These macros automate various text editing tasks.
Copy_Selection_or_Line.bsh
If no text is selected, the current line is copied to the clipboard, otherwise the selected text is copied to the clipboard. Some editors have this has the default copy behavior. To achieve the same effect in jEdit, bind this macro to C+c in the Shortcuts pane of the Utilities>Global Options dialog box.
Copy_Visible_Lines.bsh
Copies the visible lines from the current buffer to the Clipboard. Lines that are not visible becuase they are folded are not copied.
Cut_Selection_or_Line.bsh
If no text is selected, the current line is cut to the clipboard, otherwise the selected text is cut to the clipboard. Some editors have this has the default cut behavior. To achieve the same effect in jEdit, bind this macro to C+x in the Shortcuts pane of the Utilities>Global Options dialog box.
Emacs_Next_Line.bsh
Moves the cursor to the next line, centering the current line in the middle of the text area if the cursor is at the bottom of the text area.
Emacs_Previous_Line.bsh
Moves the cursor to the previous line, centering the current line in the middle of the text area if the cursor is at the top of the text area.
Go_to_Column.bsh
Prompts the user for a column position on the current line, then moves the caret there.
Greedy_Backspace.bsh
If buffer is using soft tabs, this macro will backspace to the previous tab stop, if all characters between the caret and the tab stop are spaces. In all other cases a single character is removed.
Greedy_Delete.bsh
If a buffer is using soft tabs, this macro will delete tabSize number of spaces, if all the characters between the caret and the next tab stop are spaces. In all other cases a single character is deleted.
Greedy_Left.bsh
If a buffer is using soft tabs, this macro will move the caret tabSize spaces to the left, if all the characters between the caret and the previous tab stop are all spaces. In all other cases, the caret is moved a single character to the left.
Greedy_Right.bsh
If a buffer is using soft tabs, this macro will move the caret tabSize spaces to the right, if all the characters between the caret and the next tab stop are all spaces. In all other cases, the caret is moved a single character to the right.
Keywords_to_Upper_Case.bsh
Converts all keywords in the current buffer to upper case.
Mode_Switcher.bsh
Displays a modal dialog with the current buffer's mode in a text field, allowing one to change the mode by typing in its name.
ENTER selects the current mode; if the text is not a valid mode, the dialog still dismisses, but a warning is logged to the activity log. ESACPE closes the dialog with no further action. TAB attempts to auto-complete the mode name. Pressing TAB repeatedly cycles through the possible completions. SHIFT-TAB cycles through the completions in reverse.