So in Visual Studios you can "Find in files" a string - I find this very useful to locate a file in which some markup or JS may be found, I use VS for my main code editor for Web development.
The problem is, most of my projects use node.js and node based build tools grunt/gulp etc. so I have a node_modules folder somewhere in my project that makes the FIND take for ever as there are thousands of files!!
How can I search in files and folders for a string BUT not in a node_modules directory.
In SublimeText2 you can remove a folder from the project without deleting it, this will stop a search looking in there...
A RegExp will be for the string not the filePath :(
VS Code allows you to quickly search over all files in the currently opened folder. Press Ctrl+Shift+F and enter your search term. Search results are grouped into files containing the search term, with an indication of the hits in each file and its location.
Press Ctrl-Shift-F to open "Find in Files". Enter your search term, then press Tab to forward the cursor to the "Look in" field.
Ok so I've tried this and it seems to work.
You can hide the node_modules folder (if they have a common root), by setting the Hidden attribute on the folder. As you say it fulfils your needs as per the question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With