且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHPStorm:将文件类型添加到“新"对话框

更新时间:2023-02-08 19:36:56

使用New菜单中的 Stylesheet 条目-您可以在其中指定要创建的文件:CSS/Sass/SCSS/Less /手写笔.

Use Stylesheet entry in New menu -- there you can specify what file to create: CSS/Sass/SCSS/Less/Stylus.

这种分组是有目的的-使New菜单与某些设置相比更紧凑,尤其是在用户自己的模板很少的情况下,这种方法变得很大.

Such grouping done on purpose -- to make New menu more compact as on some setups especially where user has quite few own templates it's way to big.

另一种方法是创建自己的Sass模板,而不是编辑预定义的条目.这样,它将在New菜单中作为单独的条目列出.

Alternative approach is to create your own Sass template instead of editing pre-defined entry. This way it will be listed as separate entry in New menu.

要澄清问题,

如果在New菜单中选择Stylesheet条目,则将使用默认的Sass File模板(可以编辑).逻辑与PHP Trait模板相同-不会直接在New菜单中列出,而是可以通过PHP Class条目进行访问,您可以在其中选择要创建的对象(类/接口/特性).

The default Sass File template (which you can edit) will be used if you choose Stylesheet entry in New menu. The logic is the same as with PHP Trait template -- it's not listed in New menu directly but accessible via PHP Class entry where you can choose what object (Class/Interface/Trait) to create.