PHPStorm:将文件类型添加到“新"对话框 [英] PHPStorm : Add file type to the 'new' dialog

查看:252
本文介绍了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.

这篇关于PHPStorm:将文件类型添加到“新"对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆