Skip to content

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

Notifications You must be signed in to change notification settings

lunixbochs/SearchInProject3

 
 

Repository files navigation

Search In Project v1.2.0

A plugin for Sublime Text 3.

Synopsis

This plugin makes it possible to use various external search tools (grep, ack, ag, 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.

It's easy to add another search tool, if you so desire.

Installation

Package Control: install package SearchInProject (this is the recommended

Copy the folder into the Packages folder.

Usage

  • Use the key binding (⌘⌥⇧F on OS X, Ctrl+Alt+Shift+F on Windows), or
  • Call the "Search in Project" command;
  • Enter the search query; the query is passed directly to the shell command. You are responsible for escaping the query, but on the up side you can specify any command line options to go with it. This plugin doesn't make an effort to abstract you away from search tools, but provides a convenient way of running them from Sublime Text 3 instead.
  • Hit Enter (Return). In a short while 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.

If you select text and then run Search In Project, it will pre-fill the search string with the selection text; for example, to search for a word project-wide, do ⌘D, ⌘⌥⇧F, ↩

If you run Search In Project again, it will remember the last search string, so the next search is just an away.

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.

On any OS I recommend you to install ack, and use it instead of the default grep/findstr, because it's much faster. Here's how to install ack on Windows.


Made by Leonid Shevtsov

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%