61 lines
1.4 KiB
EmacsLisp
61 lines
1.4 KiB
EmacsLisp
(provide 'thoom-editing)
|
|
|
|
(use-package mwim
|
|
:ensure t
|
|
:bind (([remap move-beginning-of-line] . mwim-beginning)
|
|
([remap move-end-of-line] . mwim-end))
|
|
:custom
|
|
(mwim-beginning-position-functions
|
|
'(mwim-line-beginning
|
|
mwim-code-beginning
|
|
mwim-comment-beginning)))
|
|
|
|
;; Allow movement during isearch
|
|
;; C/M-v move to next/previous match not currently visible
|
|
;; M-</> move to first/last match in buffer
|
|
(setq isearch-allow-motion t)
|
|
(setq isearch-wrap-pause nil)
|
|
|
|
(use-package avy
|
|
:ensure t
|
|
:bind
|
|
(("C-j" . avy-goto-char-timer)
|
|
([remap goto-line] . avy-goto-line)
|
|
:map isearch-mode-map
|
|
("C-j" . avy-isearch)
|
|
:map lisp-interaction-mode-map
|
|
("C-j" . nil))
|
|
|
|
:demand t
|
|
:config
|
|
(defun avy-action-embark (pt)
|
|
(unwind-protect
|
|
(save-excursion
|
|
(goto-char pt)
|
|
(embark-act))
|
|
(select-window
|
|
(cdr (ring-ref avy-ring 0))))
|
|
t)
|
|
|
|
(setf (alist-get ?\; avy-dispatch-alist) 'avy-action-embark)
|
|
|
|
(setq avy-timeout-seconds 0.25)
|
|
;; Always show candidates even when there's just one, to give an
|
|
;; opportunity to select an avy action
|
|
(setq avy-single-candidate-jump nil))
|
|
|
|
|
|
(use-package avy-zap
|
|
:ensure t
|
|
:bind (("C-z" . avy-zap-up-to-char-dwim)
|
|
("M-z" . avy-zap-to-char-dwim)))
|
|
|
|
(use-package expand-region
|
|
:ensure t
|
|
:bind (("C-=" . er/expand-region)))
|
|
|
|
(use-package dot-mode
|
|
:ensure t
|
|
:config
|
|
(global-dot-mode t))
|