Skip to content

jsntn/sdcv-pure.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sdcv-pure.el

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.

Installation

It can be installed using straight.el. To install, add the following to your Emacs configuration file:

(use-package sdcv-pure
  :straight (:host github :repo "jsntn/sdcv-pure.el")
  :config

  ;; set your dictionaries, see example below,
  ;; (defvar sdcv-simple-dict
  ;;   `("~/.stardict/dic/stardict-lazyworm-ec-2.4.2")
  ;;   "Dictionary to search")
  ;; (defvar sdcv-multiple-dicts
  ;;   `(("~/.stardict/dic/stardict-lazyworm-ec-2.4.2")
  ;;     ("~/.stardict/dic/stardict-langdao-ce-gb-2.4.2")
  ;;     ("~/.stardict/dic/stardict-langdao-ec-gb-2.4.2")
  ;;     ("~/.stardict/dic/stardict-cedict-gb-2.4.2")
  ;;     ("~/.stardict/dic/stardict-DrEye4in1-2.4.2"))
  ;;   "List of dictionaries to search.")

  ;; keybinding example,
  ;; (global-set-key (kbd "C-c d") 'sdcv-simple-definition)
  ;; (global-set-key (kbd "C-c D") 'sdcv-complete-definition)
  )

Usage

Use,

  • sdcv-simple-definition for simple popup lookup
  • sdcv-complete-definition for the multiple dictionaries lookup

Navigation in sdcv-mode

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 entry
  • C-k - Jump to the previous dictionary entry
  • q - Quit the sdcv window

These keybindings are also available in Evil normal mode if you use Evil.

License

sdcv.el is licensed under the GPL 3.0 License. See LICENSE for details.

About

Elisp version of sdcv.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors