简体   繁体   中英

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 .

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. 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.

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.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM