This is an alternative Elisp implementation of sdcv.el that does not require the sdcv CLI dependency. It is based on Chen Bin's code from here.
This version includes updates to support lookups across multiple dictionaries.
Clone the repository and add it to your load-path:
(add-to-list 'load-path "/path/to/sdcv-pure.el")
(require 'sdcv-pure)Use,
sdcv-simple-definitionfor popup lookup with dictionary cyclingsdcv-complete-definitionfor the multiple dictionaries lookup in a buffersdcv-select-definitionfor popup lookup with a specific dictionary you choose
When using sdcv-simple-definition, the result is displayed as a popup overlay starting with sdcv-simple-dict. You can cycle through other dictionaries defined in sdcv-multiple-dicts using:
C-j- Show result from the next dictionaryC-k- Show result from the previous dictionaryy- Copy the current definition to the kill ring- Any other key - Dismiss the popup
Dictionaries are looked up lazily — only when you navigate to them. Results are cached in memory so cycling back is instant.
Prompts you to select a dictionary from sdcv-multiple-dicts, then looks up the word and displays it in the same popup overlay with the same keybindings as above.
Set sdcv-history-file to a file path to record every word you look up:
(setq sdcv-history-file "~/sdcv-history.txt")Words are stored one per line, newest first. Duplicate lookups are moved to the top rather than creating duplicates. When sdcv-history-file is nil (default), no history is recorded.
When using sdcv-complete-definition, you can quickly jump between different dictionaries in the results buffer using the following keybindings:
C-j- Jump to the next dictionary entryC-k- Jump to the previous dictionary entryq- Quit the sdcv window
These keybindings are also available in Evil normal mode if you use Evil.
sdcv.el is licensed under the GPL 3.0 License. See LICENSE for details.