0

I am looking for a simple Text Editor on Linux (Arch, preferrably) with conditional formatting. I have noted this question.

I am not looking for a syntax highlighter. I need conditional formatting, where i can :

  • Create a list of words, which will be autoformatted if encountered in text. e.g. : I should be able to specify : Word : EXAMPLEWORD and Format : Red, Bold. (The exact method of the specification does not matter. Perhaps an XML file, perhaps through a GUI ...) Then , if I write :
    AKAKAKedhsdlsjfdssj ExAmPleWoRd (NOTE : that case should not matter) - Then, the word ExAmPleWoRd should automatically be made Red, and bold.
  • I would be able to highlight matching parentheses and brackets and braces, as I choose. That is, if I specify {} and [] then, it would highlight matching {} and [], but not <>. If at a later point, I add <> , then it should highlight that too.

Is there something like that out there? Thank you.

3
  • You didn't rule out anything, and since you are on Linux, the choices are either vi based or emacs based (With the new contender being vscode). Don't know if I have an answer, but check this vim solution: vim.fandom.com/wiki/Highlight_multiple_words
    – Lockszmith
    Sep 6, 2021 at 21:25
  • Also check out spacemacs it has sooo many layers available, I'm pretty sure it might be able to do what you want. But - not really a 'simple Text Editor'
    – Lockszmith
    Sep 6, 2021 at 21:26
  • Notepad++ let's you define syntax for new languages. technipages.com/…
    – Syed
    Sep 11, 2021 at 8:27

1 Answer 1

1

The CudaText (free editor) can help with this, but not solve this out of the box.

  • For item 1, you must write a plugin in python, it must handle on_change event and highlight all needed words in text using ed.attr() API. Plugin may get its words how you will like it.
  • For item 2, CudaText supports this already. It has the option bracket_highlight for pair brackets highlighting, for any of them.

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.