In the blink of an eye, the search is complete!
blink-search is the fastest multi-source search framework for Emacs.
It uses Python's threading technology to search candidates and offloads all the computation to external Python process, hence, the Emacs session itself stays always responsive, as it has very few things to do, such as, render candidates of visible area.
blink-search will provide smooth completion experience without compromise to slow down emacs' performance.
Show search results in split window
Show search results in popup window
- Install Emacs 28 and above versions
- Install Python dependencies:
pip3 install epc requests
- Install external tools:
- Clone or download this repository (path of the folder is the
<path-to-blink-search>
used below). - Add following code in your ~/.emacs:
(add-to-list 'load-path "<path-to-blink-search>")
(require 'blink-search)
- Start blink-search: M-x blink-search
- C-u M-x
blink-search
to search current symbol - Typed keyword to search from all backends
- Search current buffer when keyword starts with
#
- Search current directory when keyword starts with
!
- Press
Ctrl + m
to select candidate or pressAlt + QuickKey
to select candidate match QuickKey
Grep Buffer | Grep Directory |
---|---|
Key | Command | Description |
---|---|---|
C + n | blink-search-candidate-select-next | Select next candidate item |
C + p | blink-search-candidate-select-prev | Select previous candidate item |
M + n | blink-search-backend-select-next | Select next backend item |
M + p | blink-search-backend-select-prev | Select previous backend item |
M + j | blink-search-candidate-group-select-next | Select next candidate group item |
M + k | blink-search-candidate-group-select-prev | Select previous candidate group item |
C + j | blink-search-parent | Jump to parent directory of select candidate item |
C + l | blink-search-continue | Continue search new directory of current candidate item |
C + m | blink-search-do | Execute action for selected candidate item |
C + M + m | blink-search-preview | Preview selected candidate item |
C + M + n | blink-search-preview-next | Preview next candidate item |
C + M + p | blink-search-preview-next | Preview previous candidate item |
M + w | blink-search-copy | Copy text of selected candidate item |
C + g | blink-search-quit | Quit |
blink-search-restart-process
: restart blink-search process (only used for development)
blink-search-search-backends
: default backends for blink search, which is a list of backend names, nil for all backends defined in python side. For example, blink-search only search result from buffer-list and find-file backend when set this option to("Buffer List" "Find File")
blink-search-enable-posframe
: set this option witht
, blink-search render search results by popup window, this feature need you install posframe firstblink-search-browser-function
: the default browser used for google suggestion. The default iseaf-open-browser
, you can set it toxwidget-webkit-browse-url
if your emacs is built with xwidget module. Orbrowse-url-default-macosx-browser/browse-url-xdg-open
to open the browser by your system default browser.blink-search-common-directory
: Common directory to search and open, default is'(("HOME" "~/"))
blink-search-grep-pdf-search-paths
: Paths to search for pdf files.blink-search-grep-pdf-backend
: Backend to use for pdf files, default is'pdf-tools
, set to'eaf-pdf-viewer
if you prefer to use EAF pdf viewer.
blink-search has completed the following search backends:
- History: search history of execute action
- Buffer List: search buffer list
- Common Directory: search your favorite common directories, you can customize option
blink-search-common-directory
- Recent File: search recent files
- Current Buffer: use
ripgrep
grep content of current buffer - Grep File: use
ripgrep
grep files under git project or current directory - IMenu: search variable/function of current buffer that base on imenu
- Find File: use
fd
search files under git project or current directory - EAF Browser: search history of EAF browser
- Elisp Symbol: search elisp symbol
- Google Suggest: search google suggestions and open in browser
- Key Value: read/get/del/update key-value pairs in sqlite3, require
sqlite3
and ensurepip install sqlite3
at first - Grep PDF: use
rga
search pdf files in several directories withblink-search-grep-pdf-search-paths
- PDF: use
rga
search current pdf file
Please use emacs -q
and load a minimal setup with only blink-search to verify that the bug is reproducible. If emacs -q
works fine, probably something is wrong with your Emacs config.
If the problem still exists, please report it here with *blink-search*
buffer content, it contains many clues that can help us locate the problem faster.
If you get a segfault error, please use the following way to collect crash information:
- Install gdb and turn on option
blink-search-enable-debug
- Use the command
blink-search-stop-process
to stop the current process - Restart blink-search, send issue with
*blink-search*
buffer content when next crash