Find file
Fetching contributors…
Cannot retrieve contributors at this time
107 lines (97 sloc) 3.66 KB
;;; Initialization file for writing
; Author: Matthew Darling
; First started: March 5th, 2012
; First used for work: May 1st, 2013
; First used for a real job: June 2nd, 2014
;;; Markdown is great, and this mode is good
(req-package markdown-mode
:mode (("\\.html\\'" . markdown-mode)
("\\.txt\\'" . markdown-mode)
("\\.md\\'" . markdown-mode)))
;;; Display the word count in the modeline
; Note the use of hooks rather than the :mode keyword
; This is mainly because other modes inherit from text-mode-hook
(req-package wc-mode
(add-hook 'text-mode-hook 'wc-mode)
(add-hook 'markdown-mode-hook 'wc-mode)
(add-hook 'html-mode-hook 'wc-mode)))
;;; On-the-fly spellchecking
(req-package flyspell
(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'markdown-mode-hook 'flyspell-mode)
(add-hook 'html-mode-hook 'flyspell-mode)))
;;; Art Bollocks mode, for avoiding ridiculous writing
; Many thanks to Sacha Chua, these configurations were found here:
(req-package artbollocks-mode
(add-hook 'markdown-mode-hook 'artbollocks-mode)
(add-hook 'html-mode-hook 'artbollocks-mode))
;; Avoid these phrases
(setq weasel-words-regex
(concat "\\b" (regexp-opt
'("one of the"
"sort of"
"a lot"
"I think"
"leverage") t) "\\b"))
(setq artbollocks nil)
;; Make sure keywords are case-insensitive
(defadvice search-for-keyword (around sacha activate)
"Match in a case-insensitive way."
(let ((case-fold-search t))
;;;; LaTeX
(req-package tex
:require tex-mik
(add-hook 'TeX-mode-hook 'TeX-PDF-mode) ;Generate PDFs (this is file local)
(setq TeX-parse-self t) ;Parse when loading a file
(setq TeX-auto-save t) ;Parse when saving a file
(setq doc-view-ghostscript-program
"C:/Program Files/Ghostscript/gs9.06/bin/gswin64.exe")
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
(add-hook 'TeX-mode-hook 'TeX-fold-mode) ;Fold stuff like \section and \emph
;Use csquotes when pressing ", see:
(setq LaTeX-csquotes-close-quote "}"
LaTeX-csquotes-open-quote "\\enquote{")
;If I want really nice syntax highlighting in my document, Minted needs this
(setq TeX-engine-alist '((pdflatex_sh "pdftlatex shell escape"
"pdflatex --file-line-error --shell-escape"
"pdflatex --file-line-error --shell-escape"
;;;; Working with Tumblr
(req-package tumblesocks
(setq tumblesocks-blog "")
(if (require 'sasl nil t)
(setq oauth-nonce-function #'sasl-unique-id)
(setq oauth-nonce-function #'oauth-internal-make-nonce))
(setq tumblesocks-post-default-state "ask")))
(provide 'mattd-writing)