Skip to content
translate language plugin
Vim script
Branch: master
Clone or download
Latest commit 97f97c5 Nov 11, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
autoload
doc Remove default key mappings Nov 10, 2019
plugin Remove default key mappings Nov 10, 2019
LICENSE
README.md Remove default key mappings Nov 10, 2019

README.md

translate.vim

This is language translate plugin.

Features

  • translate
  • support popup window

Requirement

  • gtran
  • vim 8.1.1513 or above

Installtion

Add this repo using the plugin manager. Ex: dein.vim

[[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/languages

Translate current line

:Translate

Translate specified words

:Translate hello my name is gorilla

Toggle between resource and target to translate when using "!"

:Translate!

Translate selected lines

:'<,'>Translate

Auto translate mode enable

:AutoTranslateModeEnable

Switch source and target

:AutoTranslateModeEnable!

Auto translate mode enable

:AutoTranslateModeToggle

Switch source and target

:AutoTranslateModeToggle!

Auto translate mode disable

:AutoTranslateModeDisable

You can set translate source, target and result window size.

let g:translate_source = "en"
let g:translate_target = "ja"
let g:translate_winsize = 10

You can also set key mappings.

xmap <Space>tr <Plug>(VTranslate)
xmap <Space>tr <Plug>(VTranslateBang)
You can’t perform that action at this time.