52 lines
1.2 KiB
EmacsLisp
52 lines
1.2 KiB
EmacsLisp
(provide 'thoom-editing)
|
|
|
|
;; TODO Support comments
|
|
(defun move-to-beginnings ()
|
|
"Move between possible beginnings of a line:
|
|
The very beginning, the start of an org headline, and the first non-whitespace character."
|
|
(interactive "^")
|
|
(cond
|
|
((not (bolp))
|
|
(move-beginning-of-line 1))
|
|
((org-at-heading-p)
|
|
(search-forward-regexp "*+ *" nil t))
|
|
(t (back-to-indentation))))
|
|
|
|
(use-package emacs
|
|
:bind (("C-a" . move-to-beginnings)))
|
|
|
|
;; 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 org-mode-map
|
|
("C-j" . avy-goto-char-timer)
|
|
:map isearch-mode-map
|
|
("C-j" . avy-isearch))
|
|
|
|
:init
|
|
(setq avy-timeout-seconds 0.25)
|
|
(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))
|