minamorl / deepl.vim

DeepL translation plugin for Vim/NeoVim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deepl.vim Test

DeepL translation plugin for Vim/NeoVim.

Demo

2022-01-09.19.47.28.mov

Requirements

Installation

For vim-plug

Plug "ryicoh/deepl.vim"

For dein.vim

call dein#add("ryicoh/deepl.vim")

Configuration

let g:deepl#endpoint = "https://api-free.deepl.com/v2/translate"
let g:deepl#auth_key = "00000000-0000-0000-0000-000000000000:fx" " or readfile(expand('~/.config/deepl.auth_key'))[0]

" replace a visual selection
vmap t<C-e> <Cmd>call deepl#v("EN")<CR>
vmap t<C-j> <Cmd>call deepl#v("JA")<CR>

" translate a current line and display on a new line
nmap t<C-e> yypV<Cmd>call deepl#v("EN")<CR>
nmap t<C-j> yypV<Cmd>call deepl#v("JA")<CR>

" specify the source language
" translate from FR to EN
nmap t<C-e> yypV<Cmd>call deepl#v("EN", "FR")<CR>

License

MIT

About

DeepL translation plugin for Vim/NeoVim.

License:MIT License


Languages

Language:Vim Script 52.1%Language:Go 47.9%