General cleanup + update caskfile

This commit is contained in:
Henrik Lissner 2016-04-26 02:00:19 -04:00
parent 19dd1a0dd3
commit 07e2a275f6
10 changed files with 61 additions and 81 deletions

View file

@ -1,13 +1,13 @@
;;; extra-demo.el --- for collaboration and demonstrations
(defvar powerline-height)
;; This library offers:
;; + impatient-mode: for broadcasting my emacs session
;; + big-mode: for enlarged text while screencasting
;; + TODO integration with reveal.js for presentations
;; + TODO peer programming collab
(defvar powerline-height)
;; Big-mode settings
(defconst big-mode-font (font-spec :family "Hack" :size 16))
(defconst big-mode-line-spacing 0)
@ -15,8 +15,7 @@
;;
(use-package impatient-mode
:defer t
:commands httpd-start)
:commands (httpd-start impatient-mode))
(defvar big-mode--line-spacing line-spacing)
(defvar big-mode--powerline-height powerline-height)

View file

@ -1,28 +1,23 @@
;; extra-write.el
;; This library offers the following:
;; + Write-mode: a mode that turns Emacs into an app for writing notes, papers, or
;; fiction: it adds eye-candy to org-mode, switches to a light color theme and
;; to a more readable font.
;; + TODO Write-mode: a mode that turns Emacs into an app for writing notes, papers, or
;; fiction: it adds eye-candy to org-mode, switches to a light color theme and to a
;; more readable font.
;; + Bibtex integration
;; Write-mode settings
(defconst write-mode nil)
(defconst write-mode-font (font-spec :family "Hack" :size 12))
(defconst write-mode-font (font-spec :family "Hack" :size 14))
(defconst write-mode-biblio-dir "~/Dropbox/docs/biblio")
(defconst write-mode--last-mode-line mode-line-format)
(defconst write-mode--last-line-spacing line-spacing)
;;
(setq-default visual-fill-column-center-text nil
visual-fill-column-width 80)
(defun write-mode|org-hook ()
"A hook that runs everytime an org-mode buffer is visited/created while `write-mode' is
active."
;; (font-lock-add-keywords nil write-mode-org-font-lock-keywords)
)
active.")
(defun write-mode-toggle ()
"Enable write-mode, this is not a [global] minor mode because it mixes some frame-local
@ -32,11 +27,6 @@ functionality with buffer-local ones, which can be buggy in a minor-mode."
(on-off (if mode-p -1 +1)))
;; (scroll-bar-mode on-off)
(narf/load-font (if mode-p narf-default-font write-mode-font))
(when (featurep 'volatile-highlights)
(volatile-highlights-mode (not on-off)))
(when IS-MAC
(setq mouse-wheel-scroll-amount
(if mode-p '(5 ((shift) . 2)) '(3 ((shift) . 2)))))
(if write-mode
(remove-hook 'org-mode-hook 'write-mode|org-hook)
(add-hook 'org-mode-hook 'write-mode|org-hook))
@ -51,22 +41,7 @@ functionality with buffer-local ones, which can be buggy in a minor-mode."
(narf/get-buffers-in-modes '(org-mode markdown-mode)))
(setq write-mode (not write-mode))))
(evil-define-command narf:set-columns (&optional bang columns)
"Adjusts visual-fill-column-width on the fly."
(interactive "<!><a>")
(if (or (= (length columns) 0) bang)
(progn
(setq visual-fill-column-width 80)
(when visual-fill-column-mode
(visual-fill-column-mode -1)))
(setq columns (string-to-number columns))
(when (> columns 30)
(setq visual-fill-column-width columns)))
(if visual-fill-column-mode
(visual-fill-column--adjust-window)
(visual-fill-column-mode 1)))
(when (>= emacs-major-version 25)
(when (> emacs-major-version 24)
;; From <https://github.com/joostkremers/visual-fill-column/pull/6>
;; Splitting windows while visual-fill-column makes Emacs go crazy. This prevents that
;; by simply disabled VFC before splitting.

View file

@ -4,18 +4,20 @@
(associate! nxml-mode :match "\\.plist$")
(use-package toml-mode :mode "\\.toml$")
(use-package yaml-mode :mode "\\.ya?ml$"
:config (def-electric! yaml-mode :chars (?\n ?: ?-)))
(use-package json-mode :mode "\\.js\\(on\\|hintrc\\)$"
:config (def-electric! json-mode :chars (?\n ?: ?{ ?})))
(use-package vimrc-mode :mode ("/\\.?g?vimrc$" "\\.vim$" "/\\.vim/rc/.+$"))
(use-package dockerfile-mode :mode "/Dockerfile$"
:config
(def-docset! dockerfile-mode "docker")
(def-builder! dockerfile-mode dockerfile-build-buffer "Dockerfile"))
(use-package vimrc-mode :mode ("/\\.?g?vimrc$" "\\.vim$" "/\\.vim/rc/.+$"))
;;
(def-project-type! ansible-mode "ans"
:modes (yaml-mode)