有没有更加readable的对齐解决方案?

可以自动对齐成这样

type_a            _a;
type_type_b       _b;
type_type_type_c  _c;

这应该不算个伪需求,看到很多c库代码这样写了,
加上重度使用pattern match的某些语言如果能根据 => 来对齐会很好看

Fixpoint evenb (n:nat) : bool :=
  match n with
  | O        => true
  | S O      => false
  | S (S n') => evenb n'
  end.

难道大家都是手动space/tab对齐的吗

如果用 evil 的话有个 GitHub - edkolev/evil-lion: Evil align operator

2 个赞

这个好厉害,还是第一次听说,我用spacemacs应该就是它了!

是的,我是自己抄了一遍 spacemacs,他里面用哪些 packages 我都有点印象 spacemacs/packages.el at develop · syl20bnr/spacemacs · GitHub 在这

1 个赞

M-x align-regexp

1 个赞

smart-align

2 个赞