Function: avy-goto-word-1

avy-goto-word-1 is an autoloaded, interactive and byte-compiled function defined in avy.el.

Signature

(avy-goto-word-1 CHAR &optional ARG BEG END SYMBOL)

Documentation

Jump to the currently visible CHAR at a word start.

The window scope is determined by avy-all-windows. When ARG is non-nil, do the opposite of avy-all-windows. BEG and END narrow the scope where candidates are searched. When SYMBOL is non-nil, jump to symbol start instead of word start.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/avy-20241101.1357/avy.el
;;;###autoload
(defun avy-goto-word-1 (char &optional arg beg end symbol)
  "Jump to the currently visible CHAR at a word start.
The window scope is determined by `avy-all-windows'.
When ARG is non-nil, do the opposite of `avy-all-windows'.
BEG and END narrow the scope where candidates are searched.
When SYMBOL is non-nil, jump to symbol start instead of word start."
  (interactive (list (read-char "char: " t)
                     current-prefix-arg))
  (avy-with avy-goto-word-1
    (let* ((str (string char))
           (regex (cond ((string= str ".")
                         "\\.")
                        ((and avy-word-punc-regexp
                              (string-match avy-word-punc-regexp str))
                         (regexp-quote str))
                        ((<= char 26)
                         str)
                        (t
                         (concat
                          (if symbol "\\_<" "\\b")
                          str)))))
      (avy-jump regex
                :window-flip arg
                :beg beg
                :end end))))