views:

831

answers:

11

I am a looking for a good text editor with a simple and powerful macro-recording functionality.

Edit: after trying each and every option suggested below, I am still using Textpad on Windows, and vim on Linux (jEdit was a good contender as a macro-capable texteditor on Linux, but the excessive startup time, due to Java, is a no-go for me). So vim it is! Thanks for all the answers!

+1  A: 

On Windows my reference is Textpad's macro-recording functionality which is simply excellent. But it only works on Windows (and although it is not expensive, it is not free).

On Linux, I have tried running Textpad on wine, but I ran into a lot of bugs.

MiniQuark
hey add these answers in qn itself so that every can see
yesraaj
+1  A: 

On Windows, I have also tried Notepad++ which has good macro-recording.

But it only works on Windows and the macro-recording functionality has a few bugs (that I have reported to the author), including the fact that recording Cut&Paste and recording search&replace does not always work as you would expect (or at all).

On Linux, I have not tried to run Notepad++ on wine. It might work, but still macro-recording functionality is sub-optimal so far (I hope the bugs will be fixed soon).

MiniQuark
+1  A: 

On Linux (I use Debian Lenny on KDE), I use vim or GVim which have an excellent macro-recording functionality : in command mode, simply type qx (x being any letter), record anything, then in command mode type q to stop recording, and later type @x to replay the macro.

Unfortunately, although I tried very hard, I sill cannot get used to vim: I only use it when I need to run some macro... and that's not very convenient!

MiniQuark
+5  A: 

Wikipedia has a comparison of text editors. The table in the extra features section will allow you to group them by macro support.

xsl
Thanks xsl!I just checked out that page and added an answer to my question with the full list of open source and cross-platform text editors capable of recording and playing-back macros.I think I'll give each of them a try!:-)
MiniQuark
A: 

I've found nedit to be good for this for Linux/X11. Can run under cygwin too. Very powerful (if somewhat dated looking) text editor. Also includes syntax highlighting for a variety of languages.

Rob

RobS
+1  A: 

Sorry if this is just the answer that You do not want to hear, but taking the time to learn vim is quite a good investment. (Especially for a programmer.) Its macro recording is quite good, btw. Simply type qq in command mode to start recording, then do whatever You want and stop the recording by pressing q again in the command mode. Run the macro by @q.

zoul
Yes, I have tried vim... a lot. But I just cannot get used to that modal editing. But granted, the macro recording is excellent.BTW you can type qx instead of qq, x being any letter. This may be useful especially when you want a macro to call another macro.
MiniQuark
+2  A: 

My vote is for Emacs. It does macros very well. (As well as lots of other stuff, of course!) Granted, like Vim, it requires an investment. But you may find that you simply don't prefer Vim's modal editing (like me).

J Cooper
A: 

I always have used Notepad++ for everything (on Windows)

Ctrl-Shift-R Start to record /Stop recording the macro

Ctrl-Shift-P Play recorded macro

adam
+1  A: 

My favourite text editor is UltraEdit. Very powerful, and not very expensive at just below $50.

Ola Eldøy
I switched to notepad++ years ago. What does UE offer over NPP?
borisCallens
+2  A: 

According to the Wikipedia's comparison of text editors page (thanks to xsl), here is the list of cross-platform, open source text editors with the ability to record and execute macros :

The following text editors are also open source and support macro record/playback, but they are limited to one platform only:

  • Aquamacs (Emacs for MacOS) : MacOS
  • Crimson Editor : Windows
  • Notepad++ : Windows
  • SciTE : cross-platform, but macro-recording seems to require an extension (Filerx) which is only available on Windows. Some hacks exist to make macros available without Filerx, but they seem to involve recompiling the source... power users only.

A bunch of other text editors also support macros, but they are proprietary and/or they do not support macro recording (you have to write your own macro script in some scripting language). Here's an overview, but check out the Wikipedia page for the full list:

  • AcroEdit
  • Alphatk
  • BBEdit
  • ConTEXT
  • Crystal C/C++
  • Editeur
  • EditPlus
  • EmEditor
  • gedit
  • NoteTab
  • Programmer's Notepad
  • PSPad
  • RJ TextEd
  • SemWare Editor
  • SlickEdit
  • TextMate
  • TextPad
  • TextWrangler
  • UltraEdit
  • VEDIT
  • Zeus for Windows
MiniQuark
A: 

The Zeus for Windows IDE is fully scriptable in a hand full of languages. It has out of the box support for the JavaScript, Lua, Python, TCL and VBScript languages.

It can also be configured to use other WSH based scripting languages like DMDScript or RubyScript.

they do not support macro recording (you have to write your own macro script in some scripting language).

In Zeus you have the choice. You can write the macros by hand or you can also let Zeus write them for you.

To have Zeus write the macros you just need to tell it which scripting language it should use to write the macro (i.e. once off configuration).

Then to record a macro you just use the start/stop recording menu options or the alternative keyboard shortcuts and Zeus will write the macro based on your actions using the language you selected.

For example assume the Lua language has been selected and the user records the action of opening a new file window and typing in some Hello world... text.

This is the Lua macro script that Zeus will create:

function key_macro()
    screen_update_disable()
    FileNew()
    print("Hello world...")
    screen_update_enable()
    screen_update()
end

key_macro() -- run the macro

With the TCL language selected the same user actions will result in Zeus creating this TCL macro instead:

proc key_macro {} {
    zeus screen_update_disable  
    zeus FileNew  
    puts -nonewline "Hello world..."
    zeus screen_update_enable  
    zeus screen_update  
}

key_macro;  # run the macro

These macros can then be saved to disk, edited by hand, bound to the keyboard, bound to menu etc. etc.

jussij