Skip to content

tengufromsky/vim-translator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a fork of blindFS/vim-translator with my little changes.

Dependencies

  • A translation tool. Defaults to translate-shell.
  • A player for pronunciation. Defaults to mplayer

Install

If you don't have a preferred method, I use Vundle.vim.

Plugin 'tengufromsky/vim-translator'

Usage

Create you own mappings like this in your vimrc

vmap T <Plug>Translate
vmap R <Plug>TranslateReplace
vmap P <Plug>TranslateSpeak
  • Assign g:translate_cmd to your preferred command for example trans -b :ru, the first target language specified is used in "translate and replace".
let g:translate_cmd='trans -b :ru'
  • Assign g:translate_player to your preferred cli stream player.
let g:translate_player='mplayer'

Demo

gif

License

MIT

About

vim plugin for fast translate and pronounce using https://github.com/soimort/google-translate-cli

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%