Emacs帮你进行英文阅读

本文介绍了Emacs中用于英文阅读的三个工具:define-word利用Wordnik网站提供英英词典功能;osx-dictionary.el借助Mac OSX的Dictionary.app进行翻译;google-translate则是一个Emacs到Google翻译的接口,方便快捷地进行文字翻译。

原文地址:https://raw.githubusercontent.com/lujun9972/lujun9972.github.com/source/Emacs之怒/Emacs帮你进行英文阅读.org

define-word

define-word 是 abo-abo 写的一款英-英词典的插件,它实际上是借助 Wordnik 这个字典网站来进行释义的。

osx-dictionary.el

osx-dictionary 顾名思义是借助 Mac OSX 中的 Dictionary.app 来进行翻译的。

osx-dictionary-search-word-at-point
Search word at point and display result with buffer
osx-dictionary-search-input Search
input word and display result with buffer

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.

google-translate

google-translate , an “Emacs Interface to Google Translate”. With this I could highlight a string in visual mode, run the google-translate-at-point command (bound to SPC x g t in Spacemacs), and have the translation displayed in a new buffer.

pangu-spacing 是 Emacs 上的一个 minor-mode,,启用后,会在英文与中文之间自动加空格,让你在使用 Emacs 阅读文章时能够非常舒适。名称由来pangu-spacing 名称来自 paranoid-auto-spacing 的 README 引述自 paranoid-auto-spacing README 为什么你们就是不能加个空格呢? —— 作者心声 如果你跟我一样,每次看到网页上的中文和英文、数字、符号挤在一块,就会坐立不安,忍不住想在它们之间加个空格。 这个外挂(支持 Chrome 和 Firefox)正是你在网络上行走需要的东西。 它会自动替你在网页中所有的中文和半形英文、数字、符号之间插入空白。 汉学家称这个空白为【盘古之白】,因为它劈开了全形字和半形字之间的混沌。 另有研究显示,打字的时候不喜欢在中文和英文之间加空格的人,感情路都走的很幸苦, 有七成的比例会在 34 岁的时候跟自己不爱的人结婚,而其余三成的人最后只能把遗产留给自己猫。 毕竟爱情跟书写都需要适时的留白。安装方式这个套件已经被 melpa 所收录,只需要在你的程序中加入 .emacs(add-to-list 'package-archives   '("melpa" . "http://melpa.milkbox.net/packages/") t)再使用 M-x package-install pangu-spacing ,就可以完成安装。启用 pangu-spacing在你的 .emacs 加入以下几行,可以让 pangu-spacing 全局执行(require 'pangu-spacing)(global-pangu-spacing-mode 1)如果你不想全局执行,则使用 M-x pangu-spacing-mode 就可只在目前的缓冲区上加上空格。pangu-spacing 设定在预设的情況下,pangu-spacing 插入的空白符号并不会真的加入到档案里面,而只是显示在 emacs 上,如果你希望他是真的将空格加入到你的档案,则你必须使用下面的方式将这个选项打开:(setq pangu-spacing-real-insert-separtor t)如果你只想要在某些情況下才自动插入空格到文档中,比如编辑 org-mode 的時候,则你可以这样做(add-hook 'org-mode-hook           '(lambda ()              (set (make-local-variable 'pangu-spacing-real-insert-separtor) t))) 标签:pangu
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值