From 5dfe9ec9665850e99f5e5c22d686940f83e10680 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 13 Nov 2018 14:59:38 +0100 Subject: [PATCH] Install the loccur package --- configuration.org | 19 +++++++++++++++++++ customizations.el | 1 + 2 files changed, 20 insertions(+) diff --git a/configuration.org b/configuration.org index 593c5bb..93f4d8b 100644 --- a/configuration.org +++ b/configuration.org @@ -2134,6 +2134,25 @@ This will be replaced with something self-hosted, eventually. (editorconfig-mode t)) #+END_SRC +** occur-like folding in the current buffer + +#+BEGIN_SRC emacs-lisp +(defun gpolonkai/toggle-loccur () + "Toggle `loccur-mode'. + +If `loccur-mode' is not active, starts it (which, in turn, will ask for the +pattern to look for). If it is active, it will disable it." + (interactive) + (if loccur-mode + (loccur-mode nil) + (call-interactively 'loccur))) + +(use-package loccur + :bind + (:map gpolonkai/pers-map + ("C-o" . gpolonkai/toggle-loccur))) +#+END_SRC + * Make programming a bit easier ** Electric case diff --git a/customizations.el b/customizations.el index 73ecde7..60d9019 100644 --- a/customizations.el +++ b/customizations.el @@ -124,6 +124,7 @@ js2-mode json-mode kanban + loccur lorem-ipsum magit magit-gerrit