diff --git a/boon-arguments.el b/boon-arguments.el index 50e2b89..36d37b6 100644 --- a/boon-arguments.el +++ b/boon-arguments.el @@ -70,6 +70,20 @@ This item is either the symbol at point, or, if this fails, the sexp at point." (save-excursion (skip-chars-forward "^|") (point)))))) +(defun boon-select-org-tree () + "Return the region corresponding to the current subtree." + (interactive) + (lambda () + (boon-regs-from-bounds + (save-excursion + (save-match-data + (org-with-limited-levels + (cons + (progn (org-back-to-heading t) (point)) + (progn (org-end-of-subtree t t) + (when (and (org-at-heading-p) (not (eobp))) (backward-char 1)) + (point))))))))) + (defun boon-select-justline () "Return the region of the current line, without any newline." (interactive) (boon-regs-from-bounds (cons (line-beginning-position) (line-end-position)))) diff --git a/boon-colemak.el b/boon-colemak.el index 42bdde2..ef9aa06 100644 --- a/boon-colemak.el +++ b/boon-colemak.el @@ -14,14 +14,15 @@ (define-key boon-select-map "r" 'boon-select-justline) ;; Row (define-key boon-select-map "s" '("symbol" . boon-select-wim)) ;; symbol (define-key boon-select-map "t" 'boon-select-with-spaces) +(define-key boon-select-map "T" 'boon-select-org-tree) (define-key boon-select-map "d" 'boon-select-document) -(define-key boon-select-map "b" 'boon-select-block) - -(define-key boon-select-map "C" 'boon-select-comment) -(define-key boon-select-map "x" 'boon-select-outside-pairs) ;; eXpression -(define-key boon-select-map "c" 'boon-select-inside-pairs) ;; Contents (define-key boon-select-map "z" 'boon-select-content) ;; inZide +(define-key boon-select-map "x" 'boon-select-outside-pairs) ;; eXpression +(define-key boon-select-map "C" 'boon-select-comment) +(define-key boon-select-map "c" 'boon-select-inside-pairs) ;; Contents + +(define-key boon-select-map "b" 'boon-select-block) (define-key boon-select-map "k" '("blanks" . boon-select-blanks))