Awesome
dps-translate-vim
The translate plugin for Vim/Neovim using denops.vim.
Respect for skanehira/translate.vim.
Install
This plugin is depends on denops.vim.
vim-plug
Plug 'vim-denops/denops.vim' Plug 'Omochice/dps-translate-vim'
dein.vim
call dein#add("vim-denops/denops.vim") call dein#add("Omochice/dps-translate-vim")
Usage
-
Set
g:dps_translate_source
andg:dps_translate_target
let g:dps_translate_source = "en" let g:dps_translate_target = "ja"
-
Run
:Translate
on Normal mode, The result of translation is shown.
- Run
:Translate!
can translate reverse.
-
Can give a sentence as an argument also.
:Translate <sentence>
-
In visual mode, can select row and translate it.
- If you want to translate multiple sentences as one sentence, Use
TranslateJoin
.
VARIABLES
-
g:dps_translate_source
The string of translation source language. Default:'en'
-
g:dps_translate_target
The string of translation source language. Default:'ja'
-
g:dps_translate_engine
Use engine. Default:'google'
-
g:dps_translate_deepl_token
Token for using deepl. Default: None -
g:dps_translate_deepl_is_pro
Either pro plan or free plan. Default:v:false
-
g:dps_translate_border
Dict for border like:let g:dps_translate_border = { \ 'topLeft': '┌', \ 'top': '─', \ 'topRight': '┐', \ 'left': '│', \ 'right': '│', \ 'bottomLeft': '└', \ 'bottom': '─', \ 'bottomRight': '┘', \ }
Default:
'none'
(no border)
LICENSE
MIT