In most editors it's possible to perform a search within the open folder/project. How can this be achieved with Code in Juno, if at all possible?
I don't think the feature exists in Code yet. However, a simple workaround is:
- Right-click the folder / project, select "Open in" > "Terminal"
- Type in the command:
grep -Ril "text to search for" .
That will list all the files containing that text. Some notes:
.Means search from the current folder
-RSearches recursively, not just files in the current folder
-lPrints just the file names, not showing the line of text it's in
Update: If you want to then open the files in Code, add
`pwd` to the end, which will print out the full paths of the files. Then use the names like
io.elementary.code filename to open it in Code.
If you need to find files with a particular name, you can use the same method to open the folder in Terminal, then run the following command:
find . -name '*part of name*' -print
If "part of name" is for example "list", that will match files named "todo list.txt". You can also use the following flags:
-type dTo search for only directories (folders)
-type fTo search for only files