PyCharm 2024.2 Help

Open files in the editor

Whatever you do in PyCharm, you do that in the context of a project. In PyCharm, you can create a project, clone it from the repository, or import from existing sources. Once you open a project, you can work with its files.

Open a file for editing

  1. Do one of the following:

    • Double-click the desired file in one of the tool windows.

    • Select the desired file in one of the tool windows and press F4.

    • Select the desired file in the one of the tool windows and choose Jump to Source on the context menu.

    • Use the Search Everywhere command for a Class, File, or Symbol.

    • Click the desired directory in the Navigation bar, and select file from the drop-down list:

      navigation bar
  2. If the file type is registered, the file opens silently in PyCharm's editor.

    If the file type is registered under the category Files opened in associated applications, it will be opened in its associated application, rather than in the PyCharm editor. By default, PyCharm suggests a number of such file types, for example .doc, .chm, or .pdf.

    If the file type is unknown, PyCharm suggests to choose whether you want to register a new file type, or open such file in its associated application. Specify your choice in the Register New File Type Association dialog:

    register-new-file-type.png

    You can register the required file types in Settings | Editor | File Types.

Open external files

Do one of the following:

  • Choose File | Open from the main menu and select the desired file in the dialog that opens.

  • Drag the required file from the Explorer (Windows), File Browser (Linux), orFinder and drop it to the editor. The file opens for editing in a new tab.

Reopen a file

  • To open a recently opened file, select View | Recent Files from the main menu or press Ctrl+E. Then select the desired file from the Recent Files popup, that opens.

    py_recentFiles.png
  • To open a recently updated file, from the main menu, choose View | Recently Changed Files. Then select the desired file from the Recently Edited Files popup, that opens.

Open a file in a separate PyCharm window

Do one of the following:

  • Drag and drop an editor tab outside of the current PyCharm window.

  • Press Shift+F4 for a file selected in the Project tool window.

  • Shift + mouse double click on a file name in the Project tool window.

Last modified: 09 October 2024