Skip to content

Customizing meow-next-word #184

Answered by DogLooksGood
joshcho asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, the only way is having your own implementation, there's no such option.

(defun meow-next-word (n)
  (interactive "p")
  (unless (equal 'word (cdr (meow--selection-type)))
    (meow--cancel-selection))
  (let* ((expand (equal '(expand . word) (meow--selection-type)))
         (_ (when expand (meow--direction-forward)))
         (type (if expand '(expand . word) '(select . word)))
         (p (save-mark-and-excursion
              (when (forward-word n)
                (point))))
	 (m (save-mark-and-excursion
	      (goto-char p)
	      (backward-word)
	      (point))))
    (when p
      (thread-first
        (meow--make-selection type (meow--fix-word-selection-mark p m) p expand)
    …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joshcho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants