2

I am looking for a text editor for linux (I am using Ubuntu 22.04.1 LTS) that is able to save, let me edit and choose among a list of search and replace list. I have looked around and cannot find what I am looking for.

I am currently using a combination of Altsearch and replace, an extension of Libreoffice, plus the search and replace window of Libreoffice because not all expressions work in the above extension (which allows to use a list of searches though). This is one reason why I am looking for a text editor.

Another one is that the books and articles initially edited in Libreoffice are finally made into md and latex documents.

I am familiar with BBedit which would be perfect, but it is only for Mac.

So, I would like to be able to use a text editor that:

Has a GUI interface and allows

  • using regex
  • storing a list of search and replace expressions with titles
  • editing this list easily selecting which search and replace expression is used at a given time
  • searching and replacing in multiple files (this would be a plus)
  • Is multiplatform (Mac, Windows, Linux)
  • Is free and opensource (although if a good paid editor exists, I am open to it)

I hope that somebody can help.

1
  • And did you checked atom or does it not fit your needs?
    – Z0OM
    Aug 28, 2022 at 17:57

2 Answers 2

1

I've been using VSCode on Windows for a while now for my text editing needs. They apparently have Linux & Macintosh versions as well. It supports find-replace across open files, with regular-expressions even. It is free on all platforms, but only kindof-sortof-notreally open source. It also has a wide range of plugins & extensions which you can apply to your specific development scenario, and syntax highlighting for many text-formats (json, xml, C++, python, etc).

This plugin looks like it adds the capability to do what you are asking: https://marketplace.visualstudio.com/items?itemName=bhughes339.replacerules

4
  • Thanks @GarThor, VSCode looks good, but I was not able to find an extension that stores multiple regex and allows their use selectively.
    – Earendil
    Sep 11, 2022 at 7:35
  • Ah, I must have missed the requirement where you need to store the regex. I'm not sure I know of an editor which lets you do that. I think some regex testers online will let you do that though? Maybe store the regex in a plain text/csv/xls file along with notes, and copy-paste them when you need them? It does have the capability to let you write scripts for common tasks as well. That might be a good option?
    – GarThor
    Sep 12, 2022 at 19:12
  • Hi @GarThor, although I cannot rule out the solution you propose, having to use dozens of regex to clean up texts, I still think that the storage function is a must for me. Presently I am still using LO and AltSearch extension which is multiplatform and albeit not suitable for text editing, it can be used for that too and stores the regex. Thanks anyway.
    – Earendil
    Sep 15, 2022 at 7:52
  • I was going to suggest attempting to define a custom task for the thing you are trying to do, but I found this extension which already does what you want, and seems pretty easy to configure. marketplace.visualstudio.com/… According to the documentation it was inspired by the sublime text plugin RegReplace, so if you like sublime that might be a better option.
    – GarThor
    Sep 16, 2022 at 18:04
0

Check for atom editor, a lot of addons https://atom.io and you can write your on adds and scripts, it's a hackable editorand it is free and open source.

If you can't install over the standard or non free packages, try to install over snap.

Use it on OS X, Windows, or Linux.

Check this for ubuntu install:

How to Install Atom Text Editor on Ubuntu 20.04

Search and Replace with RegEx components in Atom editor

1
  • Thanks @Blockchain Office, I could install Atom, but the only package that approximates what I am looking for (github.com/pgilfernandez/multiple-find-replace) does not work as I need it to unfortunately, and writing my own adds and scripts is beyond my capacities, but thanks for the trouble!
    – Earendil
    Aug 29, 2022 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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