<p>We discuss the packages installed in the second of three files that
make up my emacs config.</p>
<pre class="elisp"><code>;;; init-base.el ---  The basics
;;; Commentary:
;;; Packages for my personal and work laptop, but not termux.

;;; Code:

;;;;;;;;;;;;;;;
;;; Writing ;;;
;;;;;;;;;;;;;;;

;; Focused writing mode
(use-package olivetti
  :hook (olivetti-mode . typewriter-mode-toggle)
  :bind (&quot;C-x C-w&quot; . olivetti-mode)
  :custom (olivetti-body-width 64)
  :config
      (defvar-local typewriter-mode nil
      &quot;Typewriter mode, automatically scroll down to keep cursor in
      the middle of the screen. Setting this variable explicitly will
      not do anything, use typewriter-mode-on, typewriter-mode-off
      and typewriter-mode-toggle instead.&quot;)
      (defun typewriter-mode-on()
      &quot;Automatically scroll down to keep cursor in the middle of screen.&quot;
        (interactive)
        (setq-local typewriter-mode t)
        (centered-cursor-mode +1))
      (defun typewriter-mode-off()
      &quot;Automatically scroll down to keep cursor in the middle of screen.&quot;
        (interactive)
        (kill-local-variable &#39;typewriter-mode)
        (centered-cursor-mode -1))
      (defun typewriter-mode-toggle()
        &quot;Toggle typewriter scrolling mode on and off.&quot;
        (interactive)
        (if typewriter-mode (typewriter-mode-off) (typewriter-mode-on))))

(use-package centered-cursor-mode)

;; Check for weasel words and some other simple rules
(use-package writegood-mode
  :bind (&quot;C-c g&quot; . writegood-mode))

;; spellchecking
(use-package flyspell-correct
  :after flyspell
  :bind (:map flyspell-mode-map
              (&quot;C-;&quot; . flyspell-correct-wrapper)))

;; show correction options in a popup instead of the minibuffer
(use-package flyspell-correct-popup
  :after (flyspell-correct))

;online thesaurus service from powerthesaurus.org
(use-package powerthesaurus)

;; WordNet Thesaurus replacement
(use-package synosaurus
  :custom (synosaurus-choose-method &#39;default)
  :config (when window-system
            (if (string= (x-server-vendor) &quot;Microsoft Corp.&quot;)
              (setq synosaurus-wordnet--command &quot;C:\\Program Files (x86)\\WordNet\\2.1\\bin\\wn.exe&quot;))))

;; WordNet search and view
(use-package wordnut
  :bind (&quot;C-c s&quot; . wordnut-search)
  :config (when window-system
            (if (string= (x-server-vendor) &quot;Microsoft Corp.&quot;)
                (setq wordnut-cmd &quot;C:\\Program Files (x86)\\WordNet\\2.1\\bin\\wn.exe&quot;))))

;; fill and unfill with the same key
(use-package unfill
  :bind (&quot;M-q&quot; . unfill-toggle))

;; Markdown...
(use-package markdown-mode)

;;;;;;;;;;;;;;
;;; Coding ;;;
;;;;;;;;;;;;;;

;; Syntax checking
(use-package flycheck
  :diminish
  :init (global-flycheck-mode))

(use-package flycheck-popup-tip
  :after (flycheck)
  :hook (flycheck-mode-hook . flycheck-popup-tip-mode))

;; Web design
(use-package emmet-mode
  :hook (sgml-mode . emmet-mode) ;; Auto-start on any markup modes
        (css-mode . emmet-mode)) ;; enable Emmet&#39;s css abbreviation.

(use-package sass-mode)

(use-package web-mode)

;; Python
(use-package python
  :mode (&quot;\\.py\\&#39;&quot; . python-mode)
  :interpreter (&quot;python&quot; . python-mode))

;; highlight todo items everywhere
(use-package hl-todo
  :straight (:host github :repo &quot;tarsius/hl-todo&quot;)
  :custom (hl-todo-keyword-faces
             `((&quot;FIXME&quot; error bold)
             (&quot;STUB&quot; error bold)
             (&quot;REPLACETHIS&quot; error bold)
             (&quot;REVISIT&quot; error bold)))
          (hl-todo-exclude-modes nil)
  :config (add-to-list &#39;hl-todo-include-modes &#39;org-mode)
  :init (global-hl-todo-mode))

;; git
(use-package magit)

(use-package git-timemachine)

;; rest APIs via org source block
(use-package ob-restclient)

;;; END ;;;

(provide &#39;init-base)
;;; init-base.el ends here</code></pre>
