配置 Emacs 行号右对齐显示

Posted asvblog

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置 Emacs 行号右对齐显示相关的知识,希望对你有一定的参考价值。

目录

  1. 配置文件
  2. 源码释义

配置文件

(global-linum-mode t)
(defadvice linum-update-window (around linum-dynamic activate)
  (let* ((w (length (number-to-string
             (count-lines (point-min) (point-max)))))
     (linum-format (concat "%" (number-to-string w) "d ")))
   ad-do-it))

源码释义

  1. (global-linum-mode t) 的含义为,在 Emacs 上的所有 buffers 中开启 linum-mode ,以显示行号。

以上是关于配置 Emacs 行号右对齐显示的主要内容,如果未能解决你的问题,请参考以下文章