1
이맥스에서 줄 번호를 설정하려고합니다.
Linum은 잘 작동하지만 두 개의 버퍼를 열면 빈 줄 번호가 사라집니다. Manjaro Linux를 사용합니다. Emacs는 터미널에서 작동합니다. 이맥스 파일에서Emacs - 빈 줄의 줄 번호 없음
코드 :
(add-hook 'find-file-hook (lambda() (linum-mode 1)))
(unless window-system
(add-hook 'linum-before-numbering-hook
(lambda()
(setq-local linum-format-fmt
(let ((w (length (number-to-string
(count-lines (point-min) (point-max))))))
(concat "%"(number-to-string w) "d"))))))
(defun linum-format-func (line)
(concat
(propertize (format linum-format-fmt line) 'face 'linum)
(propertize " " 'face 'mode-line)))
(unless window-system
(setq linum-format 'linum-format-func))
내가 그것을 어떻게 해결할 수 있습니까?
참조 : http://stackoverflow.com/a/25082664/2112489 및 HTTP : //emacs.stackexchange을 당신은
"%3d "
대신"%3d"
처럼 서식을 만들고" "
나중에 concatting하여이를 방지 할 수 있습니다 .com/a/4179/2287 아마도 그 중 하나가 적용됩니다. – lawlist