diff options
author | Alan Pearce | 2015-10-20 13:36:51 +0200 |
---|---|---|
committer | Alan Pearce | 2015-10-20 13:36:51 +0200 |
commit | 4c66e5fd5a452236839eab0fcaf028e4d5b3cd31 (patch) | |
tree | 0484744207bbe12febdca822ac7a290f87f0073f /tag-emacs/emacs.d | |
parent | d194d8ed593decd6f1b65e434cfb40374c218861 (diff) | |
parent | f804daba11b49414eb90d361c97fc54cf018bcb2 (diff) | |
download | dotfiles-4c66e5fd5a452236839eab0fcaf028e4d5b3cd31.tar.lz dotfiles-4c66e5fd5a452236839eab0fcaf028e4d5b3cd31.tar.zst dotfiles-4c66e5fd5a452236839eab0fcaf028e4d5b3cd31.zip |
Merge branch 'master' of github.com:alanpearce/dotfiles
Diffstat (limited to 'tag-emacs/emacs.d')
-rw-r--r-- | tag-emacs/emacs.d/init.org | 113 |
1 files changed, 57 insertions, 56 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 06d6f7c..eea2e00 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -218,10 +218,11 @@ It’s nice to be able to see at a glance which lines of a file have changed. This package colours the fringe #+BEGIN_SRC emacs-lisp -(req-package diff-hl - :init (progn - (global-diff-hl-mode) - (add-hook 'magit-refresh-file-buffer-hook #'diff-hl-update))) + (req-package diff-hl + :defer 2 + :init (progn + (global-diff-hl-mode 1) + (add-hook 'magit-refresh-file-buffer-hook #'diff-hl-update))) #+END_SRC ** magit @@ -275,11 +276,10 @@ Ring the bell sometimes, but not so often When I’m using dash in emacs lisp, it’s nice to have proper font locking for it. #+BEGIN_SRC emacs-lisp -(req-package dash - :demand t - :init (setq dash-enable-fontlock t) - :config (progn - (dash--enable-fontlock 'dash-enable-font-lock t))) + (req-package dash + :commands (dash-enable-font-lock) + :init (progn + (add-hook 'emacs-lisp-mode-hook #'dash-enable-font-lock))) #+END_SRC ** Colours @@ -542,7 +542,7 @@ that I can sudo on remote machines #+BEGIN_SRC emacs-lisp (req-package tramp - :defer t + :defer 7 :config (progn (setq tramp-default-method (if (eq system-type 'windows-nt) "plinkx" "ssh") tramp-default-user-alist '(("\\`su\\(do\\)?\\'" nil "root")) @@ -672,9 +672,10 @@ guesses the correct settings for me. This is a frontend to the GPG-powered =pass= program. #+BEGIN_SRC emacs-lisp -(req-package password-store - :config (progn - (setq password-store-password-length 16))) + (req-package password-store + :defer 15 + :config (progn + (setq password-store-password-length 16))) #+END_SRC * Buffers @@ -738,9 +739,10 @@ Sometimes I like to be able to focus on one block of code at a time. Normally narrowing hides everything else completely, which I don’t like. This package just makes everything else lower-contrast. #+BEGIN_SRC emacs-lisp -(req-package fancy-narrow - :diminish fancy-narrow-mode - :config (fancy-narrow-mode 1)) + (req-package fancy-narrow + :defer 15 + :diminish fancy-narrow-mode + :config (fancy-narrow-mode 1)) #+END_SRC @@ -894,7 +896,7 @@ seems to work perfectly well for me. Weeks start on Monday for me and I prefer ISO-style dates. #+BEGIN_SRC emacs-lisp (req-package calendar - :defer t + :defer 1 :config (progn (setq calendar-week-start-day 1) (calendar-set-date-style 'iso))) @@ -930,7 +932,7 @@ copying/moving files between them. #+BEGIN_SRC emacs-lisp (req-package dired - :defer t + :defer 3 :config (progn (bind-key "<return>" #'dired-find-file dired-mode-map) (bind-key "^" (lambda () (interactive) (find-alternate-file "..")) dired-mode-map) @@ -947,13 +949,14 @@ copying/moving files between them. I work with a lot of git projects. Dired-k adds colours based upon the file’s git status. #+BEGIN_SRC emacs-lisp -(req-package dired-k - :require dired - :init (progn - (add-hook 'dired-initial-position-hook #'dired-k)) - :config (progn - (setq dired-k-human-readable t) - (bind-key "g" #'dired-k dired-mode-map))) + (req-package dired-k + :require dired + :defer 5 + :init (progn + (add-hook 'dired-initial-position-hook #'dired-k)) + :config (progn + (setq dired-k-human-readable t) + (bind-key "g" #'dired-k dired-mode-map))) #+END_SRC @@ -961,15 +964,17 @@ Don’t show uninteresting files in dired listings. #+BEGIN_SRC emacs-lisp (req-package dired-x - :require dired + :commands (dired-omit-mode + dired-expunge) :config (progn + (setq dired-omit-files "#\\|\\.$" + dired-omit-verbose nil + dired-find-subdir t)) + :init (progn (defun turn-on-dired-omit-mode () (interactive) (dired-omit-mode 1)) - (add-hook 'dired-mode-hook #'turn-on-dired-omit-mode) - (setq dired-omit-files "#\\|\\.$" - dired-omit-verbose nil - dired-find-subdir t))) + (add-hook 'dired-mode-hook #'turn-on-dired-omit-mode))) #+END_SRC #+BEGIN_SRC emacs-lisp @@ -984,22 +989,22 @@ Don’t show uninteresting files in dired listings. Expand subfolders like a tree inside the parent #+BEGIN_SRC emacs-lisp -(req-package dired-subtree - :defer t - :require dired - :config (progn - (setq dired-subtree-use-backgrounds nil) - (defun dired-subtree-maybe-up () - "Jump up one subtree or directory" - (interactive) - (let ((ov (dired-subtree--get-ov))) - (if ov - (progn (goto-char (overlay-start ov)) - (dired-previous-line 1)) - (dired-up-directory)))) - (bind-key "^" #'dired-subtree-maybe-up dired-mode-map)) - :init (progn - (bind-key "i" #'dired-subtree-toggle dired-mode-map))) + (req-package dired-subtree + :defer t + :require dired + :config (progn + (setq dired-subtree-use-backgrounds nil) + (defun dired-subtree-maybe-up () + "Jump up one subtree or directory" + (interactive) + (let ((ov (dired-subtree--get-ov))) + (if ov + (progn (goto-char (overlay-start ov)) + (dired-previous-line 1)) + (dired-up-directory)))) + (bind-key "^" #'dired-subtree-maybe-up dired-mode-map)) + :init (progn + (bind-key "i" #'dired-subtree-toggle dired-mode-map))) #+END_SRC * Documentation @@ -1011,7 +1016,7 @@ helps to make documentation for other languages easier to access #+BEGIN_SRC emacs-lisp (req-package helm-dash - :defer t + :defer 20 :init (progn (defmacro ap/create-helm-dash-hook (mode docsets) (let* ((mode-s (symbol-name mode)) @@ -1200,14 +1205,6 @@ lots of candidates. helm-input-idle-delay 0) (when (fboundp #'helm-adaptive-mode) (helm-adaptive-mode 1)))) - - (req-package helm-files - :defer t - :config (progn - (define-key helm-read-file-map (kbd "<tab>") #'helm-execute-persistent-action) - (define-key helm-read-file-map (kbd "TAB") #'helm-execute-persistent-action) - (define-key helm-read-file-map (kbd "C-i") #'helm-execute-persistent-action) - (define-key helm-read-file-map (kbd "C-z") #'helm-select-action))) #+END_SRC ** swiper/ivy @@ -1524,7 +1521,7 @@ Org is wünderbar. :bind (("C-c C-a" . org-agenda-list) ("C-c a" . org-agenda) ("C-c l" . org-store-link)) - :defer 10 + :defer 8 :init (setq org-replace-disputed-keys t) :config (progn (setq org-directory "~/Sync/org" @@ -2117,6 +2114,10 @@ Make a shell-script buffer executable after saving it, if it has a shebang. :config (setq sh-shell-file "/usr/bin/env zsh")) #+END_SRC +#+BEGIN_SRC emacs-lisp + (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) +#+END_SRC + ** eshell I should try to get into the habit of using this more. It’s really |