配置 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 ,以显示行号。

猜你喜欢

转载自www.cnblogs.com/asvblog/p/11456142.html