;; sussman device configuration ;; Uncomment this to install packages if needed. ;; (progn ;; (package-refresh-contents) ;; (dolist (pkg '(auctex ;; calmer-forest-theme ;; flycheck ;; flycheck-languagetool ;; smart-mode-line ;; writegood-mode)) ;; (package-install pkg)) ;; (message "All packages installed!")) (require 'package) ;; Any add to list for package-archives (to add marmalade or melpa) goes here (add-to-list 'package-archives '("MELPA" . "http://melpa.org/packages/")) (package-initialize) (load-theme 'calmer-forest t) (smart-mode-line-enable t) (global-hl-line-mode t) (add-hook 'after-init-hook #'global-flycheck-mode) ;; Disable annoying things (tool-bar-mode 0) (menu-bar-mode 0) (scroll-bar-mode 0) (put 'narrow-to-region 'disabled nil) (fset 'yes-or-no-p 'y-or-n-p) ;; Text Linting and Spell Checking ;; M-x flycheck-list-errors to fix spelling (add-hook 'LaTeX-mode-hook 'flyspell-mode) (add-hook 'LaTeX-mode-hook 'writegood-mode) ;; navigate by words instead of letters when selecting a file path after eg C-x f (require 'ido) ;; Prevent Flycheck warning! (ido-mode 1) (setq ido-enable-flex-matching t) (require 'savehist) ;; prevent flycheck error (savehist-mode 1) (setq savehist-additional-variables '(kill-ring)) ;; Paste prepared texts. ;; I've tried abbrev-mode, yasnippet and TextExpander. This is what works for me. (defvar my-snippets '(("bang" . "#!/usr/bin/env bash\n\nset -o errexit -o nounset -o pipefail\n"))) (defun paste (name) "Insert snippet with NAME." (interactive (list (completing-read "Paste Text: " (mapcar 'car my-snippets)))) (insert (cdr (assoc name my-snippets)))) ;; Enable connecting with emacsclient(1) (server-start) (provide '.emacs) ;; prevent flycheck error ;;; .emacs ends here