Как закрыть проект в pycharm
Перейти к содержимому

Как закрыть проект в pycharm

  • автор:

Opening, reopening, and closing projects

WebStorm keeps the history list of the recent projects, from which you can select the desired one.

When WebStorm starts, the most recent project reopens by default (unless this option is disabled on the System Settings page of the Settings dialog ( Ctrl+Alt+S ) .

  • Call File | Recent Projects from the main menu and select the desired project from the list. Specify whether you want to open the project in a new window or reuse the current window.
  • On the Welcome screen , click Projects in the left-hand pane and then select the project of interest in the right-hand pane where the list of your recent projects is shown. Start typing in the Search projects field to filter the list of recent projects.

Reopen a project with Run Anything

Run Anything: Opening a recent project

  • Press Ctrl twice or click on the Navigation bar and type open in the search field of the Run Anything popup that opens. Then select the required project from the list, and press Enter .
  • Run Anything is also a quick way to launch applications and to run npm or yarn scripts, learn more from Run Anything and Running npm and yarn scripts. To see all available commands, type ? .

Remove a project from the list of recent projects

  • Go to File | Recent Projects and click Manage Projects at the very bottom of the list of recent projects. From the list of recent projects, select the project to remove and then select Remove from Recent Projects from its context menu. Remove a recent project from the list of the recent projects
  • On the Welcome Screen , click Projects in the left-hand pane, select a project from the list in the right-hand pane, and then select Remove from Recent Projects from its context menu. Remove a project from recent Projects on the Welcome Screen: context menuAlternatively, click and select Remove from Recent Projects from the list. Remove a project from recent Projects on the Welcome Screen: Settings icon

Closing projects

When you have only one open project and you close it, WebStorm displays the Welcome screen . In case of multiple projects, each one is closed with its window.

Close the current project

  • Go to File | Close Project .
  • Alternatively, close the window with the project by clicking in the upper-right corner. However, if you have only one project opened, this will actually close WebStorm.

Close all projects

  • Go to File | Close All Projects . This action closes all projects that are currently opened in WebStorm.

Close all but the current project

  • Go to File | Close Other Projects . This action closes all opened projects except the current one.

Opening multiple projects

WebStorm suggests the following options to work with several projects simultaneously:

Opening multiple projects: confirmation dialog

  • Each project is opened in its own window. The projects are independent and cannot share information, except for the Clipboard operations. All the projects run in the same instance of WebStorm and use the same memory space.
  • A newly opened project shares the window with the already opened project, which is considered the main project and is always shown first in the Project tool window. All the newly opened projects are attached to this main project.
  1. Select File | Open from the main menu and then in the Select Path dialog, select the directory that contains the project to open.
  2. By default, WebStorm displays a dialog prompting you to select whether you want to attach the new project to the currently opened one ( Attach ), open the project in a new window ( New Window ), or replace the currently opened project with the new one in the existing window ( This Window ). You can change or restore this behavior on the System Settings page of the Settings dialog as described in Change the project opening policy.

Change the project opening policy

  1. In the Settings dialog ( Ctrl+Alt+S ) , go to Appearance & Behavior | System Settings .
  2. Specify the default location for your projects in the Default project directory field. WebStorm will start with this folder when you open projects. This default location will be also suggested every time you create a new project.
  3. In the Open project in area, select the project opening policy:
    • Ask : This option is selected by default. WebStorm displays a dialog where you can choose to open the project in a new window, reuse the existing window, or attach the new project to the currently opened one.
    • New window : Select this option to silently open each new project in a new window. Opening multiple projects by default in a new windowWith this option selected, use the File | Attach project main menu command to attach a new project to the currently opened one. Option New Window: open a new project in the current window (attach project)
    • Current window : Select this option to silently close the project opened in the current window and open a new project in it. With this option selected, use the File | Attach project main menu command to attach a new project to the currently opened one.

Detach projects from a shared window

Detaching a project from a shared window

  • In the Project tool window, select the project to detach and click Remove from Project View in its context menu.

Merge project windows (macOS)

On macOS, you can merge all opened project windows into one, turning them into tabs.

  1. Open several WebStorm projects in separate windows.
  2. Go to Window | Merge All Project Windows . Drag a project’s tab to work with the project in a separate window again.

Some known limitations

  • Symbols from the attached projects are visible from the main one, but not vice versa.
  • WebStorm will keep using the project settings (for example code style or inspections profile) of the main project.
  • The run configuration from the attached project will be ignored and new configurations will be saved in the .idea folder of the main project.
  • If you use TypeScript, the same version will be used in all the attached projects.
  • You can’t close the main project while keeping the attached project opened.

Open, move, and close projects

If you are opening a project for the first time, and this project has several configurations (for example Eclipse and Maven), the IDE will ask you which configuration to load. For more information about opening a project correctly, refer to Open a project (simple import).

Open projects in a new or the same window

By default, when you launch the second or any subsequent project, the IDE asks you how you want to open it: in a new window or in the same window. You can configure the default behavior for such cases in the settings:

the System Settings page in Settings

  1. In the Settings dialog ( Ctrl+Alt+S ) , select Appearance & Behavior | System Settings .
  2. In the Project section, select the necessary Open project in option:
    • New window : open every project in a separate window.
    • Current window : close the current project and open a new one in the same window.
    • Ask : show a dialog with actions to choose from.
  3. Apply the changes and close the dialog.

Always reopen projects

If you quit the IDE having multiple opened projects, they all will be reopened the next time you launch IntelliJ IDEA. If you don’t want to automatically reopen your projects, you can change this behavior in the settings:

  1. In the Settings dialog ( Ctrl+Alt+S ) , select Appearance & Behavior | System Settings .
  2. In the Project section, clear the Reopen projects on startup checkbox.
  3. Apply the changes and close the dialog.

Merge project windows (macOS)

On macOS, you can merge all opened project windows into one, turning them into tabs.

  1. Make sure that there are several IntelliJ IDEA projects opened in separate windows.
  2. In the main menu, go to Window | Merge All Project Windows . Drag a project’s tab to work with the project in a separate window again.

With default macOS settings, tabs will be lost after you restart the IDE, and projects will open in separate windows. If you would like the IDE to reopen projects in tabs, configure your macOS to always use tabs when opening documents.

Navigate projects on the Welcome screen

If you work with multiple projects, it’s likely that you have a long list of recent projects on the Welcome screen. IntelliJ IDEA provides several options that can help navigate this list in a more convenient way.

You can use the search bar to search for projects, join several recent projects in a group, or set a custom icon for each project.

Group projects

Groups make navigation simpler and help you logically organize your recent projects.

  1. On the Welcome screen, right-click any project and select New Project Group .
  2. In the Create New Project Group dialog, name the new group and click OK .
  3. Right-click the project that you want to move to the new group, select Move to Group , and click the target group’s name.

After that, hover over the group and use the icon to show the menu from which you can open all projects in the group at once by clicking All Projects in Group . You can also ungroup the projects, move them to another group, and remove them from the list of recent projects at once.

Projects grouped on the Welcome screen

Change the project icon

For each project, you can configure a custom icon so that you can quickly find the necessary project on the Welcome screen. Your custom icon should have the SVG format.

Changing project icon on Welcome screen

  1. On the Welcome screen, right-click the project for which you want to change an image and select Set Custom Project Icon .
  2. In the dialog that opens, click Choose SVG file and specify the path to the necessary SVG icon.
  3. Click OK to apply the changes. To remove the custom icon, click in the Set Custom Project Icon dialog.

Switch between projects

If you have several opened projects at the same time, you can switch between them using the following options:

  • Switch to the next project window: Ctrl+Alt+] ( Window | Next Project Window )
  • Switch to the previous project window: Ctrl+Alt+[ ( Window | Previous Project Window )

Alternatively, open the Window menu and select the project to which you want to switch.

Change project location

Move a project to another location

Moving a project to another location

  1. In the Project tool window Alt+1 , right-click the project directory and select Refactor | Move directory ( F6 ).
  2. In the dialog that opens, specify a new location for the project and click Refactor .

Change the default location for projects

Changing the default location for projects

  1. In the Settings dialog ( Ctrl+Alt+S ) , select Appearance & Behavior | System Settings .
  2. In the Default project directory field, specify the path to the folder in which you want to store your projects.
  3. Apply the changes and close the dialog.

Close projects

If you need to close only one project, you can either close the project window or select File | Close Project from the main menu.

If you work with multiple projects, use the following actions to close many projects at once:

Close all projects

  • In the main menu, go to File | Close All Projects . This action closes all projects that are currently opened in IntelliJ IDEA.

Close all but the current project

  • In the main menu, go to File | Close Other Projects . This action closes all opened projects except the current one.

Open, reopen, and close projects

If you open your project for the very first time, you see the Welcome Screen. You can either open your project from the disk, or download it from the version control system.

Although PyCharm is intended to be used with projects, you can open individual files in LightEdit mode.

Opening a project

Open your project from disk

  1. Do one of the following:
    • Go to File | Open .
    • On the Welcome Screen, click Open .
  2. In the Open File or Project dialog that opens, find the location of the desired project directory. The PyCharm projects are marked with and projects created in other IDEs or in a dedicated editor are marked with . If you select a non-PyCharm directory, PyCharm creates a new IDE project and sets up a Python interpreter.
  3. Click Open (on Mac) or OK (on Windows).

Open a project from Git

Open a project from VCS

  1. Do one of the following:
    • On the Welcome Screen, click Get from Version Control .
    • Go to VCS | Get from Version Control .
  2. Select the version control system where your project is stored. Here it is Git:
  3. Specify the path to the repository and select the directory to which a project will be cloned. Alternatively, you can select GitHub on the left, login using your credentials, and select any project you want to work with.
  4. Click Clone .

Open a project from the command line

  • In the command prompt, type:

Once you have opened the project, you should configure Python interpreter for it, and set up your project.

If your project was previously configured with any interpreter that is not currently available, PyCharm shows a warning and provides two options: select an interpreter that fits the previous configuration or configure another Python interpreter:

A warning message with the options to configure a project interpreter

Note, when you open a project configured for the outdated version of the Python interpreter, the following message appears:

notification on the unsupported version of the Python interpreter

Click Configure Python interpreter to set up a valid one.

You can close a project that has been added to the currently opened one (primary project).

Managing multiple projects

PyCharm suggests the following alternatives to work with several projects simultaneously:

  1. Each project is opened in its own window. The projects are independent and cannot share information, except for the Clipboard operations. All the projects run in the same instance of PyCharm and use the same memory space.
  2. A newly opened project shares the same window as the already opened one. The project that has already been opened is considered the primary project, and is always shown first in the Project tool window. All the other projects are attached to the primary project. You can import classes and methods from dependent projects

Open multiple projects

Open the project in the current window, new window, or attach it to the existing project

  • Open a project, while another one is already opened. Then, depending on the option selected in the Project section of the Appearance & Behavior | System Settings page of the Settings dialog ( Ctrl+Alt+S ) , PyCharm can ask you for the following alternatives:
    • If the New Window option is selected, the new project silently opens in a new window. The Attach option appears in the File menu.
    • If the This Window option is selected, the new project silently opens in the same window, replacing the currently opened project. The Attach Project command appears in the File menu.
    • If the Attach option is selected, PyCharm attaches the new project to the currently opened project. The project that has already been opened is the primary project .

Merge project windows (macOS)

On macOS, you can merge all opened project windows into one, turning them into tabs.

  1. Make sure that there are several PyCharm projects opened in separate windows.
  2. In the main menu, go to Window | Merge All Project Windows . Drag a project’s tab to work with the project in a separate window again.

With default macOS settings, tabs will be lost after you restart the IDE, and projects will open in separate windows. If you would like the IDE to reopen projects in tabs, configure your macOS to always use tabs when opening documents.

Manage project dependencies

Managing project dependencies

  1. Press Ctrl+Alt+S to open the IDE settings and select Project | Project Dependencies .
  2. Select a project in the Projects pane , than select the checkboxes to the left of the names of the desired projects to add them as dependencies.
  3. Use the arrow buttons to change the order of the dependent projects, in which they appear in the PYTHONPATH variable.

Some settings (such as Django, Google App Engine, template languages, Python interpreters, content roots) can be configured separately for each project.

You can close a project that has been attached to the currently opened one (primary project).

Detach a project

Remove from the project view

  1. In the Project tool window, right-click the project to be detached.
  2. From the context menu of the selection, choose Remove from Project View or press Delete :

When PyCharm starts, the most recent project reopens by default (unless this option is disabled on the System Settings page of the Settings dialog ( Ctrl+Alt+S ) .

Reopening recent projects

PyCharm keeps the history list of the recent projects, from which you can select the desired one.

When PyCharm starts, the most recent project reopens by default (unless this option is disabled on the System Settings page of the Settings dialog ( Ctrl+Alt+S ) .

Open a recent project

  • Call File | Recent Projects from the main menu and select the desired project from the list. Note that the list also contains the projects that share one window. Specify whether you want to open the project in a new window, reuse the current window, or attach it to the currently opened project.
  • On the Welcome screen, click Projects on the left-hand pane and then select the project of interest in the right-hand pane where the list of your recent projects is shown. Start typing in the Search projects field to filter the list of recent projects.

Closing projects

If you need to close only one project, you can either close the project window or select File | Close Project from the main menu.

If you work with multiple projects, use the following actions to close many projects at once:

Close all projects

  • Go to File | Close All Projects . This action closes all projects that are currently opened in PyCharm.

Close all but the current project

  • Go to File | Close Other Projects . This action closes all opened projects except the current one.

When you have only one open project and you close it, PyCharm displays the Welcome screen . In case of multiple projects, each one is closed with its frame.

Remove a project from the list of recent projects

Remove a recent project from the list of the recent projects

  • Click Recent Projects on the File menu, then click Manage Projects at the very bottom of the recent project list.
  • Click the icon next the project that you want to remove. The selected project will be removed from the list of recent projects in the Recent Projects menu and on the Welcome screen.

Switching between projects

To switch between open projects, you can use the following commands of the Window menu:

  • Window | Next Project Window Ctrl+Alt+]
  • Window | Previous Project Window Ctrl+Alt+[
  • Window |

Как из окна открытого проекта в PyCharm перейти в окно выбора проект (стартовое окно)

Проблема следующая — присутствует множество несвязанных проектов, которые надо отлаживать в процессе деятельности. При старте IDE открывается удобное окно выбора проекта, в которое бы хотелось переходить после окончания работы с предыдущим. Прикреплять 1 проект к другому не хочется, тк не люблю много вкладок, а переоткрывать IDE каждый раз — лень. Есть способ перехода менее костыльный?

Отслеживать
задан 21 июл 2020 в 11:47
Noobanswerisnotananswer Noobanswerisnotananswer
21 4 4 бронзовых знака

1 ответ 1

Сортировка: Сброс на вариант по умолчанию

При закрытии проекта на close project это окно выбора проекта будет появляться, так что перезапуск не нужен.

А как открыть несколько проектов одновременно можно почитать в официальной документации:

введите сюда описание изображения

Отслеживать
ответ дан 21 июл 2020 в 13:50
407 2 2 золотых знака 11 11 серебряных знаков 39 39 бронзовых знаков

    Важное на Мете
Похожие

Подписаться на ленту

Лента вопроса

Для подписки на ленту скопируйте и вставьте эту ссылку в вашу программу для чтения RSS.

Дизайн сайта / логотип © 2024 Stack Exchange Inc; пользовательские материалы лицензированы в соответствии с CC BY-SA . rev 2024.5.3.8609

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *