Add google-this plugin

This commit is contained in:
Henrik Lissner 2016-10-03 12:11:10 +02:00
parent c28bb1519d
commit d2c6f0ca71
2 changed files with 31 additions and 0 deletions

View file

@ -12,5 +12,20 @@
(setq query (thing-at-point 'symbol)))
(doom-docs-lookup query bang)))
;;;###autoload (autoload 'doom:google-search "defuns-docs" nil t)
(evil-define-command doom:google-search (&optional bang search)
"Opens a browser and performs the entered google search. If BANG, use 'I'm
feeling lucky'."
(interactive "<!><a>")
(if search
(google-this-parse-and-search-string
search nil
(if bang (google-this-lucky-search-url)))
(cond ((eq major-mode 'c++-mode)
(google-this-cpp-reference))
((evil-visual-state-p)
(google-this-region nil))
(t (google-this-symbol nil)))))
(provide 'defuns-docs)
;;; defuns-docs.el ends here