问题
I have a node.js project which, after running npm install
has a node_modules
folder in the project root. Everything works fine, but when I load the project into RubyMine, right-click on the project root folder and choose find in path...
, the search includes all of the code inside node_modules
, which is not useful.
I have tried to mark the node_modules
folder as 'excluded', which works, but it still includes the contents in the search.
How can I get find in path...
to only search my project files?
回答1:
Create custom scope (can be accessed directly in
Find in Path
dialog (by clicking on...
button) or viaSettings/Preferences | Appearance & Behavior | Scopes
): include all and then exclude unwanted folders recursively (or just include desired folders only).Choose that scope in
Find in Path
dialogNOTE: Screenshot and settings path is from PhpStorm but it should be the same in RubyMine as well (it's platform-wide feature).
P.S. You can use the same approach in TODO window -- to only show TODOs from your own files.
Excluded folders should not be searched (works OK with ordinary excluded folders) -- possibly it's because they are also listed as JavaScript (or any other) libraries and at the same time located within the content root?
来源:https://stackoverflow.com/questions/34610247/how-to-stop-rubymine-webstorm-from-including-node-modules-when-using-find-in-pa