https://github.com/omochice/dps-translate-vim
Translation plugin for Vim / Neovim by denops.vim
https://github.com/omochice/dps-translate-vim
vim-denops vim-plugin
Last synced: 8 months ago
JSON representation
Translation plugin for Vim / Neovim by denops.vim
- Host: GitHub
- URL: https://github.com/omochice/dps-translate-vim
- Owner: Omochice
- License: mit
- Created: 2021-08-02T08:28:39.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T11:26:27.000Z (about 2 years ago)
- Last Synced: 2024-04-14T01:10:49.768Z (about 2 years ago)
- Topics: vim-denops, vim-plugin
- Language: TypeScript
- Homepage:
- Size: 85.9 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dps-translate-vim
The translate plugin for Vim/Neovim using [denops.vim](https://github.com/vim-denops/denops.vim).
Respect for [skanehira/translate.vim](https://github.com/skanehira/translate.vim).
## Install
This plugin is depends on [denops.vim](https://github.com/vim-denops/denops.vim).
- `vim-plug`
```vim
Plug 'vim-denops/denops.vim'
Plug 'Omochice/dps-translate-vim'
```
- `dein.vim`
```vim
call dein#add("vim-denops/denops.vim")
call dein#add("Omochice/dps-translate-vim")
```
## Usage
- Set `g:dps_translate_source` and `g:dps_translate_target`
```vim
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.
```vim
:Translate
```
- 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:
```vim
let g:dps_translate_border = {
\ 'topLeft': '┌',
\ 'top': '─',
\ 'topRight': '┐',
\ 'left': '│',
\ 'right': '│',
\ 'bottomLeft': '└',
\ 'bottom': '─',
\ 'bottomRight': '┘',
\ }
```
Default: `'none'` (no border)
## LICENSE
MIT