Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Indexing excluded directories in PyCharm 3

Tags:

pycharm

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?

like image 352
philroche Avatar asked Sep 26 '13 09:09

philroche


People also ask

What are excluded folders in PyCharm?

PyCharm allows you to exclude directories from consideration when searching and refactoring. You can exclude a directory by right-clicking on it and selecting Mark Directory as → Excluded.

How do I run indexing in PyCharm?

Make sure the plugin is installedIn the Settings/Preferences dialog ( Ctrl+Alt+S ), select Plugins. Switch to the Installed tab, type Shared Project Indexes , and make sure that the checkbox next to it is selected. Otherwise, select the checkbox to enable the plugin. Apply the changes and close the dialog.

What does it mean when PyCharm is indexing?

Indexing examines the code of your project to create a virtual map of classes, methods, objects, and other code elements that make up your application. This is necessary to provide the coding assistance functionality, search, and navigation instantaneously. After indexing, the IDE is aware of your code.

How do I turn off indexing in PyCharm?

In order to stop PyCharm from indexing the 'lib' directory, right-click on this directory and select Mark Directory as, then Excluded. This directory will now no longer be indexed by PyCharm.


2 Answers

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.

like image 153
Foo Bar User Avatar answered Sep 23 '22 19:09

Foo Bar User


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.

like image 27
lmiguelvargasf Avatar answered Sep 24 '22 19:09

lmiguelvargasf