Skip to content

ryicoh/deepl.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks