Merge branch 'master' of ssh://alanpearce.eu/dotfiles
Alan Pearce alan@alanpearce.eu
Sat, 03 Jun 2017 19:54:12 +0200
1 files changed, 49 insertions(+), 33 deletions(-)
jump to
M emacs/.emacs.d/init.org → emacs/.emacs.d/init.org
@@ -179,11 +179,14 @@ #+BEGIN_SRC emacs-lisp (use-package eziam-light-theme :ensure eziam-theme + :if (or window-system + server-name) :defines (eziam-scale-headings) :config (progn (setq eziam-scale-headings nil) (load-theme 'eziam-light t) (custom-theme-set-faces 'user + '(default ((t (:background "#ffffff")))) '(js2-function-call ((t (:underline nil)))) '(font-lock-keyword-face ((t (:weight normal)))) '(git-gutter-fr:added ((t (:foreground "#96a4ab")))) @@ -316,7 +319,8 @@ (when mode-line-default-hidden (call-interactively #'hide-mode-line)) -(setq-default indicate-buffer-boundaries 'left) +(setq-default indicate-buffer-boundaries nil) +(fringe-mode '(4 . 4)) (defun hide-mode-line-if-default-hidden () (if mode-line-default-hidden @@ -567,7 +571,9 @@ (setq projectile-switch-project-action #'projectile-commander projectile-completion-system 'ivy))) (use-package counsel-projectile - :config (counsel-projectile-on)) + :config (progn + (counsel-projectile-on) + (define-key projectile-mode-map [remap counsel-projectile-ag] #'counsel-projectile-rg))) #+END_SRC ** vc @@ -603,15 +609,15 @@ ;; places the git gutter outside the margins. (setq-default fringes-outside-margins t) ;; thin fringe bitmaps (fringe-helper-define 'git-gutter-fr:added '(center repeated) - "XXX.....") + ".XXX....") (fringe-helper-define 'git-gutter-fr:modified '(center repeated) - "XXX.....") + ".XXX....") (fringe-helper-define 'git-gutter-fr:deleted 'bottom - "X......." - "XX......" - "XXX....." - "XXXX....") - (setq git-gutter-fr:side 'left-fringe))) + ".......X" + "......XX" + ".....XXX" + "....XXXX") + (setq git-gutter-fr:side 'right-fringe))) #+END_SRC ** magit @@ -629,6 +635,17 @@ magit-display-buffer-function #'magit-display-buffer-fullcolumn-most-v1 global-magit-file-mode nil) (add-to-list 'magit-no-confirm 'safe-with-wip)) :init (add-hook 'magit-mode-hook #'magit-load-config-extensions)) +#+END_SRC + +** git-messenger + +Popup the last commit that changed the line at point. + +#+BEGIN_SRC emacs-lisp +(use-package git-messenger + :bind* (("C-x v p" . git-messenger:popup-message)) + :config (progn + (setq git-messenger:use-magit-popup t))) #+END_SRC ** git-timemachine @@ -1188,6 +1205,17 @@ (bind-key "^" #'dired-subtree-maybe-up dired-mode-map) (bind-key "i" #'dired-subtree-toggle dired-mode-map)))) #+END_SRC +** Disk usage + +Combine dired and du (disk usage). + +#+BEGIN_SRC emacs-lisp +(use-package dired-du + :after dired + :config (progn + (setq dired-du-size-format t))) +#+END_SRC + ** Dired-narrow One can already use dired with wildcards to browse a filtered directory listing, but it opens a new buffer. Dired-narrow is a @@ -1317,7 +1345,7 @@ #+BEGIN_SRC emacs-lisp (use-package bbdb :config (progn - (bbdb-initialize 'gnus 'mail 'message 'pgp) + (bbdb-initialize 'gnus 'message 'pgp) (bbdb-mua-auto-update-init 'gnus 'message) (setq bbdb-send-mail-style 'gnus bbdb-complete-mail-allow-cycling t @@ -1619,13 +1647,15 @@ (find-file (expand-file-name "ledger/my.ledger" (projectile-project-root))) (ledger-report "Budget (Cumulative)" nil))) :config (progn (setq ledger-use-iso-dates t - ledger-post-use-completion-engine :built-in + ledger-post-use-completion-engine :ido ledger-reconcile-default-commodity "€" ledger-clear-whole-transactions t ledger-narrow-on-reconcile t - ledger-default-date-format "%Y-%m-%d" - ledger-reports '(("Monthly Expenses" "ledger -f %(ledger-file) reg -M Expenses --real -l \"payee != 'Opening Balances'\"") - ("Expenses:This Month" "ledger -f %(ledger-file) bal \\^Expenses -p \"this month\"") + ledger-reports `(("Monthly Expenses" "ledger -f %(ledger-file) reg -M \\^Flex --real -X EUR -l \"payee != 'Opening Balances'\"") + ("Average Monthly Expenses (Past 12 Months)" ,(concat "ledger -f %(ledger-file) -b " + (format-time-string "%Y-%m" (time-add (current-time) (days-to-time -365))) + " --monthly --average balance ^Flex")) + ("Expenses:This Month" "ledger -f %(ledger-file) bal \\^Flex -p \"this month\"") ("On-budget Balances" "ledger -f %(ledger-file) bal --current -R :Budget: Assets:Receivable Liabilities:Personal") ("All Account Balances" "ledger -f %(ledger-file) bal --current -R \\^Assets \\^Liabilities") ("Budget Values (Current Month)" "ledger -f %(ledger-file) bal -p \"this month\" --limit \"payee=~/budget/\" \\^Funds") @@ -1658,7 +1688,9 @@ #+BEGIN_SRC emacs-lisp (use-package org :bind (("C-c C-a" . org-agenda-list) ("C-c a" . org-agenda) - ("C-c l" . org-store-link)) + ("C-c l" . org-store-link) + :map org-src-mode-map + ("C-x C-s" . org-edit-src-exit)) :defer 8 :init (setq org-replace-disputed-keys t org-ellipsis "…") @@ -1753,10 +1785,10 @@ :defer 5 :config (progn (global-flycheck-mode) (setq flycheck-check-syntax-automatically '(save mode-enabled)) - (setq flycheck-indication-mode 'right-fringe) + (setq flycheck-indication-mode 'left-fringe) (with-eval-after-load 'git-gutter-fringe (fringe-helper-define 'flycheck-fringe-bitmap-double-arrow '(center repeated) - ".XXXXXXX")) + ".XXX....")) (if (executable-find "eslint_d") (setq flycheck-javascript-eslint-executable "eslint_d")))) #+END_SRC @@ -2466,22 +2498,6 @@ (if (functionp 'x-cut-buffer-or-selection-value) (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)) (when (boundp 'x-select-request-type) (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))) -#+END_SRC - -*** Copy formatted code - -#+BEGIN_SRC emacs-lisp -(bind-key* "C-c w" (define-prefix-command 'copy-as-map)) -(use-package copy-as-format - :bind (("C-c C-w" . copy-as-format) - :map copy-as-map - ("b" . copy-as-format-bitbucket) - ("g" . copy-as-format-github) - ("h" . copy-as-format-hipchat) - ("w" . copy-as-format-html) - ("j" . copy-as-format-jira) - ("m" . copy-as-format-markdown) - ("s" . copy-as-format-slack))) #+END_SRC ** Selection