代码之家  ›  专栏  ›  技术社区  ›  ByeBye

Intellij格式。与正文缩进不同的Break方法

  •  1
  • ByeBye  · 技术社区  · 7 年前

    如何设置格式化程序以实现此格式化:

    List<Person> getPersonsByFilters(final UUID personId, final Filter filter) throws NotFoundException {
        //logic    
    }
    

    之后

    List<Person> getPersonsByFilters(final UUID personId, 
            final Filter filter) throws NotFoundException {
        //logic    
    }
    

    在方法定义换行之后,我想要一个更大的缩进( +4

    1 回复  |  直到 7 年前
        1
  •  2
  •   Andrew    7 年前
    1. 编辑 - - 包装和支架 .

    2. 设置选项“Wrap if long”。

    3. 取消勾选“多行时对齐”框。

    enter image description here

    enter image description here enter image description here

    之后:

    enter image description here


    编辑:

    我把“连续缩进”设置为 8

    enter image description here