views:

70

answers:

5

My question is similar to this one: http://stackoverflow.com/questions/385661/emacs-highlight-all-occurences-of-a-word

In Notepad++ editor, there's a convenient feature: if you select a word in your text (not necessarily a keyword), the word is highlighted throughout the text. Is there any similar way in a lightweight editor for Mac? I've tried Textwrangler and jedit, but they don't seem to have this very useful feature.

Thanks

A: 

The only Mac text editor I know of that does this is Xcode, but I wouldn't exactly describe this as "lightweight".

Paul R
Eclipse will do it to assuming the word is a var/method/class.
prodigitalson
A: 

You could to this in TextMate - not out of the box - but you could implement it fairly easily with whatever scripting language youre good with (ruby is whats normally used). There might even already be a plugin/bundle in the repository.

prodigitalson
A: 

I'm not sure how willing you are, but you can look into writing a highlight plug-in for textWrangler. I think you'll need the BBE-sdk. Here's their blurb on developing plugins: http://www.barebones.com/support/develop/

dassouki
A: 

vim, running in a Terminal is very lightweight and will do this.

vim file.txt
:set hlsearch
/word

If you only like GUI apps there is MacVim out there for downloading.

Zan Lynx
A: 

Thanks for all the tips. I've tried out the various alternatives and ended up finding that jEdit has a good plugin for this feature: The "Highlight (Buffer scope)" option in the "Highlight" plugi

annahen14