低-level@DavidS好问题。我在“”上写了一个答案。研究答案是很有教育意义的。但是,当你定制了一些人脸时,这种解决方案不起作用,例如,使用独特的字体、倾斜等。这些人脸将保留原来的大小,你必须单独设置。许多高级emacs用户不喜欢使用定制系统,因为它

低-level@DavidS好问题。我在“”上写了一个答案。研究答案是很有教育意义的。但是,当你定制了一些人脸时,这种解决方案不起作用,例如,使用独特的字体、倾斜等。这些人脸将保留原来的大小,你必须单独设置。许多高级emacs用户不喜欢使用定制系统,因为它,emacs,fonts,emacs-faces,Emacs,Fonts,Emacs Faces,低-level@DavidS好问题。我在“”上写了一个答案。研究答案是很有教育意义的。但是,当你定制了一些人脸时,这种解决方案不起作用,例如,使用独特的字体、倾斜等。这些人脸将保留原来的大小,你必须单独设置。许多高级emacs用户不喜欢使用定制系统,因为它容易出错,并且混合了所有定制。最好将您的自定义分解为单独的.el文件,并从init.el加载它们,然后将您的模式自定义添加为每个文件中的elisp代码。参见上文怀远的回答,了解如何通过elisp.FWIW设置字体,emacs维护人员(可能是em


低-level@DavidS好问题。我在“”上写了一个答案。研究答案是很有教育意义的。但是,当你定制了一些人脸时,这种解决方案不起作用,例如,使用独特的字体、倾斜等。这些人脸将保留原来的大小,你必须单独设置。许多高级emacs用户不喜欢使用定制系统,因为它容易出错,并且混合了所有定制。最好将您的自定义分解为单独的.el文件,并从init.el加载它们,然后将您的模式自定义添加为每个文件中的elisp代码。参见上文怀远的回答,了解如何通过elisp.FWIW设置字体,emacs维护人员(可能是emacs的“高级”用户)使用自定义系统:鼠标滚轮的键绑定不起作用,我有版本
GNU emacs 24.3.1(x86_64-pc-linux-GNU,GTK+version 3.10.7)
这些将是
(全局设置键(kbd)”“文本比例增加”(全局设置键(kbd)”)“文本比例减少)
在我的emacs(25)版本中,这是完美的!非常感谢。如果我重新启动emacs,更改不会持续。有一个“保存选项”选项。。。
;; my colour theme is whateveryouwant :)
(require 'color-theme)
(color-theme-initialize)
(color-theme-whateveryouwant)

(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "unknown" :family "DejaVu Sans Mono"))))
 '(font-lock-comment-face ((t (:foreground "darkorange4"))))
 '(font-lock-function-name-face ((t (:foreground "navy"))))
 '(font-lock-keyword-face ((t (:foreground "red4"))))
 '(font-lock-type-face ((t (:foreground "black"))))
 '(linum ((t (:inherit shadow :background "gray95"))))
 '(mode-line ((t (nil nil nil nil :background "grey90" (:line-width -1 :color nil :style released-button) "black" :box nil :width condensed :foundry "unknown" :family "DejaVu Sans Mono")))))
(defun fontify-frame (frame)
  (set-frame-parameter frame 'font "Monospace-11"))

;; Fontify current frame
(fontify-frame nil)
;; Fontify any future frames
(push 'fontify-frame after-make-frame-functions) 
(global-set-key [C-kp-add] 'text-scale-increase)

(global-set-key [C-kp-subtract] 'text-scale-decrease)
(set-default-font "Monaco 14")
`C-+` increases font size
`C--` Decreases font size
;; font sizes
(global-set-key (kbd "s-=")
                (lambda ()
                  (interactive)
                  (let ((old-face-attribute (face-attribute 'default :height)))
                    (set-face-attribute 'default nil :height (+ old-face-attribute 10)))))

(global-set-key (kbd "s--")
                (lambda ()
                  (interactive)
                  (let ((old-face-attribute (face-attribute 'default :height)))
                    (set-face-attribute 'default nil :height (- old-face-attribute 10)))))
(defhydra hydra-zoom (global-map "<f2>")
  "zoom"
  ("<kp-add>" text-scale-increase "in")
  ("+" text-scale-increase "in")
  ("-" text-scale-decrease "out")
  ("<kp-subtract>" text-scale-decrease "out")
  ("0" (text-scale-set 0) "reset")
  ("<kp-0>" (text-scale-set 0) "reset"))
(global-set-key (kbd "<C-wheel-up>") 'text-scale-increase)
(global-set-key (kbd "<C-wheel-down>") 'text-scale-decrease)
(set-face-attribute 'default nil :font "Monaco-16" )
(set-face-attribute 'default nil :font FONT )

(set-frame-font FONT nil t)
(set-face-attribute 'default nil :font "Monaco-16" )
(defun set-font-size ()
    "Set the font size."
  (interactive)
  (set-face-attribute
   'default nil :height
   (string-to-number
    (read-string "Font size: " (number-to-string (face-attribute 'default :height nil))))))