diff --git a/init.el b/init.el index cc22f70..68755a9 100644 --- a/init.el +++ b/init.el @@ -182,6 +182,15 @@ (lambda () (meow--set-cursor-type '(hbar 2)))))) (meow-global-mode)) +(use-package avy + :bind + ("C-'" . avy-goto-char) + ("C-," . avy-goto-char-2) + ("C-\"" . avy-goto-char-timer) + ("M-g f" . avy-goto-line) + ("M-g w" . avy-goto-word-1) + ("M-g e" . avy-goto-word-0)) + (use-package puni :hook prog-mode tex-mode :bind (:map puni-mode-map @@ -563,6 +572,10 @@ vc-ignore-dir-regexp tramp-file-name-regexp))) +(defun my-inhibit-hl-line-mode () + "Disable `gobal-hl-line-mode' for the current buffer." + (setq-local global-hl-line-mode nil)) + (use-package vterm :bind ("C-c t" . vterm) @@ -813,10 +826,9 @@ (size-indication-mode) (global-hl-line-mode) -(defun my-inhibit-hl-line-mode () - (setq-local global-hl-line-mode nil)) (defun my-relative-linenum () + "Simply enables relative line numbers." (setq display-line-numbers 'relative)) (dolist (hook '(prog-mode-hook text-mode-hook @@ -825,6 +837,7 @@ (add-hook hook #'my-relative-linenum)) (defun my-use-spaces-for-indent () + "Simply turnoff `indent-tabs-mode'." (setq indent-tabs-mode nil)) (dolist (hook '(emacs-lisp-mode-hook lisp-mode-hook @@ -848,7 +861,7 @@ (scroll-up 3)) (defun frame-make-detect-term (&optional frame) - "Check when frames are made in order to make terminal-only configurations" + "Check when FRAME are made in order to make terminal-only configurations." (unless (display-graphic-p frame) (xterm-mouse-mode) (global-set-key (kbd "") #'scroll-down-3) @@ -879,8 +892,8 @@ (require 'battery) (defun my-bat-check () - "Check if battery status has changed in order to toggle -goggles-pulse and pixel-scroll-precision-mode." + "Check if battery status has changed. +Used to toggle `goggles-pulse' and `pixel-scroll-precision-mode'." (let ((bat-status (string-equal (cdr (assq ?L (funcall battery-status-function))) "BAT"))) (unless (eq bat-status my-bat-previous-status)