From 00bc25dbebf035f003e73f64c6a856cd0acf09a1 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 30 May 2017 11:46:21 +0200 Subject: Emacs: Remove copy-as-format --- emacs/.emacs.d/init.org | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index b13f4e71..99978c3d 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -2450,22 +2450,6 @@ I like to use the clipboard more than the primary selection in X11. (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 I’m quite used to deleting text by selecting it and typing. Emacs has -- cgit 1.4.1 From c82f34646cba655b49d2bc2a2247efb46e01d518 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 30 May 2017 11:46:38 +0200 Subject: Emacs: Use rg instead of ag for counsel-projectile --- emacs/.emacs.d/init.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 99978c3d..1bac4eff 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -549,7 +549,9 @@ based upon some folder conventions I use. 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 -- cgit 1.4.1 From e9049339b060d464e60374c22b918ba94fd78b69 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 30 May 2017 11:47:06 +0200 Subject: Emacs: Tweak the fringe --- emacs/.emacs.d/init.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 1bac4eff..8d8f8441 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -302,7 +302,8 @@ Sometimes I like to hide clutter. Other times, it's useful. (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 -- cgit 1.4.1 From d355dc10d2ff85f4bd07bf55d773d135832ef07d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 30 May 2017 11:47:22 +0200 Subject: Emacs: Only load theme if it makes sense --- emacs/.emacs.d/init.org | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 8d8f8441..25a399a2 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -169,6 +169,8 @@ Eziam looks nice, too #+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) -- cgit 1.4.1 From fc3d5ed0d20890cbb4350a7b774cd49269f91ebd Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 30 May 2017 11:47:39 +0200 Subject: Emacs: Always make the background white --- emacs/.emacs.d/init.org | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 25a399a2..6a904362 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -176,6 +176,7 @@ Eziam looks nice, too (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")))) -- cgit 1.4.1 From 3ee51fe5f1110072b345638b1fc8d91af92c8c85 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 21:32:18 +0200 Subject: Emacs: Swap fringes used by git-gutter/flycheck --- emacs/.emacs.d/init.org | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 6a904362..b9cbef9b 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -591,15 +591,15 @@ fringe so it doesn’t interfere with flycheck. (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 @@ -619,6 +619,17 @@ time. Make sure to set it up with a nice =completing-read-function= :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 This package allow me to go through a file’s history with just a few @@ -1305,7 +1316,7 @@ information here as well. #+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 @@ -1607,13 +1618,15 @@ works really nicely. (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") @@ -1646,7 +1659,9 @@ Org is wünderbar. (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 "…") @@ -1741,10 +1756,10 @@ On-the-fly error checking in programming modes? Yes please. :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 -- cgit 1.4.1 From fee42496ab1efd7267578d40f844c55014f6c260 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 2 Jun 2017 09:58:09 +0200 Subject: Emacs: Setup dired-du-mode --- emacs/.emacs.d/init.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 9b814ecf..4917c4bd 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1198,6 +1198,17 @@ Expand subfolders like a tree inside the parent (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 -- cgit 1.4.1