Seeking an Apple-scriptable replacement to Tex-Edit Plus

The ancient Text-Edit Plus (no longer compatible with modern MacOS) was a relatively easy text editor to automate with AppleScript, with loads of support scripts available courtesy of the late Douglas Adams. I long for another scriptable text editor suitable for someone (me) who is pretty clueless at scripting and who is bound to need help once I have such a text editor. I need one where I can script text manipulation — mainly taking info from HTML tables and converting it into normal text. It would be able to remove dates and format a very few words bold-face, ideally being able to add color to some, and would have line-breaks at predictable points. Understandable wild cards would be great.
BB-Edit looks powerful but difficult to this scripting idiot ($ signs that mean something other than $ signs, serious-looking UI, etc.). I believe Jedit is scriptable, as are KotEditor and Text-Edit but I’m not sure about online support for them.
Any thoughts would be much appreciated!

BBEdit is very scriptable and seems to be the only app these days (at least among those I’ve used) which is recordable. Using it to search and replace text becomes really easy once you get the hang of it as you can record a regular expression search and it will generate the correct applescript syntax.

It was this functionality that finally got me to try and create my own applescripts rather than just copy them. I couldn’t get omnioutliner to deal with inconsistent html so I ended up using bbedit, first to manually run regex searches on text and then to script them. I would use it to clean up and rearrange lists I’d copied from wikipedia (for example) and then deposit the resulting text in omnioutliner (where, over time, I learned how to automatically format the text). I used bbedit for the regex stuff because it came with a great and coherent guide on regular expressions and its search dialogue is easy to use. Eventually I learned how to do all of the work in omnioutliner.

FWIW, BBEdit’s UI is also pretty flexible and you can hide a lot of the advanced stuff. And of course, it has a free version that is really good. For myself, eventually I bought the app :slight_smile:

The challenge for you though is that bbedit is a plain text editor, unlike Text-Edit Plus —which works with rich text— so no bold text and no coloured text.

If you learn a few things in applescript, like how to find dates in a text and remove them, then you could likely just go with textedit.

Thanks for your thoughtful reply, Mockman. From what you tell me, I could do most manipulation in BBEdit and then hand the result on the TextEdit (the intended destination) for formatting. I must say I did seek help with BBEdit on some site and found the well-intended help so far beyond me it was like trying to understand ancient Greek. Others have suggested avoiding scripting in TextEdit, not sure why but possibly it’s considered too basic (but not Basic😉). I’ll poke around in both of them.

I use CotEditor. It is free and scriptable.

1 Like

You could do most manipulation within textedit and complex (or all) manipulation in bbedit. That said, it’s all speculation as only you know what kind of tasks you have in mind.

Consider posting a specific question and see what kind of responses it garners.

1 Like

Thanks Piyomaru and Mockman for your thoughts. I shall indeed, as Mockman suggests, post details soon about what I’m after. I’m hoping there’s a way to post attachments although I don’t see one.