Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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)

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)