-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanding versions of the thing selection commands #552
Comments
You can just expand the selection with builtin |
Here is what I have been using, based on (defun my-meow-extend-to-end-of-thing (thing)
"Extend selection to the end of THING."
(interactive (list (meow-thing-prompt "Extend to end of: ")))
(if (not (use-region-p))
(meow-end-of-thing thing)
(save-window-excursion
(let ((back (equal 'backward (meow--thing-get-direction 'end)))
(bounds (meow--parse-inner-of-thing-char thing)))
(let ((beg (min (point) (mark))))
(when bounds
(thread-first
(meow--make-selection '(select . transient)
(if back (cdr bounds) beg)
(if back beg (cdr bounds)))
(meow--select))))))))
(defun my-meow-extend-to-beginning-of-thing (thing)
"Extend selection to the beginning of THING."
(interactive (list (meow-thing-prompt "Extend to beginning of: ")))
(if (not (use-region-p))
(meow-beginning-of-thing thing)
(save-window-excursion
(let ((back (equal 'backward (meow--thing-get-direction 'beginning)))
(bounds (meow--parse-inner-of-thing-char thing)))
(let ((end (max (point) (mark))))
(when bounds
(thread-first
(meow--make-selection '(select . transient)
(if back end (car bounds))
(if back (car bounds) end))
(meow--select)))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd really like to see expanding versions of the current transient thing-based selection commands. For example, I'd like to be able to say
. p ; ] p
(or something) to select two paragraphs. Even nicer would be if I could type. p 5
(or something) to select the current paragraph and the next five.Deleting large blocks of text is very painful without this feature.
The text was updated successfully, but these errors were encountered: