2015-06-10 16:44:30 +00:00
|
|
|
#+TITLE: Search Engine contribution layer for Spacemacs
|
2015-11-08 18:04:44 +00:00
|
|
|
#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="../../css/readtheorg.css" />
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
[[file:img/searchengine.jpg]]
|
|
|
|
|
2015-10-30 11:20:58 +00:00
|
|
|
* Table of Contents :TOC_4_org:noexport:
|
|
|
|
- [[Description][Description]]
|
|
|
|
- [[Supported search engines][Supported search engines]]
|
|
|
|
- [[Install][Install]]
|
|
|
|
- [[Key Bindings][Key Bindings]]
|
|
|
|
- [[Customize it!][Customize it!]]
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Description
|
|
|
|
|
|
|
|
This layer adds support for the [[https://github.com/hrs/engine-mode/engine-mode.el][Search Engine]] package.
|
|
|
|
|
2015-06-10 21:16:01 +00:00
|
|
|
** Supported search engines
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
- Amazon
|
|
|
|
- Duck Duck Go
|
|
|
|
- Google
|
|
|
|
- Google Images
|
|
|
|
- GitHub
|
|
|
|
- Google Maps
|
|
|
|
- Twitter
|
|
|
|
- Project Gutemberg
|
|
|
|
- Youtube
|
|
|
|
- Stack Overflow
|
|
|
|
- Spacemacs Issues
|
|
|
|
- Wikipedia
|
|
|
|
- Wolfram Alpha
|
|
|
|
|
|
|
|
* Install
|
|
|
|
|
|
|
|
To use this contribution add it to your =~/.spacemacs=
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers '(search-engine))
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
* Key Bindings
|
|
|
|
|
2015-06-12 01:23:07 +00:00
|
|
|
| Evil | Holy | Command |
|
|
|
|
|-----------+---------+-------------------------------------------|
|
2015-06-10 16:44:30 +00:00
|
|
|
| ~SPC a /~ | ~C-c /~ | Summon a Helm buffer to select any engine |
|
|
|
|
|
|
|
|
* Customize it!
|
|
|
|
|
|
|
|
If you'd rather have emacs use chrome, or firefox or any other thing (=eww=) you
|
|
|
|
can have that customization. For example for google chrome you can put this in
|
2015-09-28 06:05:18 +00:00
|
|
|
your =dotspacemacs/user-config=:
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq browse-url-browser-function 'browse-url-generic
|
|
|
|
engine/browser-function 'browse-url-generic
|
|
|
|
browse-url-generic-program "google-chrome")
|
|
|
|
#+END_SRC
|
|
|
|
|
2015-09-28 06:05:18 +00:00
|
|
|
Also if you want more search engines, just push them (do this in
|
|
|
|
=dotspacemacs/user-config=)
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(push '(custom1
|
|
|
|
:name "Custom Search Engine 1"
|
|
|
|
:url "http://www.domain.com/s/stuff_sutff_remember_to_replace_search_candidate_with_%s")
|
2015-08-28 05:31:47 +00:00
|
|
|
search-engine-alist)
|
2015-06-10 16:44:30 +00:00
|
|
|
#+END_SRC
|
|
|
|
|
2015-06-10 21:16:01 +00:00
|
|
|
If you'd rather not use helm but would want a specific search engine, remember
|
2015-06-10 16:44:30 +00:00
|
|
|
the function generated is always =engine/search-(the name of the search engine
|
|
|
|
lower-case and hyphen instead-of-spaces-for-separation)= so you can bind that to
|
2015-06-10 21:16:01 +00:00
|
|
|
any key binding you want.
|