How to Add a New File Type to the "New" Dialogue

Hi, It used to be called "edit file templates" But now it has been moved from the 
s"New" menu. How do I add a Blade file type to the "New" drop down. 

Second Question: There used to be a wrench icon on the main tool bar which took you to settings. That has been removed and I can not see it under "customise menu and tool bar".  I would really like it back?

Many Thanks !

7 comments
Comment actions Permalink

Hi there,

What PhpStorm version is that?

Hi, It used to be called "edit file templates" But now it has been moved from the s"New" menu. How do I add a Blade file type to the "New" drop down.

It is still there for me in 2021.2.2:

In any case: Settings/Preferences | Editor | File and Code Templates

 

Second Question: There used to be a wrench icon on the main tool bar which took you to settings. That has been removed and I can not see it under "customise menu and tool bar". I would really like it back?

Main tool bar? The one with Save and plenty of other icons?

Not using it .. but I've just enabled it and it is still there -- on the very right -- under the cog icon.

With main toolbar disabled (then another mini toolbar appears) it looks like this for me:

Although nothing stops you from adding it there if you want (I've added 3 icons + 2 External Tools):

It is still called "Settings" (at least here on Windows)

1
Comment actions Permalink

Many Thanks for your rapid response!  I'm using 2021.2.2 on Ubuntu.

First of all I found the wrench under the icon on the far RHS.

I also found it under Menus and toolbars, although only using a search. 

How do I get it onto the main the menu? clicking it does nothing, neither does drag and drop. If I click 
"+", "add Action" button I just get another drop down. 

Similarly "Edit file templates " on the drop down "new" is not there. 

However, If I go to Editor > "File Types I can see Blade there. But I can not see any function for adding to the "New" drop down.

Note Blade is not included in the "file & Code Templates" drop down

I appreciate you are using windows but doo you any ideas for me? 

Thanks!!

0
Comment actions Permalink

You are missing screenshots that would illustrate your issues.

How do I get it onto the main the menu? clicking it does nothing, neither does drag and drop. If I click  "+", "add Action" button I just get another drop down.

Screenshot please. Because the "Settings..." action is already on the Main Menu:

If you are asking on "how to add it to a some toolbar":

Then just select it:

I've used direct navigation. You can use search field for locating it.

 

Similarly "Edit file templates " on the drop down "new" is not there.

No idea -- it's there for me as per my original screenshot. Maybe it depends on the context / where that menu is called. A screenshot (or much better a small screencast/video) will help clarifying this.

However, If I go to Editor > "File Types I can see Blade there. But I can not see any function for adding to the "New" drop down.

File Types has nothing to do with File Templates ("File | New..." drop down).

Note Blade is not included in the "file & Code Templates" drop down

PhpStorm does not come with the file template for a Blade. If you need it -- make your own.

0
Comment actions Permalink

Thanks for all your help.

1) I did not describe myself well last message. Let me try again. I would like the wrench to be on the main tool bar if possible,  like it used to be. I do not know how to achieve that.

 

2) I can see "Blade" file type. I would like to have that available to me when I create a new file under the "new" drop down. I don't know how to do that.  
Many Thanks for all your Help!!

 

0
Comment actions Permalink

1) I did not describe myself well last message. Let me try again. I would like the wrench to be on the main tool bar if possible, like it used to be. I do not know how to achieve that.

https://www.jetbrains.com/help/phpstorm/menus-and-toolbars-appearance-settings.html

1. Select the toolbar / menu which you want to edit

2. Select the place where you want that action to be added

3. Click "+"

4. Then "Add action"

5. Now locate the "Settings..." entry (Main Menu | File | Settings...)

 

2) I can see "Blade" file type. I would like to have that available to me when I create a new file under the "new" drop down. I don't know how to do that.

https://www.jetbrains.com/help/phpstorm/using-file-and-code-templates.html#create-new-template

1. Settings (Preferences on MacOS) | Editor | File and Code Templates

2. Click on "+" and proceed from there

0
Comment actions Permalink

Outstanding !! Thank you *very* much!! I got the wrench back on the main toolbar! 

One last question: I created my Blade template, and Storm applies a generic PHP icon to the file type under "new". Ideally I would like to apply the nice icon I see under "Editor > file types" - is this possible? 

0
Comment actions Permalink

I do not think you can do anything here -- looks like the IDE uses last part of the file extension only to determine how to treat the file.

Try Laravel related plugins: they may provide such custom entry (if a File Template is done programmatically via plugin then it can provide custom icon there). "Standard" Laravel plugin does not have such an entry. Perhaps a paid Laravel Idea plugin .. or some another one can do that.

0

Please sign in to leave a comment.