ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Search in Project

Use ag, ack, grep and git grep directly from Sublime Text 2 and 3

Labels search

Details

Installs

  • Total 16K
  • Win 6K
  • Mac 6K
  • Linux 4K
Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25
Windows 0 2 0 0 0 1 0 1 0 0 1 0 2 0 0 0 0 0 0 1 0 0 1 1 0 1 2 0 0 1 1 0 1 1 1 1 0 0 0 0 1 2 0 0 0
Mac 0 0 0 0 0 0 2 0 0 3 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
Linux 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
01234Jan 8Jan 5Jan 2Dec 30Dec 27Dec 24Dec 21Dec 18Dec 15Dec 12Dec 9Dec 6Dec 3Nov 30Nov 27Jan 8 Linux: 0 Mac: 0 Windows: 0Jan 7 Linux: 0 Mac: 0 Windows: 2Jan 6 Linux: 1 Mac: 0 Windows: 0Jan 5 Linux: 0 Mac: 0 Windows: 0Jan 4 Linux: 0 Mac: 0 Windows: 0Jan 3 Linux: 0 Mac: 0 Windows: 1Jan 2 Linux: 1 Mac: 2 Windows: 0Jan 1 Linux: 0 Mac: 0 Windows: 1Dec 31 Linux: 0 Mac: 0 Windows: 0Dec 30 Linux: 0 Mac: 3 Windows: 0Dec 29 Linux: 0 Mac: 0 Windows: 1Dec 28 Linux: 0 Mac: 0 Windows: 0Dec 27 Linux: 0 Mac: 0 Windows: 2Dec 26 Linux: 0 Mac: 0 Windows: 0Dec 25 Linux: 0 Mac: 0 Windows: 0Dec 24 Linux: 0 Mac: 1 Windows: 0Dec 23 Linux: 2 Mac: 0 Windows: 0Dec 22 Linux: 1 Mac: 0 Windows: 0Dec 21 Linux: 0 Mac: 0 Windows: 0Dec 20 Linux: 0 Mac: 0 Windows: 1Dec 19 Linux: 0 Mac: 0 Windows: 0Dec 18 Linux: 0 Mac: 0 Windows: 0Dec 17 Linux: 1 Mac: 0 Windows: 1Dec 16 Linux: 0 Mac: 0 Windows: 1Dec 15 Linux: 0 Mac: 0 Windows: 0Dec 14 Linux: 0 Mac: 0 Windows: 1Dec 13 Linux: 0 Mac: 0 Windows: 2Dec 12 Linux: 0 Mac: 0 Windows: 0Dec 11 Linux: 0 Mac: 0 Windows: 0Dec 10 Linux: 1 Mac: 0 Windows: 1Dec 9 Linux: 0 Mac: 0 Windows: 1Dec 8 Linux: 0 Mac: 0 Windows: 0Dec 7 Linux: 0 Mac: 0 Windows: 1Dec 6 Linux: 1 Mac: 0 Windows: 1Dec 5 Linux: 0 Mac: 0 Windows: 1Dec 4 Linux: 0 Mac: 0 Windows: 1Dec 3 Linux: 0 Mac: 0 Windows: 0Dec 2 Linux: 0 Mac: 0 Windows: 0Dec 1 Linux: 0 Mac: 1 Windows: 0Nov 30 Linux: 0 Mac: 0 Windows: 0Nov 29 Linux: 0 Mac: 0 Windows: 1Nov 28 Linux: 0 Mac: 0 Windows: 2Nov 27 Linux: 0 Mac: 0 Windows: 0Nov 26 Linux: 0 Mac: 0 Windows: 0Nov 25 Linux: 0 Mac: 0 Windows: 0Jan 8 Linux: 0 Mac: 0 Windows: 0Jan 7 Linux: 0 Mac: 0 Windows: 2Jan 6 Linux: 1 Mac: 0 Windows: 0Jan 5 Linux: 0 Mac: 0 Windows: 0Jan 4 Linux: 0 Mac: 0 Windows: 0Jan 3 Linux: 0 Mac: 0 Windows: 1Jan 2 Linux: 1 Mac: 2 Windows: 0Jan 1 Linux: 0 Mac: 0 Windows: 1Dec 31 Linux: 0 Mac: 0 Windows: 0Dec 30 Linux: 0 Mac: 3 Windows: 0Dec 29 Linux: 0 Mac: 0 Windows: 1Dec 28 Linux: 0 Mac: 0 Windows: 0Dec 27 Linux: 0 Mac: 0 Windows: 2Dec 26 Linux: 0 Mac: 0 Windows: 0Dec 25 Linux: 0 Mac: 0 Windows: 0Dec 24 Linux: 0 Mac: 1 Windows: 0Dec 23 Linux: 2 Mac: 0 Windows: 0Dec 22 Linux: 1 Mac: 0 Windows: 0Dec 21 Linux: 0 Mac: 0 Windows: 0Dec 20 Linux: 0 Mac: 0 Windows: 1Dec 19 Linux: 0 Mac: 0 Windows: 0Dec 18 Linux: 0 Mac: 0 Windows: 0Dec 17 Linux: 1 Mac: 0 Windows: 1Dec 16 Linux: 0 Mac: 0 Windows: 1Dec 15 Linux: 0 Mac: 0 Windows: 0Dec 14 Linux: 0 Mac: 0 Windows: 1Dec 13 Linux: 0 Mac: 0 Windows: 2Dec 12 Linux: 0 Mac: 0 Windows: 0Dec 11 Linux: 0 Mac: 0 Windows: 0Dec 10 Linux: 1 Mac: 0 Windows: 1Dec 9 Linux: 0 Mac: 0 Windows: 1Dec 8 Linux: 0 Mac: 0 Windows: 0Dec 7 Linux: 0 Mac: 0 Windows: 1Dec 6 Linux: 1 Mac: 0 Windows: 1Dec 5 Linux: 0 Mac: 0 Windows: 1Dec 4 Linux: 0 Mac: 0 Windows: 1Dec 3 Linux: 0 Mac: 0 Windows: 0Dec 2 Linux: 0 Mac: 0 Windows: 0Dec 1 Linux: 0 Mac: 1 Windows: 0Nov 30 Linux: 0 Mac: 0 Windows: 0Nov 29 Linux: 0 Mac: 0 Windows: 1Nov 28 Linux: 0 Mac: 0 Windows: 2Nov 27 Linux: 0 Mac: 0 Windows: 0Nov 26 Linux: 0 Mac: 0 Windows: 0Nov 25 Linux: 0 Mac: 0 Windows: 0Jan 8 Linux: 0 Mac: 0 Windows: 0Jan 7 Linux: 0 Mac: 0 Windows: 2Jan 6 Linux: 1 Mac: 0 Windows: 0Jan 5 Linux: 0 Mac: 0 Windows: 0Jan 4 Linux: 0 Mac: 0 Windows: 0Jan 3 Linux: 0 Mac: 0 Windows: 1Jan 2 Linux: 1 Mac: 2 Windows: 0Jan 1 Linux: 0 Mac: 0 Windows: 1Dec 31 Linux: 0 Mac: 0 Windows: 0Dec 30 Linux: 0 Mac: 3 Windows: 0Dec 29 Linux: 0 Mac: 0 Windows: 1Dec 28 Linux: 0 Mac: 0 Windows: 0Dec 27 Linux: 0 Mac: 0 Windows: 2Dec 26 Linux: 0 Mac: 0 Windows: 0Dec 25 Linux: 0 Mac: 0 Windows: 0Dec 24 Linux: 0 Mac: 1 Windows: 0Dec 23 Linux: 2 Mac: 0 Windows: 0Dec 22 Linux: 1 Mac: 0 Windows: 0Dec 21 Linux: 0 Mac: 0 Windows: 0Dec 20 Linux: 0 Mac: 0 Windows: 1Dec 19 Linux: 0 Mac: 0 Windows: 0Dec 18 Linux: 0 Mac: 0 Windows: 0Dec 17 Linux: 1 Mac: 0 Windows: 1Dec 16 Linux: 0 Mac: 0 Windows: 1Dec 15 Linux: 0 Mac: 0 Windows: 0Dec 14 Linux: 0 Mac: 0 Windows: 1Dec 13 Linux: 0 Mac: 0 Windows: 2Dec 12 Linux: 0 Mac: 0 Windows: 0Dec 11 Linux: 0 Mac: 0 Windows: 0Dec 10 Linux: 1 Mac: 0 Windows: 1Dec 9 Linux: 0 Mac: 0 Windows: 1Dec 8 Linux: 0 Mac: 0 Windows: 0Dec 7 Linux: 0 Mac: 0 Windows: 1Dec 6 Linux: 1 Mac: 0 Windows: 1Dec 5 Linux: 0 Mac: 0 Windows: 1Dec 4 Linux: 0 Mac: 0 Windows: 1Dec 3 Linux: 0 Mac: 0 Windows: 0Dec 2 Linux: 0 Mac: 0 Windows: 0Dec 1 Linux: 0 Mac: 1 Windows: 0Nov 30 Linux: 0 Mac: 0 Windows: 0Nov 29 Linux: 0 Mac: 0 Windows: 1Nov 28 Linux: 0 Mac: 0 Windows: 2Nov 27 Linux: 0 Mac: 0 Windows: 0Nov 26 Linux: 0 Mac: 0 Windows: 0Nov 25 Linux: 0 Mac: 0 Windows: 0

Readme

Source
raw.​githubusercontent.​com

Project is discontinued!

I'm not using Sublime Text anymore and have no interest in supporting this project.

I added the MIT license to be explicit, so if you want to carry one, you have my full permission - and gratitude!

Search In Project

Search in Project screencast

This plugin for Sublime Text 2 and 3 lets you use your favorite search tool (grep, ack, ag, pt, rg, 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.

Usage

  • Use the key binding (⌘⌥⇧F on OS X, Ctrl+Alt+Shift+F on Windows and Linux), or
  • Call the “SearchInProject: Search” command;
  • Enter the search query;
  • Hit Enter (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.

Installation

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. the_platinum_searcher
ag (The Silver Searcher) equally fast, only 3rd party binaries for Windows, also recommended the_silver_searcher
ack not as fast as pt and ag, but still pretty good. Depends on perl, thus not so easy to install on Windows. ack
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. git_grep
grep fallback search tool available on Linux and OSX systems. Not recommended - just use the built-in Sublime Text search instead. grep
findstr fallback search tool available on Windows. Not recommended - just use the built-in Sublime Text search instead. find_str

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

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