timbrel / GitSavvy

Full git and GitHub integration with Sublime Text
MIT License
1.91k stars 137 forks source link

RFC: Implement support for "git grep" #1012

Open ghedsouza opened 6 years ago

ghedsouza commented 6 years ago

I would like GitSavvy to support the "git grep" command for searching source code.

Would such a change be supported by the project maintainer? If so, maybe we can find someone to work on it (possibly myself).

stoivo commented 6 years ago

I dont use git grep in my daily usage. How you you expect this to work?

ghedsouza commented 6 years ago

The command would be git: grep [search-term].

When entered through the command palette, it would run git grep [search-term] and drop the results into a new tab, similar to git: blame.

Ideally, the results would be made clickable (like the builtin search), so you could double click on a line in the search results to open that file at that line number.

ghedsouza commented 6 years ago

Side note, the benefit of git grep over the builtin search is that it only searches through checked-in files and so tends to be extremely fast and give more relevant results.