]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/don-configuration.org
add atomic-chrome support
[lib.git] / emacs_el / configuration / don-configuration.org
index fa87368ed5081af4d6eb35c96b14136a4bd7544d..922774c66d42cb426cecc08d91c44f13dc123adb 100644 (file)
   (add-hook 'minibuffer-exit-hook #'don/minibuffer-exit-hook)
 #+END_SRC
 * Modules
+** Flyspell 🐝 
+#+BEGIN_SRC emacs-lisp
+  (use-package flyspell
+    :ensure t
+    :diminish flyspell-mode 🐝
+    :config
+    (add-hook 'message-mode-hook 'turn-on-flyspell)
+    (add-hook 'text-mode-hook 'turn-on-flyspell)
+    (add-hook 'c-mode-common-hook 'flyspell-prog-mode)
+    (add-hook 'cperl-mode-hook 'flyspell-prog-mode)
+    (add-hook 'tcl-mode-hook 'flyspell-prog-mode)
+    :init
+    (setq ispell-program-name "ispell")
+    )
+
+#+END_SRC
 ** Winnermode
 #+BEGIN_SRC emacs-lisp
   (winner-mode 1)
   (setq split-width-threshold  100)
   (setq split-height-threshold 60)
 
-  (defun my/split-window-prefer-horizontally (window)
+  (defun my/split-window-prefer-vertically (window)
     "If there's only one window (excluding any possibly active
            minibuffer), then split the current window horizontally."
     (if (and (one-window-p t)
              (not (active-minibuffer-window))
-             ( > (frame-width) (frame-height))
+             ( < (frame-width) (frame-height))
              )
-        (let ((split-height-threshold nil))
+        (let ((split-width-threshold nil))
           (split-window-sensibly window))
       (split-window-sensibly window)))
 
-  (setq split-window-preferred-function #'my/split-window-prefer-horizontally)
+  (setq split-window-preferred-function #'my/split-window-prefer-vertically)
   (setq window-combination-resize t)
 #+END_SRC
 
@@ -285,6 +301,8 @@ value, scrolling continues until there is no more output.
 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
   (use-package magit
     :ensure t
+    :bind (("C-x g" . magit-status)
+           ("C-x C-g" . magit-status))
     :config
     ;; don't verify where we are pushing
     (setq magit-push-always-verify nil)
@@ -294,10 +312,17 @@ value, scrolling continues until there is no more output.
     (setq load-path
           (append '("~/lib/emacs_el/magit-annex")
                   load-path))
+    ;; load magit-vcsh
+    (setq load-path
+          (append '("~/lib/emacs_el/magit-vcsh")
+                  load-path))
     )
   (use-package magit-annex
     :ensure t
   )
+  (use-package magit-vcsh
+    :ensure f ; currently not in melpa, so don't try to install
+  )
 #+END_SRC
 
 ** Perl
@@ -358,26 +383,33 @@ value, scrolling continues until there is no more output.
                                 (tramp-remote-shell-args
                                  ("-c"))))
 #+END_SRC
+** Reftex
+#+BEGIN_SRC emacs-lisp
+  (use-package reftex
+    :ensure t
+    :config
+    (setq-default reftex-default-bibliography
+                    '("~/projects/research/references.bib")))
+#+END_SRC
 ** LaTeX
 #+BEGIN_SRC emacs-lisp
   (use-package tex
     :defer t
     :ensure auctex
     :config
-    (add-to-list 'LaTeX-fill-excluded-macros
-                 '("Sexpr"))
-    (add-to-list 'TeX-style-path '"/home/don/lib/emacs_el/auctex/style")
+    ; (add-to-list 'TeX-style-path '"/home/don/lib/emacs_el/auctex/style")
     ;; REFTEX (much enhanced management of cross-ref, labels, etc)
     ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/
-    (autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
-    (autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
-    (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
-    (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
+    (autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
+    (autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
+    (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
+    (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
     (add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
     (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
     (add-hook 'LaTeX-mode-hook 'outline-minor-mode)   ; with AUCTeX LaTeX mode
     (add-hook 'latex-mode-hook 'outline-minor-mode)   ; with Emacs latex mode
 
+    (setq-default reftex-plug-into-AUCTeX t)
     ;; support fake section headers
     (setq TeX-outline-extra
           '(("%chapter" 1)
@@ -431,9 +463,11 @@ value, scrolling continues until there is no more output.
            '("Cref" TeX-arg-ref)
            '("cpageref" TeX-arg-ref)
            '("Cpageref" TeX-arg-ref)))))
+    (eval-after-load
+        "latex"
+      '(add-to-list 'LaTeX-fill-excluded-macros
+                    '("Sexpr")))
 
-    (setq-default reftex-default-bibliography
-                  '("~/projects/research/references.bib"))
     (use-package font-latex
       :config
       (setq font-latex-match-reference-keywords
@@ -492,7 +526,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 
 #+BEGIN_SRC emacs-lisp
   (use-package rainbow-mode
-    :ensure f
     ;; add ess to the x major mode
     :config (add-to-list 'rainbow-x-colors-major-mode-list 'ESS[S])
     (add-to-list 'rainbow-x-colors-major-mode-list 'ESS[R])
@@ -517,6 +550,18 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 #+BEGIN_SRC emacs-lisp
   (use-package outline-magic)
 #+END_SRC
+** Writeroom Mode
+#+BEGIN_SRC emacs-lisp
+  (use-package writeroom-mode
+    :config (add-hook 'writeroom-mode-hook 'auto-fill-mode)
+    )
+#+END_SRC
+** GhostText/Atomic Chrome
+#+BEGIN_SRC emacs-lisp
+  (use-package atomic-chrome
+    :config (atomic-chrome-start-server)
+    )
+#+END_SRC
 * Keybindings
 ** Override other things
 #+BEGIN_SRC emacs-lisp
@@ -726,7 +771,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
     )
 
   (column-number-mode t)
-  (setq-default reftex-plug-into-AUCTeX t)
 
   (server-start)
 
@@ -794,13 +838,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
   (put 'downcase-region 'disabled nil)
   (put 'narrow-to-region 'disabled nil)
 
-  (setq ispell-program-name "ispell")
-  (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
-  (add-hook 'message-mode-hook 'turn-on-flyspell)
-  (add-hook 'text-mode-hook 'turn-on-flyspell)
-  (add-hook 'c-mode-common-hook 'flyspell-prog-mode)
-  (add-hook 'cperl-mode-hook 'flyspell-prog-mode)
-  (add-hook 'tcl-mode-hook 'flyspell-prog-mode)
   ; (defun turn-on-flyspell ()
   ;    "Force flyspell-mode on using a positive arg.  For use in hooks."
   ;    (interactive)