Early Access Program Features Releases

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:

workingWithSingleFile

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.

install_assoc

Built-in Scratch plugin for quick drafts

scratch_language

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.

scratch_edit

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):

scratch_save

Scratches are also accessible via the Recent Files action (Ctrl+E / Cmd-E).

Check out recent PhpStorm 8 Public Preview to try these features out! We look forward to hearing your thoughts in the issue tracker, in the comments below or in our forums!

Develop with pleasure!
– JetBrains PhpStorm Team

image description