Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xcodebuild/gtrans
VIm 的谷歌翻译插件(A google translater for vim)
https://github.com/xcodebuild/gtrans
Last synced: 24 days ago
JSON representation
VIm 的谷歌翻译插件(A google translater for vim)
- Host: GitHub
- URL: https://github.com/xcodebuild/gtrans
- Owner: xcodebuild
- Created: 2014-08-21T06:40:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-22T09:08:47.000Z (over 10 years ago)
- Last Synced: 2024-04-24T11:13:38.881Z (8 months ago)
- Language: Python
- Size: 160 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gtrans
## Introduction 介绍
gtrans is a vim plugin which allow you to translate words or sentences by using Google Translate.
gtrans 是一个基于 Google Translate 的 vim 插件,可以翻译词语和句子。
## Requirements 要求
- vim compiled with python (+python option)
包含 python 支持的 vim
## Install 安装
`Plugin 'CodeFalling/gtrans'`
## Variables 变量
let g:gtrans_input_language = 'en' # 要翻译的语言,默认为英文
let g:gtrans_output_language = 'zh-CN' # 翻译为,默认为简体中文## Usage 使用
Add below to your .vimrc to bind key
将下面的代码加入你的 .vimrc 以绑定按键
```
nmap :Gtrans
imap :Gtransi
vmap :call Gtrans()
```## Features 特性
- Show result with new window.
用一个弹出窗口显示翻译结果
- Auto exit Vim when only translate window
当只剩下翻译窗口时自动退出 Vim
## ScreenShot 截屏
![word](http://falling-static.qiniudn.com/v0.2gtrans.jpg.jpg)
![sentence](http://falling-static.qiniudn.com/v0.2gtrans_sen.jpg.jpg)