bmk*_*bmk 4 emacs haskell haskell-mode
我目前正在使用Emacs作为我开发Haskell代码的主要IDE,到目前为止我真的很满意.但目前我无法弄清楚一个小细节,即如何自定义缩进宽度为4而不是2.
目前,我已经把上haskell-indentation的haskell-mode,但我想不出我有设置自定义压痕宽度什么变化.到目前为止,我已尝试设置,'(haskell-indent-spaces 4)但这似乎没有任何影响......
请提前获取任何帮助!
haskell-indentation-mode 提供几个旋钮,您可以转向自定义缩进偏移:
haskell-indentation-layout-offset
haskell-indentation-starter-offset
haskell-indentation-left-offset
haskell-indentation-ifte-offset
haskell-indentation-where-pre-offset
haskell-indentation-where-post-offset
Run Code Online (Sandbox Code Playgroud)
所有这些都是自定义变量,因此您可以执行M-x customize-option RET和自定义任何这些变量,或者如果您更喜欢以编程方式:
(custom-set-variables
;; Customization related to indentation.
'(haskell-indentation-layout-offset 4)
'(haskell-indentation-starter-offset 4)
'(haskell-indentation-left-offset 4)
'(haskell-indentation-where-pre-offset 4)
'(haskell-indentation-where-post-offset 4)
)
Run Code Online (Sandbox Code Playgroud)