Create a new File from the Navigation Bar

A fast way to add a new file to your project, without touching the mouse.

The Problem

How can I create a file if I've turned off the Project tool window? Let the Navigation Bar be your one-stop replacement for the Project Tool window!

The Solution

In your JetBrains IDE, invoke the "Navigation Bar" with ⌘↑ (macOS) / Alt+Home (Windows/Linux)

You can now:

  • Use the cursor keys to get to the target directory
  • Speed search to select any subdirectories

arrow-keys.png

Once you have selected your target, use ⌘N (macOS) / Alt+Insert (Windows/Linux) to bring up the new file dialog. Just like in the Project tool window, the new file is opened after creation.

Also like the Project tool window, your selection doesn't have to be on a directory. If you're on a file, the new file will be created as a sibling. This is particularly useful in the common case of creating a new file in the current directory:

  • Activating the navigation bar highlights the current file.
  • Immediately press New ⌘N (macOS) / Alt+Insert (Windows/Linux)

In summary, after two key combos, you have a new sibling file, with no permanent file tree visible and no popups to close afterward. That's what getting in the flow is about.

new-file.png


Related Resources

Find in Path with the Navigation Bar
Find in Path with the Navigation Bar
Use the Navigation bar and Find in File together and be faster than all of your team members.
Speed search with the Navigation Bar
Speed search with the Navigation Bar
Use the keyboard abbreviations to quickly find what you're looking for in the Navigation bar.
Open any file from the Navigation Bar
Open any file from the Navigation Bar
Using just the keyboard, browse and open files in your project.