* Emacs configuration ** Configure ~use-package~ #+BEGIN_SRC emacs-lisp (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) (setq use-package-always-ensure t use-package-verbose t) (require 'use-package) #+END_SRC ** Set up my personal keymap I set it up early so I can use it in ~use-package~ calls immediately. #+BEGIN_SRC emacs-lisp (defvar gpolonkai/pers-map (make-sparse-keymap) "My own, personal, keymap!") (define-prefix-command 'gpolonkai/pers-map) (define-key ctl-x-map "t" 'gpolonkai/pers-map) #+END_SRC ** I really don’t want to type more than I really must… #+BEGIN_SRC emacs-lisp (defalias 'yes-or-no-p 'y-or-n-p) #+END_SRC * Set personal information ** Who am I? Where am I? #+BEGIN_SRC emacs-lisp (setq user-full-name "Gergely Polonkai" user-mail-address "gergely@polonkai.eu" calendar-latitude 47.4 calendar-longitude 19.0 calendar-location-name "Budapest, Hungary") #+END_SRC * Add ~lisp/~ to ~load-path~ #+BEGIN_SRC emacs-lisp (add-to-list 'load-path (expand-file-name (convert-standard-filename "lisp/") user-emacs-directory)) #+END_SRC * UI preferences ** Tweak window chrome Turn off the scroll bar (that’s why Nyan-cat is here), the toolbar (I don’t really use it), and the menu bar (I rarely use it, and in those rare occasions I can simply turn it on.) Also, maximise the frame. #+BEGIN_SRC emacs-lisp (tool-bar-mode 0) (menu-bar-mode 0) (when window-system (scroll-bar-mode -1)) (set-frame-parameter nil 'fullscreen 'maximized) #+END_SRC ** Set the default font and configure font resizing #+BEGIN_SRC emacs-lisp (set-face-attribute 'default t :font "Hack-10") (set-frame-font "Hack-10" nil t) #+END_SRC * Set up global minor modes provided by Emacs ** Pretty lambdas Because we can. #+BEGIN_SRC emacs-lisp (global-prettify-symbols-mode t) #+END_SRC * ~use-package~ packages ** Highlight the current line #+BEGIN_SRC emacs-lisp (use-package hl-line :config (when window-system (global-hl-line-mode))) #+END_SRC ** Hide certain modes from the mode line #+BEGIN_SRC emacs-lisp (use-package diminish :defer t) #+END_SRC