   (general-def
     "s-<f7>" #'emms-previous
     "s-<f8>" #'emms-pause
-    "s-<f9>" #'emms-next))
+    "s-<f9>" #'emms-next)
+
+  :config
+  ;; initialize emms
+  (require 'emms-setup)
+  (emms-all)
+  (emms-default-players)
+  (setq emms-source-file-default-directory "~/Music/"
+        emms-browser-covers 'emms-browser-cache-thumbnail) ; EMMS auto-resizes "cover.jpg" in album dir
+
+  ;; repeat map for emms commands
+  (defvar t/emms-repeat-map
+    (let ((map (make-sparse-keymap)))
+      (define-key map [left] 'emms-seek-backward)
+      (define-key map [right] 'emms-seek-forward)
+      (define-key map "p" 'emms-previous)
+      (define-key map "P" 'emms-pause)
+      (define-key map "n" 'emms-next)
+      map)
+    "Keymap to repeat emms seeking through track sequences `C-c m <left>'.
+Used in repeat mode.")
+  (dolist (command '(emms-seek-backward emms-seek-forward))
+    (put command 'repeat-map 't/emms-repeat-map)))
 
 ;;;;; Email
 
 ;; view email; requires installing mu (maildir-utils on some distros) first
+;; Settings necessary for sending mail are located in local.el
+;; Copy TEMPLATE-local.el to local.el and fill in information
 (use-package mu4e
   :load-path  "/usr/local/share/emacs/site-lisp/mu/mu4e" ; macOS-specific?
   :defer t

(use-package evil-collection
  :straight t
  :after evil
  :config
  (evil-collection-init))

;;;;; Editor settings

;; set macOS modifier keys
(when (eq system-type 'darwin)
  ;; command is switched with control
  (setq mac-right-option-modifier 'meta
        mac-right-command-modifier 'super
        mac-command-modifier 'super
        mac-control-modifier 'control))

;; don't fully display long lines
(setq-default truncate-lines t)

;; acceptable line length
(setq-default fill-column 80)

;; never use tabs
(setq-default indent-tabs-mode nil)

;; scroll a long line individually like nano, instead of vertically shifting the whole document
(setq auto-hscroll-mode 'current-line)

(setq scroll-preserve-screen-position t)

;; holding shift during navigation doesn't expand selection
(setq shift-select-mode nil)

;; scroll horizontally
(put 'scroll-left 'disabled nil)
(put 'scroll-right 'disabled nil)

;; scrolling lines is animated to look smoother
;; (pixel-scroll-mode -1)

;; highlight and auto-create matching parentheses
(show-paren-mode 1)
(electric-pair-mode)

;; display line numbers in programming buffers only
(defun t/line-number ()
  "Turn on line numbers except in minibuffer."
  (unless (minibufferp)
    (display-line-numbers-mode)))

(dolist (hook '(conf-mode-hook
                prog-mode-hook))
  (add-hook hook #'t/line-number))

;; highlight indentation
(use-package highlight-indent-guides
  :straight t
  :hook (prog-mode . highlight-indent-guides-mode)
  :bind ("C-c t i" . highlight-indent-guides-mode)
  :config
  (setq highlight-indent-guides-method 'character))

;; shorten repeatable commands
(repeat-mode 1)
(setq repeat-keep-prefix t)

;;;;; Text manipulation


;; colorize colors specified in code
(use-package rainbow-mode
  :straight t
  :defer t

  :init
  (t/toggle-def "r" #'rainbow-mode))
