In Emacs, how to line up equals signs in a series of initialization statements?

前端 未结 3 1843
-上瘾入骨i
-上瘾入骨i 2020-12-13 09:37

I saw this somewhere, but cannot find it now. Is there a built-in function in emacs, or does someone have elisp, to line up all the equals signs in a series of inititializa

3条回答
  •  北海茫月
    2020-12-13 10:09

    This is in response to harpo's comment to ShreevatsaR's answer:

    The only problem with this is that it "tabifies" the output, which is probably not what you want. Do you know any way to prevent this?

    Here's what I did to resolve that issue:

    ;; Align with spaces only
    (defadvice align-regexp (around align-regexp-with-spaces)
      "Never use tabs for alignment."
      (let ((indent-tabs-mode nil))
        ad-do-it))
    (ad-activate 'align-regexp)
    

提交回复
热议问题