From fd47888e9c39e32356db6990723de3da21f12872 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Sun, 27 Aug 2017 17:22:00 +0100 Subject: [PATCH] Further editing configuration --- init.el | 6 ------ modules/editing.el | 29 ++++++++++++++++++++++++++++- modules/workflow.el | 1 - 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/init.el b/init.el index 1b3d3f9..1873970 100644 --- a/init.el +++ b/init.el @@ -160,15 +160,9 @@ ;; Kill other window (cyclic order). (global-set-key (kbd "C-x C-q") 'quit-other-window) - ;; Toggle whitespace mode. - (global-set-key (kbd "C-c w") 'whitespace-mode) - ;; Change active window. More convenient than "C-x o". (global-set-key (kbd "M-o") 'other-window) - ;; Occur. More convenient than "M-s o" - (global-set-key (kbd "M-s M-o") 'occur) - ;; -------------------------------------------------------------------------- ;; Aliases. ;; -------------------------------------------------------------------------- diff --git a/modules/editing.el b/modules/editing.el index ff922fc..9af3d21 100644 --- a/modules/editing.el +++ b/modules/editing.el @@ -20,7 +20,9 @@ '(rainbow-mode rainbow-delimiters highlight-parentheses - whole-line-or-region) + whole-line-or-region + duplicate-thing + volatile-highlights) ) @@ -28,6 +30,21 @@ (defun init-packages/init-editing () + ;; -------------------------------------------------------------------------- + ;; Duplicate things. + ;; -------------------------------------------------------------------------- + + (use-package duplicate-thing + :defer t + :bind (("M-c" . duplicate-thing))) + + ;; -------------------------------------------------------------------------- + ;; Volatile highlights - highlight changes caused by undo, yank, etc. + ;; -------------------------------------------------------------------------- + + (use-package volatile-highlights) + (volatile-highlights-mode t) + ;; -------------------------------------------------------------------------- ;; Parentheses highlighting. ;; -------------------------------------------------------------------------- @@ -183,4 +200,14 @@ (let ((transient-mark-mode nil)) (yank-advised-indent-function (region-beginning) (region-end))))) + ;; -------------------------------------------------------------------------- + ;; Additional key-bindingds. + ;; -------------------------------------------------------------------------- + + ;; Toggle whitespace mode. + (global-set-key (kbd "C-c w") 'whitespace-mode) + + ;; Occur. More convenient than "M-s o" + (global-set-key (kbd "M-s M-o") 'occur) + ) diff --git a/modules/workflow.el b/modules/workflow.el index 0d4a95e..a6e2fea 100644 --- a/modules/workflow.el +++ b/modules/workflow.el @@ -31,7 +31,6 @@ ;; -------------------------------------------------------------------------- (use-package workgroups2 - :defer t :config ;; Don't save. Workgroups are transient to the session. (setq wg-emacs-exit-save-behavior nil)