Skip to content

Instantly share code, notes, and snippets.

@aamedina
Created June 12, 2014 14:59
Show Gist options
  • Select an option

  • Save aamedina/943ba702020b5e1cb16e to your computer and use it in GitHub Desktop.

Select an option

Save aamedina/943ba702020b5e1cb16e to your computer and use it in GitHub Desktop.
(defun current-font-height ()
(cdr (assoc :height (face-all-attributes 'default))))
(defun set-font-height! (height)
(set-face-attribute 'default nil :height height))
(defun increase-font-height ()
(interactive)
(set-font-height! (+ (current-font-height) 5)))
(defun decrease-font-height ()
(interactive)
(set-font-height! (- (current-font-height) 5)))
(global-set-key (kbd "C-+") 'increase-font-height)
(global-set-key (kbd "C--") 'decrease-font-height)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment