Indexing excluded directories in PyCharm 3

2019-04-03 03:01发布

I am trying to exclude some directories from Pycharm's project index as they are recursive symbolic links. I have excluded the directories and invalidated the caches and restarted but PyCharm still indexes these excluded directories. It does not result in duplicate results in my search results etc. but indexing takes so much longer.

Is there a way to exclude these directories from being indexed?

标签: pycharm
3条回答
闹够了就滚
2楼-- · 2019-04-03 03:40

Besides @FooBarUser's suggestion, you can go to Preferences->Editor->File Types and here you have a box where you can add the files and folders you want to exclude from your project.

enter image description here

enter image description here

The folders and files that you include will not be shown in your project.

查看更多
啃猪蹄的小仙女
3楼-- · 2019-04-03 03:47

In PyCharm 2017.2.4 you can cmd+shift+A and start typing project structure... the project structure option should showed up then press <enter>. Then you can highlight the folder you want to exclude and mark it as Exclude. This is useful when you want to search for files with cmd+shift+O and you don't want venv files to showed up.

enter image description here

查看更多
何必那么认真
4楼-- · 2019-04-03 03:57

if i am right: File | Settings | project structure and select the folders you need and click exlcuded.

from documentation

Mark a folder as an excluded root.

Excluded roots are not visible to PyCharm. Usually, one would like to exclude temporary >build folders, generated output, logs, and other project output. Excluding the unnecessary >paths is a good way to significantly improve performance.

This command is duplicated on the context menu of a content root.

查看更多
登录 后发表回答