(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) (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)) :init (avy-setup-default)) (use-package avy-zap :ensure t :bind (("C-z" . avy-zap-up-to-char-dwim) ("M-z" . avy-zap-to-char-dwim)))