Quick edits with PhpStorm 8: Working with single files without a project & built-in Scratch plugin
Quick changes to a single file (like a configuration file or just some non-project file) require quick solutions, and creating a full PhpStorm project seems like overkill to change a line or two. The same applies to creating quick drafts.
With a clear understanding of the pain involved in such workflows, we are glad to bring you two major changes improving quick edits in the upcoming PhpStorm 8:
- Working with single files without a project
- Built-in Scratch plugin to create quick temporary drafts
Working with single files without creating a project
While it was always possible to open any file in the editor when working within a project, there was one thing missing: opening a single file without creating an entire project.
But with PhpStorm 8, quick changes in a single file are now possible! Just open it with Open action from the Welcome screen:
Editing an individual file should be a familiar experience, and also lightning-fast, with code highlighting, inspections, basic code completion, and even debugging and deployment.
Windows users can also take advantage of associating file types with PhpStorm, so that opening a file from the file manager automatically launches PhpStorm. A standalone file will just be opened with no project created; and if a file is a part of some project, that project will be opened.
Built-in Scratch plugin for quick drafts
The IntelliJ Scratch plugin is now available out of the box in PhpStorm, meaning that you can easily create scratches—temporary draft files for any kind of edits you need, be it plain text or code.
The Create Scratch File action is available from the Tools menu or via the Ctrl+Alt+Shift+Ins shortcut (or Cmd-Shift-N on Mac OS X).
You will be prompted to specify the language for the new scratch file. This is needed to take advantage of all the language features provided by IDE.
After you select a language, the scratch file is created. Paste the code/text and enjoy all the familiar features PhpStorm brings into the temporary scratch file, including highlighting, refactorings, completion, etc.
If it so happens that you need to save your scratch file, just select File | Save as… (or press Ctrl+Shift+S / Cmd-Shift-S):
Scratches are also accessible via the Recent Files action (Ctrl+E / Cmd-E).
Develop with pleasure!
– JetBrains PhpStorm Team
Subscribe to Blog updates
Thanks, we've got you!
PhpStorm 2023.2 Beta
In this build, we’ve added new inspections for PHP assertions and revised the integration with third-party quality tools.
PhpStorm 2023.2 EAP #6
This build brings improvements for generating PHPDocs, support for Laravel Pint, a single point of access to all PHP framework plugins, and much more!
AI Features in PhpStorm: PhpStorm 2023.2 EAP #5
The next EAP build for PhpStorm 2023.2 is now available, and it’s an exciting one! It is the first build to include features leveraging the enormous potential of generative AI and large language models (LLMs). Our Early Access Program (EAP) allows you to try new features from the upcoming PhpStor…
PhpStorm 2023.2 EAP #4
This build includes a bunch of usability improvements, such as abilities to pin Run configurations and sort files by modification time in the Project view. The EAP allows you to try new features from the upcoming PhpStorm version, 2023.2. EAP builds are free to use and you can install them side b…