[英]Adding Editor Style in IntelliJ WebStorm
I recently started working on an Angular project in WebStorm and would like to change the editor style to add more spaces on formatting code with CTRL + ALT + L .我最近开始在 WebStorm 中处理一个 Angular 项目,并想更改编辑器样式以使用CTRL + ALT + L在格式化代码上添加更多空间。
Currently, when I format my code, all spaces are gone.目前,当我格式化代码时,所有空格都消失了。 Here are some places,这里有一些地方,
But I need to have a one indentation between the {}
or method parenthesis.但我需要在{}
或方法括号之间有一个缩进。 What I expect is as below:我的期望如下:
Please help me create this style for Angular / TypeScript development editor.请帮我为 Angular / TypeScript 开发编辑器创建这种样式。 Thanks in advance.提前致谢。
For the ones out there trying to add formatting to their code, here I will post my own answer.对于那些试图向他们的代码添加格式的人,我将在这里发布我自己的答案。 You can set custom spacing and styling into your code in intellij IDEs.您可以在 Intellij IDE 中将自定义间距和样式设置到您的代码中。
Settings -> Editor -> Code Style设置 -> 编辑器 -> 代码样式
Navigate here and you can define custom styling and spacing specific to your programming language and can even export the created styles as an XML file.在此处导航,您可以定义特定于您的编程语言的自定义样式和间距,甚至可以将创建的样式导出为 XML 文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.