osx-dictionary

https://github.com/xuchunyang/osx-dictionary.el.git

git clone 'git://github.com/xuchunyang/osx-dictionary.el.git'
18

OSX Dictionary.app interface for Emacs

MELPA MELPA

Introduction

osx-dictionary is inspired by dictionary.vim. osx-dictionary provides functions which invoke Dictionary.app from Mac OS X.

Installation

Install from MELPA with:

M-x package-install RET osx-dictionary RET

Usage

Sample configuration

;; Support Chinese word
;; (setq osx-dictionary-use-chinese-text-segmentation t)

;; Choose explicitly a dictionary for searching (use the first available
;; dictionary in Dictionary.app if not set)
;; (setq osx-dictionary-dictionary-choice "Apple")

;; Key bindings
(global-set-key (kbd "C-c d") 'osx-dictionary-search-pointer)
;; (global-set-key (kbd "C-c i") 'osx-dictionary-search-input)

;; Work with popwin-el (https://github.com/m2ym/popwin-el)
;; (push "*osx-dictionary*" popwin:special-display-config)

Here is a screenshot of a sample usage: Imgur

Note on Chinese word support

GNU Emacs itself has no idea what a Chinese word is, If you want Emacs to get the most likely Chinese word under the cursor, you have to set osx-dictionary-use-chinese-text-segmentation to t and install a Chinese word segmentation tool, please refer to chinese-word-at-point#prerequisite for more info.

Todo