使用“在路径中查找"时如何阻止 RubyMine/WebStorm 包含 node_modules [英] How to stop RubyMine/WebStorm from including node_modules when using 'find in path'
问题描述
我有一个 node.js 项目,在运行 npm install
后,项目根目录中有一个 node_modules
文件夹.一切正常,但是当我将项目加载到 RubyMine 中时,右键单击项目根文件夹并选择 find in path...
,搜索包括 node_modules<中的所有代码/code>,这是没有用的.
我已尝试将 node_modules
文件夹标记为已排除",这可行,但它仍包含搜索中的内容.
如何让 find in path...
只搜索我的项目文件?
创建
注意:屏幕截图和设置路径来自 PhpStorm,但它在 RubyMine 中也应该相同(它是平台范围的功能).
附言您可以在 TODO 窗口中使用相同的方法——仅显示您自己文件中的 TODO.
<小时>不应搜索排除的文件夹(对于普通的排除文件夹可以正常工作)--可能是因为它们也被列为 JavaScript(或任何其他)库,并且同时位于内容根目录中?
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?
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?
这篇关于使用“在路径中查找"时如何阻止 RubyMine/WebStorm 包含 node_modules的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!