Create new file phpstorm shortcut
To create a new file shortcut in PHPStorm, you can follow these steps:
- Open PHPStorm and navigate to the "Settings" menu by clicking on the gear icon in the top right corner of the screen or by pressing
Ctrl + Shift + Alt + S
(Windows/Linux) orCmd + Shift + Alt + S
(Mac). - In the "Settings" window, scroll down and click on "Editor" in the left-hand menu.
- In the "Editor" section, click on "File and Code Templates" in the right-hand menu.
- In the "File and Code Templates" section, click on the "Manage" button next to "File Templates".
- In the "File Templates" window, click on the "New" button to create a new file template.
- In the "New File Template" window, enter a name for your new file template in the "Name" field. For example, you could name it "My New File".
- In the "Template" field, enter the code that you want to use as the template for your new file. For example, you could enter a basic PHP file template with a
<?php
tag and a?>
tag. - Click "OK" to create the new file template.
- To assign a shortcut to your new file template, click on the "Keymap" menu in the top right corner of the screen or press
Ctrl + Shift + Alt + S
(Windows/Linux) orCmd + Shift + Alt + S
(Mac). - In the "Keymap" window, scroll down and click on "File" in the left-hand menu.
- In the "File" section, click on the "New" button next to "New File".
- In the "New File" window, select your new file template from the "Template" dropdown menu.
- Click "OK" to assign the shortcut.
Now, whenever you press the shortcut key, PHPStorm will create a new file using your custom file template.
Note: You can also create a shortcut for a specific file type, such as a PHP file or a JavaScript file, by selecting the file type from the "File Type" dropdown menu in the "New File" window.