home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 897367c46a9985b8063ac9294a9afbbb3e43f644
parent 0de91e44a5a3a016f5358b52233d10f2224d2068
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Mon, 23 Nov 2020 10:44:20 +0100

tools/emacs: enable hl-line-mode only…

… on some mode (and derived). And enable hl-todo-mode on prog-mode
derived buffers.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mtools/emacs/config/config-appearance.el | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/emacs/config/config-appearance.el b/tools/emacs/config/config-appearance.el @@ -35,10 +35,14 @@ indicate-empty-lines +1) (line-number-mode 1) (column-number-mode 1) - (global-hl-line-mode 1) (global-unset-key (kbd "C-z")) (global-unset-key (kbd "C-x C-z")) - (global-unset-key (kbd "C-h h"))) + (global-unset-key (kbd "C-h h")) + ;; let's enable it for all programming major modes + (add-hook 'prog-mode-hook #'hl-line-mode) + (add-hook 'prog-mode-hook #'hl-todo-mode) + ;; and for all modes derived from text-mode + (add-hook 'text-mode-hook #'hl-line-mode)) (use-package frame :unless noninteractive