Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

z1haze's avatar

PHPStorm Create new file with directory

How is that Jeffrey, in PHPStorm, is able to create files where a little type bar pops up at the bottom of the screen, and says something like 'enter path to new file' or something like that? I have just got version 9 and I cant figure it out.

0 likes
9 replies
z1haze's avatar

@EHLOVader in that screencast it does not show how he creates the files that way in phpstorm. I know how to you it in sublime, but hes not using sublime. H'es using php storm. And the methods of creating files in this screencast are not the methods that he always uses to create files.

lancebutler2's avatar

Navigate > Jump to Navigation Bar. Is that what you're talking about? You can map it to anything. On my mac, I mapped it to command+up. From there you could navigate with the arrow keys (or remember all menus can be filtered down by typing letters) and then File > New (I have mapped to command+n) on whatever directory you want to add a new file in.

EHLOVader's avatar

@z1haze I think you are mistaken but to clarify can you link a screencast which shows what you are talking about.

@lancebutler2 That jump to navigation bar is done in the screencast I linked, part of how to be awesome in PHPStorm. He undocks it so it floats, it is pretty slick.

davorminchorov's avatar

When you are creating a new file, if you write the directory name/file name.extension, it will automatically create the directory and add the file inside of it.

1 like
EHLOVader's avatar

@Ruffles I also think it may be worth noting, if you call create new file from an open file, or selected directory in the sidebar/navigation it will create that new file or missing subdirectory structure relative to that targeted file.

This is something where I wish there was an easy way to navigate to project root, or reference it in the path you type out.

1 like
ian_h's avatar

On windows, you can use Shift+Alt+Num7. This should highlight the "breadcrumbs" where you can easily back up to the root of the project (or your chosen subdir if easy enough) before hitting alt+insert to create a new file =)

Cheers..

Ian

3 likes

Please or to participate in this conversation.