counsel-web
counsel-web copied to clipboard
Use current (under cursor) word as the initial input for a web search with suggestions
To start a web search suggesting a thing at point initially, I've defined counsel-web-suggest-thing-at-point
(analogously to counsel-web-thing-at-point
):
(use-package counsel-web
:commands (counsel-web-suggest counsel-web-search counsel-web-thing-at-point)
:bind
("C-c s" . counsel-web-suggest-thing-at-point)
:custom
(counsel-web-engine 'google)
:config
;; start web search suggesting a thing at point
(defun counsel-web-suggest-thing-at-point (thing)
"Use THING as the initial input for counsel-web-suggest"
(interactive (list (thing-at-point counsel-web-thing)))
(counsel-web-suggest thing)))
counsel-web-suggest-thing-at-point
could be included into the package and/or mentioned in the README.
Great suggestion! Would you like to send a PR?
Would you like to send a PR?
No, please, use the snippet anyway you like.