I have been looking for a decent free text editor, similar to Ultra Edit. I like jEdit a lot but there is one feature I am missing. In Ultra Edit, I can record a macro that edits a given line and then replay that macro so that it runs until the cursor reaches the end of the file. Is there a way to do this in jEdit?


  • I'm amazed to find out there is no simple answer to this as off today! I couldn't find any. Best thing, as I see it, is going with AHK. – cregox Mar 6 '14 at 16:53

As mentioned by AhLeung already, the Action Bar will allow you to specify the number of times to repeat a task. I frequently do something similar to this -

Record a temporary macro: C+m C+m, perform task, C+m C+s

Run the macro 200 times: C+Enter (opens action bar at bottom of window), type 200, then C+m C+p

Simplest example, write "x" 300 times: C+Enter, 300x

| improve this answer | |

jEdit supports recording and playing back macros; both temporary and saved. Ctrl+m Ctrl+m starts recording a temporary macro, Ctrl+m Ctrl+s stops recording, and Ctrl+m Ctrl+p plays the macro.

Full documentation is available in chapter 8 of the jEdit users guide.

| improve this answer | |
  • Thanks James. I know how to record macros. I know how to play macros one at a time. However, I occasionally need to perform an action on 10s or 100s of thousands rows and the keystroke method causes flair ups of the old carpel tunnel syndrome. Ultra edit has the ability to run a given macro until the EOF is hit. I'm thinking that I may need to write a macro that will do this but don't want to re-invent the wheel. – wcm Sep 11 '10 at 19:33

You may try the Action Bar for repetition.

| improve this answer | |
  • nope, doesn't work. – cregox Mar 6 '14 at 16:53

Add some code manually. Record one iteration of what should be done and then edit the code and add something like this template:

    String input = Macros.input(view, "Number of repeats?");
int repeat = 0;
if(input != null && input != "") {
    try {
        repeat = Integer.parseInt(input);
    } catch (Exception e) {
        // bad input
for(int count=0; count < repeat; count++) {
    *** insert your recorded macro here ***
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.