Reputation: 27826
I want to search in a directory which is outside my workspace.
Steps:
I use Go, but AFAIK this should not matter for this question.
Upvotes: 1
Views: 1069
Reputation: 181050
As it happens another extension I wrote makes this pretty easy: Find and Transform.
It adds three context menu entries:
Search in this Folder
Search in this File
Search in the Results Files (if there has been a previous search with results)
You can right-click on any tab or editor body and select Search in this Folder
and it will populate the files to include
input box of a search with that file's parent folder path.
And if you have any text selected, the query field will be populated with that selection (even if it is just a cursor in a word).
You could also just right-click on that tab and chose Copy Path
, paste that into the files to include
input of a Search and then delete the last part of the path back to the folder.
Upvotes: 1