Search in Project
Use ag, ack, grep and git grep directly from Sublime Text 2 and 3
- Total 14K
- Win 5K
- OS X 5K
- Linux 3K
|Dec 6||Dec 5||Dec 4||Dec 3||Dec 2||Dec 1||Nov 30||Nov 29||Nov 28||Nov 27||Nov 26||Nov 25||Nov 24||Nov 23||Nov 22||Nov 21||Nov 20||Nov 19||Nov 18||Nov 17||Nov 16||Nov 15||Nov 14||Nov 13||Nov 12||Nov 11||Nov 10||Nov 9||Nov 8||Nov 7||Nov 6||Nov 5||Nov 4||Nov 3||Nov 2||Nov 1||Oct 31||Oct 30||Oct 29||Oct 28||Oct 27||Oct 26||Oct 25||Oct 24||Oct 23||Oct 22|
Search In Project
This plugin for Sublime Text 2 and 3 lets you use your favorite search tool (
git grep, or
findstr) to find strings aross your entire current Sublime Text project.
It opens a quick selection panel to browse results, and highlights matches inside files.
- Use the key binding (
⌘⌥⇧Fon OS X,
Ctrl+Alt+Shift+Fon Windows and Linux), or
- Call the “SearchInProject: Search” command;
- Enter the search query;
Return). You'll be presented with a “quick select” panel with the search results. Select any file from that panel (it supports fuzzy searching) to go to the match. The search string will be highlighted with an outline and a circle symbol in the gutter area.
- The last item on the quick select panel is “List results in view”. Pick it to see results in a regular editor view. (Tip: if you enter three ticks (“”) in the search box - it's going to be to be the first item.)
If you select text and run Search In Project, the program will pre-fill the search string with the selection text. For an example, to search for a word project-wide, press the following buttons:
⌘D, ⌘⌥⇧F, ↩.
If you run Search In Project again, the program will remember the last search string, so the next search will be an ↩ away.
Important note for Windows users: the current release has known issues with running executables, and I would appreciate any bug reports from the field.
Package Control: install package Search in Project (this is the recommended method)
Manual installation: download an archive of the repository, and unzip into the Sublime Text Packages folder.
Installing search engines
My idea is that if you use this plugin it's because you already use one of the superior search engines like The Silver Searcher and want to use it from within Sublime Text.
The supported search engines are:
|Name||Description||Search in Project key|
|pt (The Platinum Searcher)||fast, has binaries for every platform, recommended.||
|ag (The Silver Searcher)||equally fast, only 3rd party binaries for Windows, also recommended||
|ack||not as fast as
|git grep||packaged with Git and really fast, but only works in Git repositories. Recommended if you use Windows and Git and really don't want to install anything else.||
|grep||fallback search tool available on Linux and OSX systems. Not recommended - just use the built-in Sublime Text search instead.||
|findstr||fallback search tool available on Windows. Not recommended - just use the built-in Sublime Text search instead.||
You need to choose the engine that you want to use in the configuration file. The default is the one that available on every system, but it is easily the worst.
Configuration is stored in a separate, user-specific
SearchInProject.sublime-settings file. See the default file for configuration options; links to both could be
found in the main menu in
Preferences -> Package Settings -> Search In Project.
Issues with locating executables
If Search In Project has problems with locating executables in Mac, install the Fix Mac Path plugin.
You can always configure the full path to any search engine in the settings, as a catch-all solution.
Made by Leonid Shevtsov