Linux – Notepad++ like editor for linux which highlights words on right clicking

linuxnotepadtext-editors

What I'm looking for is the Notepad++ feature where I can highlight words on right clicking and choosing one of the 5 styles (so that all instances of that word get highlighted with that color), in some editor in linux (Red hat). I find that it helps me in understanding new code.

Best Answer

Emacs can do it. Once you've loaded a file, press:

Alt + s then h and finally r

or alternatively if your version of Emacs doesn't recognize the previous shortcut:

Alt + x then type highlight-regexp and press Enter

Emacs will ask you the regexp (a simple word or phrase will work too) to highlight, then it will ask you the color name too, usually starting with hi- e.g. hi-yellow (you can use Tab to complete). That's all.

It may sound complicated but that's Emacs; there are plenty of ways to speed up this process if you want to mess up with it. And I suggest you to do so.

Related Question