nvALT Quick Search in the Finder

January 08, 2015 by Gabe | [mmd] |

You'll either think this is dumb and boring or surprising and awesome. Good luck.

You can use the Finder just like the nvALT quick search and you can use it from anywhere you have a Finder window.1

Finder searches parse both the file name and the file contents. If you can get a Quick Look preview of it, the Finder can probably search it. I've had luck with all Omni, Curio, iThoughts and PDFs as well as any plain text file types. It even searches sub-folders.

First, open the folder you want to search. In this example, I'm searching the folder that contains all of my notes. Enter some generic search term and hit enter. Now delete the search term and click the "Save" button.2

This adds a saved search to your finder sidebar. Any time you want to search that folder, just click the Finder sidebar item to start a new search. Sure, there's no two line preview match highlighting like in nvALT, but quick look works and it's a lot more flexible than the nvALT search.3

That's still too much work. Let's make a Keyboard Maestro macro to open the search from anywhere with one hotkey combo.

In Keyboard Maestro, create a new macro with a "File Open" action. Saved searches are all located in the user Library folder with the path ~/Library/Saved Searches/. Just browse to the saved search definition and select it in the action. Set a hotkey, and you're done.4

Alfred and Launchbar are nice and quick but neither does a good (or easy) job searching file contents. The Finder's pretty nice sometimes.

  1. Unfortunately you can't create a new file like you can in nvALT. 

  2. Don't click the clear icon. Manually delte it one character at a time until the box is empty. 

  3. Don't forget that you can use the Finder advanced filters too. Like typing "date:previous week" to limit by file creation date. If you have a very large file collection you can also add a date filter before you create the saved search so that it's always limited to files from the past month (for example). 

  4. I suppose it would be easy enough to also create a KM macro to create a new file from the search string. Select all, copy, and then use a shell command to create a new file with that name.