Closed yuandaxing closed 7 years ago
Hi
You can add something like this to your config:
(defvar vr-current-thing-at-point)
(defun vr-thing-at-point-minibuffer-setup ()
(when (and vr-current-thing-at-point
(equal vr--in-minibuffer 'vr--minibuffer-regexp))
(insert vr-current-thing-at-point)))
(add-hook 'minibuffer-setup-hook 'vr-thing-at-point-minibuffer-setup)
(defun vr-thing-at-point ()
(interactive)
(let ((vr-current-thing-at-point (thing-at-point 'symbol t)))
(call-interactively 'vr/replace)))
You can tweak it to match your needs better (i.e. how thing-at-point
is invoked).
Does this help?
yes, it works. the bad thing is that, it give me the error message "vr-current-thing-at-point" is void.
Change (defvar vr-current-thing-at-point)
to (defvar vr-current-thing-at-point nil)
.
Is it ok now? If so, please close the issue.
fixed
I use vr/query-replace a lot. often i like to grab the word at the my cursor to the replace mini-buffer. I think thing-at-the point is a great feature.
could you please support that?