Skip to content

Instantly share code, notes, and snippets.

@textarcana
Last active September 7, 2025 04:03
Show Gist options
  • Save textarcana/4d930ba6f00d20eae9d4eda67e67a050 to your computer and use it in GitHub Desktop.
Save textarcana/4d930ba6f00d20eae9d4eda67e67a050 to your computer and use it in GitHub Desktop.

Revisions

  1. textarcana revised this gist Sep 7, 2025. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions z_add-this-to-dot-emacs.el
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,8 @@
    ;; (package-install pkg))
    ;; (message "All packages installed!"))

    (global-set-key (kbd "TAB") 'hippie-expand)

    (require 'package)
    ;; Any add to list for package-archives (to add marmalade or melpa) goes here
    (add-to-list 'package-archives
  2. textarcana revised this gist Sep 7, 2025. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions latex-setup.sh
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,9 @@ sudo apt -y install ack \
    emacs \
    entr \
    fzf \
    fonts-noto \
    fonts-noto-cjk \
    fonts-noto-extra \
    lolcat \
    luatex \
    pandoc \
  3. textarcana revised this gist Sep 7, 2025. 1 changed file with 9 additions and 4 deletions.
    13 changes: 9 additions & 4 deletions z_add-this-to-dot-emacs.el
    Original file line number Diff line number Diff line change
    @@ -31,6 +31,15 @@
    (put 'narrow-to-region 'disabled nil)
    (fset 'yes-or-no-p 'y-or-n-p)

    ;; Save kill ring forever
    (require 'savehist) ;; prevent flycheck error
    (savehist-mode 1)
    (setq savehist-additional-variables '(kill-ring))
    (setq kill-ring-max most-positive-fixnum) ; Maximum possible integer

    ;; Larger minibuffer history
    (setq history-length most-positive-fixnum)

    ;; Text Linting and Spell Checking
    ;; M-x flycheck-list-errors to fix spelling
    (add-hook 'LaTeX-mode-hook 'flyspell-mode)
    @@ -41,10 +50,6 @@
    (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
  4. textarcana revised this gist Sep 7, 2025. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions latex-setup.sh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@ sudo apt -y install ack \
    chktex \
    cowsay \
    emacs \
    entr \
    fzf \
    lolcat \
    luatex \
  5. textarcana revised this gist Sep 7, 2025. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions z_add-this-to-dot-emacs.el
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,6 @@
    ;; calmer-forest-theme
    ;; flycheck
    ;; flycheck-languagetool
    ;; magit
    ;; smart-mode-line
    ;; writegood-mode))
    ;; (package-install pkg))
    @@ -21,7 +20,8 @@
    (package-initialize)

    (load-theme 'calmer-forest t)
    (smart-mode-line-enable)
    (smart-mode-line-enable t)
    (global-hl-line-mode t)
    (add-hook 'after-init-hook #'global-flycheck-mode)

    ;; Disable annoying things
    @@ -31,6 +31,8 @@
    (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)

  6. textarcana revised this gist Sep 6, 2025. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions z_add-this-to-dot-emacs.el
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@
    ;; calmer-forest-theme
    ;; flycheck
    ;; flycheck-languagetool
    ;; magit
    ;; smart-mode-line
    ;; writegood-mode))
    ;; (package-install pkg))
  7. textarcana revised this gist Sep 6, 2025. 1 changed file with 21 additions and 2 deletions.
    23 changes: 21 additions & 2 deletions z_add-this-to-dot-emacs.el
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@

    ;; sussman device configuration

    ;; Uncomment this to install packages if needed.
    @@ -39,5 +38,25 @@
    (ido-mode 1)
    (setq ido-enable-flex-matching t)

    (provide '.emacs)
    (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
  8. textarcana revised this gist Sep 6, 2025. 1 changed file with 22 additions and 7 deletions.
    29 changes: 22 additions & 7 deletions z_add-this-to-dot-emacs.el
    Original file line number Diff line number Diff line change
    @@ -1,28 +1,43 @@

    ;; 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
    ;; 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)
    (add-hook 'after-init-hook #'global-flycheck-mode)

    ;; Disable annoying things
    (tool-bar-mode 0)
    (menu-bar-mode 0)
    (scroll-bar-mode 0)

    (smart-mode-line-enable)
    (put 'narrow-to-region 'disabled nil)
    (fset 'yes-or-no-p 'y-or-n-p)

    (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)


    ;; code lint
    (add-hook 'after-init-hook #'global-flycheck-mode)
    (provide '.emacs)
    ;;; .emacs ends here
  9. textarcana revised this gist Sep 6, 2025. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions latex-setup.sh
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@ sudo apt -y install ack \
    cowsay \
    emacs \
    fzf \
    lolcat \
    luatex \
    pandoc \
    texlive-latex-base \
  10. textarcana revised this gist Sep 6, 2025. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion latex-setup.sh
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,6 @@ sudo apt -y install ack \
    texlive-luatex \
    texlive-xetex \
    tree \
    xclip
    xclip \
    zathura \
    zathura-pdf-poppler
  11. textarcana revised this gist Sep 6, 2025. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions latex-setup.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ sudo apt -y install ack \
    luatex \
    pandoc \
    texlive-latex-base \
    texlive-luatex \
    texlive-xetex \
    tree \
    xclip \
    xz
    xclip
  12. textarcana revised this gist Sep 6, 2025. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions latex-setup.sh
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,7 @@ sudo apt -y install ack \
    luatex \
    pandoc \
    texlive-latex-base \
    texlive-xetex \
    tree \
    xclip \
    xz
  13. textarcana revised this gist Sep 6, 2025. 1 changed file with 8 additions and 4 deletions.
    12 changes: 8 additions & 4 deletions z_add-this-to-dot-emacs.el
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,12 @@
    ;; sussman device configuration

    (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)

    (tool-bar-mode 0)
    @@ -9,6 +16,7 @@
    (smart-mode-line-enable)

    (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

    @@ -18,7 +26,3 @@

    ;; code lint
    (add-hook 'after-init-hook #'global-flycheck-mode)

    ;; spell check
    (add-hook 'text-mode-hook 'flyspell-mode)
    (add-hook 'prog-mode-hook 'flyspell-prog-mode) ; only checks comments/strings in code
  14. textarcana renamed this gist Sep 6, 2025. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  15. textarcana revised this gist Sep 6, 2025. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions latex-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    sudo snap install languagetool

    sudo apt -y install ack \
    bat \
    batcat \
  16. textarcana revised this gist Sep 6, 2025. 1 changed file with 0 additions and 4 deletions.
    4 changes: 0 additions & 4 deletions add-this-to-dot-emacs.el
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,3 @@
    ;; spell check
    (add-hook 'text-mode-hook 'flyspell-mode)
    (add-hook 'prog-mode-hook 'flyspell-prog-mode) ; only checks comments/strings in code

    ;; Or for manual spell checking
    (add-hook 'text-mode-hook 'ispell-minor-mode)

  17. textarcana revised this gist Sep 6, 2025. 1 changed file with 28 additions and 0 deletions.
    28 changes: 28 additions & 0 deletions add-this-to-dot-emacs.el
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    ;; sussman device configuration

    (load-theme 'calmer-forest t)

    (tool-bar-mode 0)
    (menu-bar-mode 0)
    (scroll-bar-mode 0)

    (smart-mode-line-enable)

    (add-hook 'LaTeX-mode-hook 'flyspell-mode)

    ;; navigate by words instead of letters when selecting a file path after eg C-x f

    (ido-mode 1)
    (setq ido-enable-flex-matching t)


    ;; code lint
    (add-hook 'after-init-hook #'global-flycheck-mode)

    ;; spell check
    (add-hook 'text-mode-hook 'flyspell-mode)
    (add-hook 'prog-mode-hook 'flyspell-prog-mode) ; only checks comments/strings in code

    ;; Or for manual spell checking
    (add-hook 'text-mode-hook 'ispell-minor-mode)

  18. textarcana revised this gist Sep 6, 2025. 1 changed file with 0 additions and 5 deletions.
    5 changes: 0 additions & 5 deletions latex-setup.sh
    Original file line number Diff line number Diff line change
    @@ -5,13 +5,8 @@ sudo apt -y install ack \
    cowsay \
    emacs \
    fzf \
    install \
    ispell \
    luatex \
    mlocate \
    pandoc \
    plocate \
    rev \
    texlive-latex-base \
    tree \
    xclip \
  19. textarcana revised this gist Sep 6, 2025. 1 changed file with 17 additions and 16 deletions.
    33 changes: 17 additions & 16 deletions latex-setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,18 @@
    sudo apt -y install ack \
    bat \
    batcat \
    chktex \
    cowsay \
    emacs \
    fzf \
    install \
    ispell \
    luatex \
    mlocate \
    pandoc \
    plocate \
    rev \
    tree \
    xclip \
    xz
    bat \
    batcat \
    chktex \
    cowsay \
    emacs \
    fzf \
    install \
    ispell \
    luatex \
    mlocate \
    pandoc \
    plocate \
    rev \
    texlive-latex-base \
    tree \
    xclip \
    xz
  20. textarcana created this gist Sep 6, 2025.
    17 changes: 17 additions & 0 deletions latex-setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    sudo apt -y install ack \
    bat \
    batcat \
    chktex \
    cowsay \
    emacs \
    fzf \
    install \
    ispell \
    luatex \
    mlocate \
    pandoc \
    plocate \
    rev \
    tree \
    xclip \
    xz