CLion 2023.3 Help

Open, reopen, and close projects

Opening projects

Project opening settings

In CLion, you can open several projects simultaneously in different windows.

By default, each time you open a project while another one is opened, CLion prompts you to choose whether to open the project in the same window or in a new window. If necessary, you can change this behavior using controls on the System Settings page.

  1. Go to Settings | Appearance & Behavior | System Settings.

  2. Select one of the Open project in options:

    Project opening settings
    • New window to open a new CLion window each time a new project is opened.

    • Current window to stay in the same CLion window.

    • Ask to keep the default behavior and choose from a dialog for each new project.

Open a project

  1. Click Open on the Welcome screen or select File | Open from the main menu.

  2. In the Select Path dialog, select the directory that contains the project to open.

    • In the case of a CMake project, the directory should contain CMakeLists.txt.

    • For a compilation database project, it should contain compile_commands.json.

    • For a gradle project, you need to point CLion to the build.gradle file and then choose Open as Project.

  3. Specify whether you want to open the project in a new window, or close the current project and reuse the existing window.

For CMake projects, CLion comes with a CMake Profile Wizard to help you configure Toolchains and CMake Profiles for the first time:

CMake Profile Wizard

Open a project from the command line

Reopening recent projects

CLion keeps the history of your recent projects. When CLion starts, the last project (or projects if there were several projects opened at once in your previous session) reopens by default. You can change this behavior in the Startup/Shutdown section of the Settings | Appearance & Behavior | System Settings dialog.

Reopen a recent project

  • Call File | Recent Projects from the main menu and select the desired project from the list.

  • Invoke the Run Anything dialog by pressing Ctrl twice (or search for Run anything in Help | Find Action Ctrl+Shift+A). In the Run Anything dialog, type Open to see the list of recent projects:

    open recent project from Run Anything
  • 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.

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 click the closing icon for the project to remove.

    The selected project will be removed from the list of the recent project in the Project window and on the Welcome screen.

  • To remove a project only from the list on the Welcome Screen, right-click the target project and select Remove Selected from Welcome Screen.

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 CLion 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.

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

Welcome screen

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.

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.

  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 Delete 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.

Changing project location

Move 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

  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.

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

  • In the main menu, go to File | Close All Projects.

    This action closes all projects that are currently opened in CLion.

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.

Last modified: 15 March 2024