sponsor Vim development Vim logo Vim Book Ad

gtrans.vim : Vim上的翻译插件

 script karma  Rating 7/4, Downloaded by 1107  Comments, bugs, improvements  Vim wiki

created by
wang yicuan
 
script type
utility
 
description
Vim上的英译汉插件,服务由Google提供,需要Python

"    Usage: 使用时,可以在可视模式下高亮选择文本,或者在普通模式下将光标移
"               到目标单词上,使用 /gt 快捷键或者输入 :Gtrans 来获得翻译,默认
"               将内容翻译成为简体中文,可以修改 g:Gtrans_DefaultLang 改变默认
"               目标语言,如:
"                   let g:gtrans_DefaultLang = 'tw'
"               当然,设置的语言必须是初始就有或者你已经设置过的。可以通过传入
"               参数来设置翻译目标语言,如:
"                   :Gtrans('en')
"               不过目前只支持单词的翻译,因为输入命令的方法不能使用范围。不过
"               可以修改 g:gtrans_DefaultLang 以达到类似的效果。
"               初始可以翻译为三种语言:
"                   en : 英语
"                   zh : 简体中文
"                   tw : 繁体中文
"               可以通过设置 g:gtrans_LangDict 变量增加其他语言,如:
"                   let g:gtrans_LangDict = {
"                       目标语言的缩写(就是要传入的参数) :
"                       对应的语言名称缩写(需要通过GtransLangHelp 命令查找)
"                   }

Github: https://github.com/bolasblack/gtrans.vim

I will update this plugin in GitHub, but not in vim.org.

pic: http://i.min.us/ik3eaY.jpg
 
install details
把文件复制到 $VIM/plugin/ 目录下即可
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
gtrans.vim 0.2 2011-07-21 7.2 wang yicuan 修改了一下 GetTrans 和 Translate 函数,可以传入目标语言
gtrans.vim 0.1 2011-04-23 7.2 wang yicuan Initial upload
ip used for rating: 18.224.149.242

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github