Skip to content

Whitespace selection #632

Answered by Doodler8888
Doodler8888 asked this question in Q&A
Discussion options

You must be logged in to vote

For now i just use this code:

(defun meow--parse-inside-whitespace (inner)
  "Parse the bounds for inside whitespace selection."
  (save-excursion
    (let* ((line-start (line-beginning-position))
           (line-end (line-end-position))
           (start (progn
                    (skip-syntax-backward "^-" line-start)
                    (point)))
           (end (progn
                  (skip-syntax-forward "^-" line-end)
                  (point))))
      (cons start end))))

(add-to-list 'meow-char-thing-table '(?w . inside-whitespace))

(advice-add 'meow--parse-inner-of-thing-char :around
            (lambda (orig-fun ch)
              (if (eq ch ?w)
                  (meow--parse-…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

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