PHPStorm:将文件类型添加到“新"对话框
我刚刚重新安装了OS X,却忘记了如何在new
对话框中添加文件类型(当您说在项目目录中单击鼠标右键时,选择new并查看其他文件类型的列表).我要添加Sass,目前未在其中列出.当我选择Edit file templates
时,它在那里,但不在初始对话框中.
I've just re-installed OS X and have forgotten how to add a file type to the new
dialog (when you say right click within the project directory, select new and see list of different file types). I want to add Sass, which is currently not listed there. When I select Edit file templates
it is there, but just not in the initial dialog.
有什么主意吗?
使用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.