Add avy bindings
This commit is contained in:
parent
536bfe377b
commit
db8e54d545
23
init.el
23
init.el
|
@ -182,6 +182,15 @@
|
||||||
(lambda () (meow--set-cursor-type '(hbar 2))))))
|
(lambda () (meow--set-cursor-type '(hbar 2))))))
|
||||||
(meow-global-mode))
|
(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
|
(use-package puni
|
||||||
:hook prog-mode tex-mode
|
:hook prog-mode tex-mode
|
||||||
:bind (:map puni-mode-map
|
:bind (:map puni-mode-map
|
||||||
|
@ -563,6 +572,10 @@
|
||||||
vc-ignore-dir-regexp
|
vc-ignore-dir-regexp
|
||||||
tramp-file-name-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
|
(use-package vterm
|
||||||
:bind
|
:bind
|
||||||
("C-c t" . vterm)
|
("C-c t" . vterm)
|
||||||
|
@ -813,10 +826,9 @@
|
||||||
(size-indication-mode)
|
(size-indication-mode)
|
||||||
|
|
||||||
(global-hl-line-mode)
|
(global-hl-line-mode)
|
||||||
(defun my-inhibit-hl-line-mode ()
|
|
||||||
(setq-local global-hl-line-mode nil))
|
|
||||||
|
|
||||||
(defun my-relative-linenum ()
|
(defun my-relative-linenum ()
|
||||||
|
"Simply enables relative line numbers."
|
||||||
(setq display-line-numbers 'relative))
|
(setq display-line-numbers 'relative))
|
||||||
(dolist (hook '(prog-mode-hook
|
(dolist (hook '(prog-mode-hook
|
||||||
text-mode-hook
|
text-mode-hook
|
||||||
|
@ -825,6 +837,7 @@
|
||||||
(add-hook hook #'my-relative-linenum))
|
(add-hook hook #'my-relative-linenum))
|
||||||
|
|
||||||
(defun my-use-spaces-for-indent ()
|
(defun my-use-spaces-for-indent ()
|
||||||
|
"Simply turnoff `indent-tabs-mode'."
|
||||||
(setq indent-tabs-mode nil))
|
(setq indent-tabs-mode nil))
|
||||||
(dolist (hook '(emacs-lisp-mode-hook
|
(dolist (hook '(emacs-lisp-mode-hook
|
||||||
lisp-mode-hook
|
lisp-mode-hook
|
||||||
|
@ -848,7 +861,7 @@
|
||||||
(scroll-up 3))
|
(scroll-up 3))
|
||||||
|
|
||||||
(defun frame-make-detect-term (&optional frame)
|
(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)
|
(unless (display-graphic-p frame)
|
||||||
(xterm-mouse-mode)
|
(xterm-mouse-mode)
|
||||||
(global-set-key (kbd "<mouse-4>") #'scroll-down-3)
|
(global-set-key (kbd "<mouse-4>") #'scroll-down-3)
|
||||||
|
@ -879,8 +892,8 @@
|
||||||
|
|
||||||
(require 'battery)
|
(require 'battery)
|
||||||
(defun my-bat-check ()
|
(defun my-bat-check ()
|
||||||
"Check if battery status has changed in order to toggle
|
"Check if battery status has changed.
|
||||||
goggles-pulse and pixel-scroll-precision-mode."
|
Used to toggle `goggles-pulse' and `pixel-scroll-precision-mode'."
|
||||||
(let ((bat-status (string-equal (cdr (assq ?L (funcall battery-status-function)))
|
(let ((bat-status (string-equal (cdr (assq ?L (funcall battery-status-function)))
|
||||||
"BAT")))
|
"BAT")))
|
||||||
(unless (eq bat-status my-bat-previous-status)
|
(unless (eq bat-status my-bat-previous-status)
|
||||||
|
|
Loading…
Reference in a new issue