PyCharm provides a temporary editor. You can create a text or a piece of code for search or exploration purposes.
In this section:
Creating scratches
- Do one of the following:
- On the main menu, choose
- Press Ctrl+Shift+Alt+Insert
- Select the language of the future scratch from the list that PyCharm suggests. PyCharm creates a temporary editor tab.
- Type the desired code.
Important notes about scratches
Note the following:
- The scratch code in scripting languages is executable: you can run and debug it.
- Local history for scratch files is supported.
- It is possible to perform clipboard operations with scratch files.
- The scratch files are stored under PyCharm home, in the directory
config/scratches
- To observe the available scratch files, do one of the following:
- Choose Scratches view in the Project tool window:
- Press Alt+F1 and choose Scratches (Navigating Between IDE Components).
- Choose Scratches view in the Project tool window:
Closing scratches
To close a scratch file, just click on the editor tab. Refer to the section Closing Files in the Editor for details.
Deleting scratches
To delete a scratch file, follow these steps:
- Switch to the Scratches view of the project tool window.
- Under the
Scratches
pseudo-folder, right-click the scratch file to be deleted, and choose Delete on the context menu. - Confirm deletion.