Ⅰ. 插件描述
vim plugin for fast translate and pronounce using https://github.com/soimort/google-translate-cliⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'blindfs/vim-translator-is-written-on'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'blindfs/vim-translator-is-written-on'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'blindfs/vim-translator-is-written-on'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/blindfs/vim-translator
Ⅳ. 文档说明
## Dependencies
- A translation tool. I suggest translate-shell.
- A player for pronunciation. Defaults to mplayer
Install
If you don't have a preferred method,
I encourage you to use neobundle.vim.
NeoBundleLazy 'farseer90718/vim-translator', {
\ 'mappings' : '<Plug>Translate'
\ }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_cmdto your preferred command for exampleydcv,
- first target language specified is used in "translate and replace".
- Assign
g:translate_playerto your preferred cli stream player.
Demo

License
MIT