简体   繁体   English

如何在IntelliJ Idea中更改字符串拆分样式?

[英]How can I change string splitting style in IntelliJ Idea?

I want to change string splitting style. 我想改变字符串分割方式。 How can I do that? 我怎样才能做到这一点? eq. EQ。 Now: 现在:

String myVar = "Some " +
                  "text";

What I want: 我想要的是:

String myVar = "Some " 
                  + "text";
  1. Go to Preferences 转到首选项
    • + , on the Mac + 在Mac上
    • Ctrl + Alt + S on Windows/Linux 在Windows / Linux上按Ctrl + Alt + S.
  2. Select Editor -> Code Style -> Java 选择编辑器 - >代码样式 - > Java
  3. Select the Wrapping and Braces tab 选择“ 环绕和大括号”选项卡
  4. Tick "Operation sign on the next line" under "Binary expressions" 勾选 二进制表达式”下的 下一行操作符号

IntelliJ设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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