Tag: 压痕

IntelliJ Scala Plugin的case class indentation是荒谬的

当一个案例类有很多领域,他们的名字很长,通常是一个好主意,每行写每个领域,如: case class Person ( name: String, age: Int ) 这与C / C ++ struct定义类似,即使案例类变得更大也是完全可读的。 但IntelliJ IDEA的默认Scala插件会自动更改缩进: case class Person ( name: String, age: Int ) 这对我来说很奇怪,但Scala风格指南没有提及任何有关case class indentation的内容。 我找不到任何可以改变这种行为的IDE设置。 有没有一个select,使自动缩进像上面描述的方式工作,或禁用自动缩进案例类?

如何使纳米中的制表符4个空格而不是8个空格?

当我在nano编辑器中按下TAB键时,光标将跳转到8个空格,如下所示: def square(x): return x * x def cube(y): return y * y * y 我怎样才能将制表符宽度设置为4空格来显示,如下所示: def square(x): return x * x def cube(y): return y * y * y