On Windows, I use Notepad++ which has the great feature of when I select a word, all instances of that word are also highlighted in the same document. I have found it very helpful for finding patterns in giant log files.

I am wondering if there is a similar feature in a text editor on the Mac. I have looked into the documentation for TextWrangler and TextMate to no avail. Hopefully there is a way to do this so I can be more productive when working on a Mac.

--

Note: in Notepad++ you do not have to do a keyboard shortcut to make this work... you just select some text and it does the highlighting for you automatically.

link|improve this question
What happens when you do a "Find" in TextEdit? Does it not highlight all the instances of the text (I apologize; I don't have my Mac in front of me at the moment)? – jrc03c Jul 19 '10 at 16:20
In TextEdit, "Find" iterates through each match. I am looking for a way to avoid using a keyboard- or menu-shortcut... just select a word and highlight the other instances of that word in the document. – jedierikb Jul 19 '10 at 16:24
feedback

4 Answers

Who said BBEdit couldn't do it?

With your document in the front window:

  • Choose Search > Live Search ⌥ ⌘ F
  • Enter your search string
  • Notice that all instances of that string are now highlighted in your document

To make Live Search go away, click the Done button.

Reference: BBEdit 9.5 User Manual, pages 159-160

link|improve this answer
This looks promising! (only been using TextWrangler...). However, reading the documentation, it appears I would still need to enter the query I want into the Live Search field instead of anything I select with the mouse becoming a new Live Search query. – jedierikb Jul 19 '10 at 21:01
1  
Select the text, ⌘C, ⌥⌘F, ⌘V—and you're done. Yes, it's a couple of extra keystrokes, but I don't think that you'll get any closer. If you want to search based on selected text, there's also Use Selection for Find (⌘E), but I don't see that it works with Live Search. – Dori Jul 19 '10 at 22:21
Works in TextWrangler also – nathang May 18 '11 at 20:47
feedback

Well, BBEdit does incremential search. Emacs/Aquamacs and Vim/MacVim do it too of course. This is really an essential feature for me and I am heartbroken that TextMate and SubEthaEdit still have no support for it.

link|improve this answer
feedback

Lifehacker.com says this is a nice alternative. http://www.fraiseapp.com/

I have no personal experience with it. But it looks nice.

link|improve this answer
just tried it -- alas, it does not seem to do what I am looking for. – jedierikb Jul 19 '10 at 19:41
Damn. sorry. Was it at least any good (in general)? – alpha1 Jul 21 '10 at 2:05
Well, it opened a text file and let me write it in it and save it! :-) – jedierikb Jul 21 '10 at 3:01
For future reference, development has been stopped on this program. It is available as a "Mac App" under the name "Smultron" peterborgapps.com/smultron – zourtney Mar 11 '11 at 3:08
feedback

Not exactly what you want but TextMate does also have an incremental search.

Hit Ctrl + S and start typing text. What you type will appear in the status bar at the bottom of TextMate window and will also be highlighted in the opened document, if the opened document contains that text..

Hitting Ctrl + S again will select the next match in the document. It is more immediate than Command + S

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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