Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skanehira/translate.vim
translate language plugin
https://github.com/skanehira/translate.vim
Last synced: about 2 months ago
JSON representation
translate language plugin
- Host: GitHub
- URL: https://github.com/skanehira/translate.vim
- Owner: skanehira
- License: mit
- Archived: true
- Created: 2019-05-06T13:14:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-07T00:02:12.000Z (about 2 years ago)
- Last Synced: 2024-07-03T14:59:32.054Z (3 months ago)
- Language: Vim script
- Homepage:
- Size: 9.79 MB
- Stars: 122
- Watchers: 10
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# translate.vim
# This plugin is not maintained, please use [denops-translate.vim](https://github.com/skanehira/denops-translate.vim)
This is translate language plugin.![](https://i.imgur.com/p3WsE8P.gif)
# Features
- translate# Requirement
- curl
- vim 8.1.1513 or above/Neovim# Installtion
You can use the plugin manager or Vim8 package manager.
eg: dein.vim```toml
[[plugins]]
repo = 'skanehira/translate.vim'
```# Usage
The default is to translate English into Japanese.The language code is bellow.
https://cloud.google.com/translate/docs/languagesTranslate current line
```vim
:Translate
```Translate specified words
```vim
" result: こんにちは私の名前はゴリラです
:Translate hello my name is gorilla
```Reverse between resource and target to translate when using "!"
```vim
" result: It's a gorilla
:Translate! ゴリラです
```Translate selected lines
```vim
:'<,'>Translate
```You can use below options
```vim
let g:translate_source = "en"
let g:translate_target = "ja"
let g:translate_popup_window = 0 " if you want use popup window, set value 1
let g:translate_winsize = 10 " set buffer window height size if you doesn't use popup window
```You can also set key mappings.
```vim
nmap gr (Translate)
vmap t (VTranslate)
```If you using popup window and you want yank translate result, you can use `y` to do it.